Lines Matching defs:scb

224 ahd_print_path(struct ahd_softc *ahd, struct scb *scb)
228 scb != NULL ? SCB_GET_CHANNEL(ahd, scb) : 'X',
229 scb != NULL ? SCB_GET_TARGET(ahd, scb) : -1,
230 scb != NULL ? SCB_GET_LUN(scb) : -1);
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)
538 cmd = scb->io_ctx;
539 ahd_sync_sglist(ahd, scb, BUS_DMASYNC_POSTWRITE);
775 struct scb *reset_scb;
1379 ahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb)
1381 ahd_platform_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb),
1382 SCB_GET_CHANNEL(ahd, scb),
1383 SCB_GET_LUN(scb), SCB_LIST_NULL,
1543 struct scb *scb;
1559 * Get an scb to use.
1570 if ((scb = ahd_get_scb(ahd, col_idx)) == NULL) {
1577 scb->io_ctx = cmd;
1578 scb->platform_data->dev = dev;
1579 hscb = scb->hscb;
1580 cmd->host_scribble = (char *)scb;
1588 scb->hscb->task_management = 0;
1589 mask = SCB_GET_TARGET_MASK(ahd, scb);
1595 scb->flags |= SCB_PACKETIZED;
1598 scb->flags |= SCB_AUTO_NEGOTIATE;
1599 scb->hscb->control |= MK_MESSAGE;
1615 scb->platform_data->xfer_len = 0;
1616 ahd_set_residual(scb, 0);
1617 ahd_set_sense_residual(scb, 0);
1618 scb->sg_count = 0;
1621 void *sg = scb->sg_list;
1625 scb->platform_data->xfer_len = 0;
1633 scb->platform_data->xfer_len += len;
1634 sg = ahd_sg_setup(ahd, scb, sg, addr, len,
1639 LIST_INSERT_HEAD(&ahd->pending_scbs, scb, pending_links);
1646 scb->flags |= SCB_ACTIVE;
1647 ahd_queue_scb(ahd, scb);
1757 * Calls the higher level scsi done function and frees the scb.
1760 ahd_done(struct ahd_softc *ahd, struct scb *scb)
1765 if ((scb->flags & SCB_ACTIVE) == 0) {
1766 printk("SCB %d done'd twice\n", SCB_GET_TAG(scb));
1770 LIST_REMOVE(scb, pending_links);
1771 cmd = scb->io_ctx;
1772 dev = scb->platform_data->dev;
1779 ahd_linux_unmap_scb(ahd, scb);
1788 if (ahd_get_transaction_status(scb) == CAM_REQ_INPROG) {
1793 ahd_get_transfer_length(scb) - ahd_get_residual(scb);
1795 if ((scb->flags & SCB_TRANSMISSION_ERROR) != 0) {
1798 ahd_print_path(ahd, scb);
1802 ahd_set_transaction_status(scb, CAM_UNCOR_PARITY);
1813 } else if (amount_xferred < scb->io_ctx->underflow) {
1816 ahd_print_path(ahd, scb);
1818 for (i = 0; i < scb->io_ctx->cmd_len; i++)
1819 printk(" 0x%x", scb->io_ctx->cmnd[i]);
1821 ahd_print_path(ahd, scb);
1824 ahd_get_residual(scb),
1825 ahd_get_transfer_length(scb));
1826 ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR);
1829 ahd_set_transaction_status(scb, CAM_REQ_CMP);
1831 } else if (ahd_get_transaction_status(scb) == CAM_SCSI_STATUS_ERROR) {
1832 ahd_linux_handle_scsi_status(ahd, cmd->device, scb);
1836 && ahd_get_transaction_status(scb) == CAM_REQ_CMP
1837 && ahd_get_scsi_status(scb) != SCSI_STATUS_QUEUE_FULL)
1854 if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
1856 if (ahd_get_transaction_status(scb) == CAM_BDR_SENT
1857 || ahd_get_transaction_status(scb) == CAM_REQ_ABORTED)
1858 ahd_set_transaction_status(scb, CAM_CMD_TIMEOUT);
1864 ahd_free_scb(ahd, scb);
1870 struct scsi_device *sdev, struct scb *scb)
1891 switch (ahd_get_scsi_status(scb)) {
1903 cmd = scb->io_ctx;
1904 if ((scb->flags & (SCB_SENSE|SCB_PKT_SENSE)) != 0) {
1909 if (scb->flags & SCB_SENSE) {
1911 - ahd_get_sense_residual(scb),
1920 scb->sense_data;
1929 ahd_get_sense_buf(ahd, scb)
1968 ahd_print_path(ahd, scb);
1987 ahd_print_path(ahd, scb);
1995 ahd_set_transaction_status(scb, CAM_REQUEUE_REQ);
1996 ahd_set_scsi_status(scb, SCSI_STATUS_OK);
2010 ahd_set_scsi_status(scb, SCSI_STATUS_BUSY);
2139 struct scb *pending_scb;
2245 struct scb *bus_scb;
2253 * At this point, pending_scb is the scb associated with the