Lines Matching full:scb

224 ahd_print_path(struct ahd_softc *ahd, struct scb *scb)  in ahd_print_path()  argument
228 scb != NULL ? SCB_GET_CHANNEL(ahd, scb) : 'X', in ahd_print_path()
229 scb != NULL ? SCB_GET_TARGET(ahd, scb) : -1, in ahd_print_path()
230 scb != NULL ? SCB_GET_LUN(scb) : -1); in ahd_print_path()
354 struct scb *);
531 static void ahd_linux_unmap_scb(struct ahd_softc*, struct scb*);
534 ahd_linux_unmap_scb(struct ahd_softc *ahd, struct scb *scb) in ahd_linux_unmap_scb() argument
538 cmd = scb->io_ctx; in ahd_linux_unmap_scb()
540 ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE); in ahd_linux_unmap_scb()
578 * Queue an SCB to the controller.
774 struct scb *reset_scb; in ahd_linux_dev_reset()
809 * Generate us a new SCB in ahd_linux_dev_reset()
813 scmd_printk(KERN_INFO, cmd, "No SCB available\n"); in ahd_linux_dev_reset()
1378 ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb) in ahd_platform_freeze_devq() argument
1380 ahd_platform_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), in ahd_platform_freeze_devq()
1381 SCB_GET_CHANNEL(ahd, scb), in ahd_platform_freeze_devq()
1382 SCB_GET_LUN(scb), SCB_LIST_NULL, in ahd_platform_freeze_devq()
1542 struct scb *scb; in ahd_linux_run_command() local
1558 * Get an scb to use. in ahd_linux_run_command()
1569 if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) { in ahd_linux_run_command()
1576 scb->io_ctx = cmd; in ahd_linux_run_command()
1577 scb->platform_data->dev = dev; in ahd_linux_run_command()
1578 hscb = scb->hscb; in ahd_linux_run_command()
1579 cmd->host_scribble = (char *)scb; in ahd_linux_run_command()
1587 scb->hscb->task_management = 0; in ahd_linux_run_command()
1588 mask = SCB_GET_TARGET_MASK(ahd, scb); in ahd_linux_run_command()
1594 scb->flags |= SCB_PACKETIZED; in ahd_linux_run_command()
1597 scb->flags |= SCB_AUTO_NEGOTIATE; in ahd_linux_run_command()
1598 scb->hscb->control |= MK_MESSAGE; in ahd_linux_run_command()
1614 scb->platform_data->xfer_len = 0; in ahd_linux_run_command()
1615 ahd_set_residual(scb, 0); in ahd_linux_run_command()
1616 ahd_set_sense_residual(scb, 0); in ahd_linux_run_command()
1617 scb->sg_count = 0; in ahd_linux_run_command()
1620 void *sg = scb->sg_list; in ahd_linux_run_command()
1624 scb->platform_data->xfer_len = 0; in ahd_linux_run_command()
1632 scb->platform_data->xfer_len += len; in ahd_linux_run_command()
1633 sg = ahd_sg_setup(ahd, scb, sg, addr, len, in ahd_linux_run_command()
1638 LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links); in ahd_linux_run_command()
1645 scb->flags |= SCB_ACTIVE; in ahd_linux_run_command()
1646 ahd_queue_scb(ahd, scb); in ahd_linux_run_command()
1756 * Calls the higher level scsi done function and frees the scb.
1759 ahd_done(struct ahd_softc *ahd, struct scb *scb) in ahd_done() argument
1764 if ((scb->flags & SCB_ACTIVE) == 0) { in ahd_done()
1765 printk("SCB %d done'd twice\n", SCB_GET_TAG(scb)); in ahd_done()
1769 LIST_REMOVE(scb, pending_links); in ahd_done()
1770 cmd = scb->io_ctx; in ahd_done()
1771 dev = scb->platform_data->dev; in ahd_done()
1779 } else if (scb->flags & SCB_DEVICE_RESET) { in ahd_done()
1782 ahd_free_scb(ahd, scb); in ahd_done()
1785 ahd_linux_unmap_scb(ahd, scb); in ahd_done()
1794 if (ahd_get_transaction_status(scb) == CAM_REQ_INPROG) { in ahd_done()
1799 ahd_get_transfer_length(scb) - ahd_get_residual(scb); in ahd_done()
1801 if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) { in ahd_done()
1804 ahd_print_path(ahd, scb); in ahd_done()
1808 ahd_set_transaction_status(scb, CAM_UNCOR_PARITY); in ahd_done()
1819 } else if (amount_xferred < scb->io_ctx->underflow) { in ahd_done()
1822 ahd_print_path(ahd, scb); in ahd_done()
1824 for (i = 0; i < scb->io_ctx->cmd_len; i++) in ahd_done()
1825 printk(" 0x%x", scb->io_ctx->cmnd[i]); in ahd_done()
1827 ahd_print_path(ahd, scb); in ahd_done()
1830 ahd_get_residual(scb), in ahd_done()
1831 ahd_get_transfer_length(scb)); in ahd_done()
1832 ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR); in ahd_done()
1835 ahd_set_transaction_status(scb, CAM_REQ_CMP); in ahd_done()
1838 ahd_get_transaction_status(scb) == CAM_SCSI_STATUS_ERROR) { in ahd_done()
1839 ahd_linux_handle_scsi_status(ahd, cmd->device, scb); in ahd_done()
1843 && ahd_get_transaction_status(scb) == CAM_REQ_CMP in ahd_done()
1844 && ahd_get_scsi_status(scb) != SAM_STAT_TASK_SET_FULL) in ahd_done()
1861 if ((scb->flags & SCB_RECOVERY_SCB) != 0) { in ahd_done()
1862 printk("Recovery SCB completes\n"); in ahd_done()
1863 if (ahd_get_transaction_status(scb) == CAM_BDR_SENT in ahd_done()
1864 || ahd_get_transaction_status(scb) == CAM_REQ_ABORTED) in ahd_done()
1865 ahd_set_transaction_status(scb, CAM_CMD_TIMEOUT); in ahd_done()
1871 ahd_free_scb(ahd, scb); in ahd_done()
1878 struct scsi_device *sdev, struct scb *scb) in ahd_linux_handle_scsi_status() argument
1899 switch (ahd_get_scsi_status(scb)) { in ahd_linux_handle_scsi_status()
1911 cmd = scb->io_ctx; in ahd_linux_handle_scsi_status()
1912 if ((scb->flags & (SCB_SENSE|SCB_PKT_SENSE)) != 0) { in ahd_linux_handle_scsi_status()
1917 if (scb->flags & SCB_SENSE) { in ahd_linux_handle_scsi_status()
1919 - ahd_get_sense_residual(scb), in ahd_linux_handle_scsi_status()
1928 scb->sense_data; in ahd_linux_handle_scsi_status()
1937 ahd_get_sense_buf(ahd, scb) in ahd_linux_handle_scsi_status()
1976 ahd_print_path(ahd, scb); in ahd_linux_handle_scsi_status()
1995 ahd_print_path(ahd, scb); in ahd_linux_handle_scsi_status()
2003 ahd_set_transaction_status(scb, CAM_REQUEUE_REQ); in ahd_linux_handle_scsi_status()
2004 ahd_set_scsi_status(scb, SAM_STAT_GOOD); in ahd_linux_handle_scsi_status()
2018 ahd_set_scsi_status(scb, SAM_STAT_BUSY); in ahd_linux_handle_scsi_status()
2142 struct scb *pending_scb; in ahd_linux_queue_abort_cmd()
2203 * We can't queue two recovery actions using the same SCB in ahd_linux_queue_abort_cmd()
2247 struct scb *bus_scb; in ahd_linux_queue_abort_cmd()
2255 * At this point, pending_scb is the scb associated with the in ahd_linux_queue_abort_cmd()
2276 * Actually re-queue this SCB in an attempt in ahd_linux_queue_abort_cmd()
2287 * Mark the SCB has having an outstanding in ahd_linux_queue_abort_cmd()
2291 * to abort our requeued SCB. in ahd_linux_queue_abort_cmd()
2300 * no guarantee that our SCB control byte matches in ahd_linux_queue_abort_cmd()
2309 * in-core SCB. To make sure we are notified in ahd_linux_queue_abort_cmd()
2311 * the card's copy of the SCB. in ahd_linux_queue_abort_cmd()
2319 * so we are the next SCB for this target in ahd_linux_queue_abort_cmd()
2329 printk("Device is disconnected, re-queuing SCB\n"); in ahd_linux_queue_abort_cmd()