Lines Matching defs:SC

103 /*          - Don't release HA Lock in ips_next() until SC taken off queue   */
775 int ips_eh_abort(struct scsi_cmnd *SC)
784 if (!SC)
787 host = SC->device->host;
788 ha = (ips_ha_t *) SC->device->host->hostdata;
800 while ((item) && (item->scsi_cmd != SC))
809 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) {
832 static int __ips_eh_reset(struct scsi_cmnd *SC)
846 if (!SC) {
852 ha = (ips_ha_t *) SC->device->host->hostdata;
865 while ((item) && (item->scsi_cmd != SC))
875 if (ips_removeq_wait(&ha->scb_waitlist, SC)) {
1015 static int ips_eh_reset(struct scsi_cmnd *SC)
1019 spin_lock_irq(SC->device->host->host_lock);
1020 rc = __ips_eh_reset(SC);
1021 spin_unlock_irq(SC->device->host->host_lock);
1038 static int ips_queue_lck(struct scsi_cmnd *SC, void (*done) (struct scsi_cmnd *))
1045 ha = (ips_ha_t *) SC->device->host->hostdata;
1053 if (ips_is_passthru(SC)) {
1055 SC->result = DID_BUS_BUSY << 16;
1056 done(SC);
1061 SC->result = DID_BUS_BUSY << 16;
1062 done(SC);
1067 SC->scsi_done = done;
1072 SC->cmnd[0],
1073 SC->device->channel, SC->device->id, SC->device->lun);
1076 if ((scmd_channel(SC) > 0)
1077 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) {
1078 SC->result = DID_NO_CONNECT << 16;
1079 done(SC);
1084 if (ips_is_passthru(SC)) {
1091 pt = (ips_passthru_t *) scsi_sglist(SC);
1095 SC->result = DID_BUS_BUSY << 16;
1096 done(SC);
1100 __ips_eh_reset(SC);
1101 SC->result = DID_OK << 16;
1102 SC->scsi_done(SC);
1110 SC->result = DID_ERROR << 16;
1111 done(SC);
1116 scratch->scsi_cmd = SC;
1121 ips_putq_wait_tail(&ha->scb_waitlist, SC);
1482 static int ips_is_passthru(struct scsi_cmnd *SC)
1488 if (!SC)
1491 if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) &&
1492 (SC->device->channel == 0) &&
1493 (SC->device->id == IPS_ADAPTER_ID) &&
1494 (SC->device->lun == 0) && scsi_sglist(SC)) {
1495 struct scatterlist *sg = scsi_sglist(SC);
1557 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)
1562 struct scatterlist *sg = scsi_sglist(SC);
1566 scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
1580 ips_scmd_buf_read(SC, pt, sizeof (ips_passthru_t));
1583 ips_scmd_buf_write(SC, pt, sizeof (ips_passthru_t));
1589 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize);
1606 ips_scmd_buf_write(SC, ha->ioctl_data,
1608 SC->result = DID_OK << 16;
1614 if (SC->cmnd[0] == IPS_IOCTL_COMMAND) {
1628 ips_scmd_buf_write(SC, ha->ioctl_data,
2525 struct scsi_cmnd *SC;
2639 SC = ips_removeq_wait(&ha->scb_waitlist, q);
2644 SC->result = DID_OK;
2645 SC->host_scribble = NULL;
2647 scb->target_id = SC->device->id;
2648 scb->lun = SC->device->lun;
2649 scb->bus = SC->device->channel;
2650 scb->scsi_cmd = SC;
2658 memcpy(scb->cdb, SC->cmnd, SC->cmd_len);
2660 scb->sg_count = scsi_dma_map(SC);
2668 scsi_for_each_sg(SC, sg, scb->sg_count, i) {