Lines Matching refs:SC

776 int ips_eh_abort(struct scsi_cmnd *SC)  in ips_eh_abort()  argument
785 if (!SC) in ips_eh_abort()
788 host = SC->device->host; in ips_eh_abort()
789 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_eh_abort()
801 while ((item) && (item->scsi_cmd != SC)) in ips_eh_abort()
810 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in ips_eh_abort()
833 static int __ips_eh_reset(struct scsi_cmnd *SC) in __ips_eh_reset() argument
847 if (!SC) { in __ips_eh_reset()
853 ha = (ips_ha_t *) SC->device->host->hostdata; in __ips_eh_reset()
866 while ((item) && (item->scsi_cmd != SC)) in __ips_eh_reset()
876 if (ips_removeq_wait(&ha->scb_waitlist, SC)) { in __ips_eh_reset()
1016 static int ips_eh_reset(struct scsi_cmnd *SC) in ips_eh_reset() argument
1020 spin_lock_irq(SC->device->host->host_lock); in ips_eh_reset()
1021 rc = __ips_eh_reset(SC); in ips_eh_reset()
1022 spin_unlock_irq(SC->device->host->host_lock); in ips_eh_reset()
1039 static int ips_queue_lck(struct scsi_cmnd *SC, void (*done) (struct scsi_cmnd *)) in ips_queue_lck() argument
1046 ha = (ips_ha_t *) SC->device->host->hostdata; in ips_queue_lck()
1054 if (ips_is_passthru(SC)) { in ips_queue_lck()
1056 SC->result = DID_BUS_BUSY << 16; in ips_queue_lck()
1057 done(SC); in ips_queue_lck()
1062 SC->result = DID_BUS_BUSY << 16; in ips_queue_lck()
1063 done(SC); in ips_queue_lck()
1068 SC->scsi_done = done; in ips_queue_lck()
1073 SC->cmnd[0], in ips_queue_lck()
1074 SC->device->channel, SC->device->id, SC->device->lun); in ips_queue_lck()
1077 if ((scmd_channel(SC) > 0) in ips_queue_lck()
1078 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { in ips_queue_lck()
1079 SC->result = DID_NO_CONNECT << 16; in ips_queue_lck()
1080 done(SC); in ips_queue_lck()
1085 if (ips_is_passthru(SC)) { in ips_queue_lck()
1092 pt = (ips_passthru_t *) scsi_sglist(SC); in ips_queue_lck()
1096 SC->result = DID_BUS_BUSY << 16; in ips_queue_lck()
1097 done(SC); in ips_queue_lck()
1101 __ips_eh_reset(SC); in ips_queue_lck()
1102 SC->result = DID_OK << 16; in ips_queue_lck()
1103 SC->scsi_done(SC); in ips_queue_lck()
1111 SC->result = DID_ERROR << 16; in ips_queue_lck()
1112 done(SC); in ips_queue_lck()
1117 scratch->scsi_cmd = SC; in ips_queue_lck()
1122 ips_putq_wait_tail(&ha->scb_waitlist, SC); in ips_queue_lck()
1483 static int ips_is_passthru(struct scsi_cmnd *SC) in ips_is_passthru() argument
1489 if (!SC) in ips_is_passthru()
1492 if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) && in ips_is_passthru()
1493 (SC->device->channel == 0) && in ips_is_passthru()
1494 (SC->device->id == IPS_ADAPTER_ID) && in ips_is_passthru()
1495 (SC->device->lun == 0) && scsi_sglist(SC)) { in ips_is_passthru()
1496 struct scatterlist *sg = scsi_sglist(SC); in ips_is_passthru()
1557 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr) in ips_make_passthru() argument
1562 struct scatterlist *sg = scsi_sglist(SC); in ips_make_passthru()
1566 scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i) in ips_make_passthru()
1580 ips_scmd_buf_read(SC, pt, sizeof (ips_passthru_t)); in ips_make_passthru()
1583 ips_scmd_buf_write(SC, pt, sizeof (ips_passthru_t)); in ips_make_passthru()
1589 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize); in ips_make_passthru()
1606 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
1608 SC->result = DID_OK << 16; in ips_make_passthru()
1614 if (SC->cmnd[0] == IPS_IOCTL_COMMAND) { in ips_make_passthru()
1628 ips_scmd_buf_write(SC, ha->ioctl_data, in ips_make_passthru()
2526 struct scsi_cmnd *SC; in ips_next() local
2640 SC = ips_removeq_wait(&ha->scb_waitlist, q); in ips_next()
2645 SC->result = DID_OK; in ips_next()
2646 SC->host_scribble = NULL; in ips_next()
2648 scb->target_id = SC->device->id; in ips_next()
2649 scb->lun = SC->device->lun; in ips_next()
2650 scb->bus = SC->device->channel; in ips_next()
2651 scb->scsi_cmd = SC; in ips_next()
2659 memcpy(scb->cdb, SC->cmnd, SC->cmd_len); in ips_next()
2661 scb->sg_count = scsi_dma_map(SC); in ips_next()
2669 scsi_for_each_sg(SC, sg, scb->sg_count, i) { in ips_next()