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)
1046 ha = (ips_ha_t *) SC->device->host->hostdata;
1054 if (ips_is_passthru(SC)) {
1056 SC->result = DID_BUS_BUSY << 16;
1057 done(SC);
1062 SC->result = DID_BUS_BUSY << 16;
1063 done(SC);
1071 SC->cmnd[0],
1072 SC->device->channel, SC->device->id, SC->device->lun);
1075 if ((scmd_channel(SC) > 0)
1076 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) {
1077 SC->result = DID_NO_CONNECT << 16;
1078 done(SC);
1083 if (ips_is_passthru(SC)) {
1090 pt = (ips_passthru_t *) scsi_sglist(SC);
1094 SC->result = DID_BUS_BUSY << 16;
1095 done(SC);
1099 __ips_eh_reset(SC);
1100 SC->result = DID_OK << 16;
1101 scsi_done(SC);
1109 SC->result = DID_ERROR << 16;
1110 done(SC);
1115 scratch->scsi_cmd = SC;
1120 ips_putq_wait_tail(&ha->scb_waitlist, SC);
1127 SC->result = DID_ERROR << 16;
1128 done(SC);
1486 static int ips_is_passthru(struct scsi_cmnd *SC)
1492 if (!SC)
1495 if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) &&
1496 (SC->device->channel == 0) &&
1497 (SC->device->id == IPS_ADAPTER_ID) &&
1498 (SC->device->lun == 0) && scsi_sglist(SC)) {
1499 struct scatterlist *sg = scsi_sglist(SC);
1560 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)
1565 struct scatterlist *sg = scsi_sglist(SC);
1569 scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
1583 ips_scmd_buf_read(SC, pt, sizeof (ips_passthru_t));
1586 ips_scmd_buf_write(SC, pt, sizeof (ips_passthru_t));
1592 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize);
1609 ips_scmd_buf_write(SC, ha->ioctl_data,
1611 SC->result = DID_OK << 16;
1617 if (SC->cmnd[0] == IPS_IOCTL_COMMAND) {
1631 ips_scmd_buf_write(SC, ha->ioctl_data,
2528 struct scsi_cmnd *SC;
2642 SC = ips_removeq_wait(&ha->scb_waitlist, q);
2647 SC->result = DID_OK;
2648 SC->host_scribble = NULL;
2650 scb->target_id = SC->device->id;
2651 scb->lun = SC->device->lun;
2652 scb->bus = SC->device->channel;
2653 scb->scsi_cmd = SC;
2661 memcpy(scb->cdb, SC->cmnd, SC->cmd_len);
2663 scb->sg_count = scsi_dma_map(SC);
2671 scsi_for_each_sg(SC, sg, scb->sg_count, i) {