Lines Matching defs:SC
103 /* - Don't release HA Lock in ips_next() until SC taken off queue */
776 int ips_eh_abort(struct scsi_cmnd *SC)
785 if (!SC)
788 host = SC->device->host;
789 ha = (ips_ha_t *) SC->device->host->hostdata;
801 while ((item) && (item->scsi_cmd != SC))
810 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) {
833 static int __ips_eh_reset(struct scsi_cmnd *SC)
846 if (!SC) {
852 ha = (ips_ha_t *) SC->device->host->hostdata;
998 static int ips_eh_reset(struct scsi_cmnd *SC)
1002 spin_lock_irq(&SC->device->host->host_lock);
1003 rc = __ips_eh_reset(SC);
1004 spin_unlock_irq(&SC->device->host->host_lock);
1021 static enum scsi_qc_status ips_queue_lck(struct scsi_cmnd *SC)
1029 ha = (ips_ha_t *) SC->device->host->hostdata;
1037 if (ips_is_passthru(SC)) {
1039 SC->result = DID_BUS_BUSY << 16;
1040 done(SC);
1045 SC->result = DID_BUS_BUSY << 16;
1046 done(SC);
1054 SC->cmnd[0],
1055 SC->device->channel, SC->device->id, SC->device->lun);
1058 if ((scmd_channel(SC) > 0)
1059 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) {
1060 SC->result = DID_NO_CONNECT << 16;
1061 done(SC);
1066 if (ips_is_passthru(SC)) {
1073 pt = (ips_passthru_t *) scsi_sglist(SC);
1077 SC->result = DID_BUS_BUSY << 16;
1078 done(SC);
1082 __ips_eh_reset(SC);
1083 SC->result = DID_OK << 16;
1084 scsi_done(SC);
1092 SC->result = DID_ERROR << 16;
1093 done(SC);
1098 scratch->scsi_cmd = SC;
1103 ips_putq_wait_tail(&ha->scb_waitlist, SC);
1110 SC->result = DID_ERROR << 16;
1111 done(SC);
1469 static int ips_is_passthru(struct scsi_cmnd *SC)
1475 if (!SC)
1478 if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) &&
1479 (SC->device->channel == 0) &&
1480 (SC->device->id == IPS_ADAPTER_ID) &&
1481 (SC->device->lun == 0) && scsi_sglist(SC)) {
1482 struct scatterlist *sg = scsi_sglist(SC);
1543 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)
1548 struct scatterlist *sg = scsi_sglist(SC);
1552 scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
1566 ips_scmd_buf_read(SC, pt, sizeof (ips_passthru_t));
1569 ips_scmd_buf_write(SC, pt, sizeof (ips_passthru_t));
1575 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize);
1592 ips_scmd_buf_write(SC, ha->ioctl_data,
1594 SC->result = DID_OK << 16;
1600 if (SC->cmnd[0] == IPS_IOCTL_COMMAND) {
1614 ips_scmd_buf_write(SC, ha->ioctl_data,
2512 struct scsi_cmnd *SC;
2626 SC = ips_removeq_wait(&ha->scb_waitlist, q);
2631 SC->result = DID_OK;
2632 SC->host_scribble = NULL;
2634 scb->target_id = SC->device->id;
2635 scb->lun = SC->device->lun;
2636 scb->bus = SC->device->channel;
2637 scb->scsi_cmd = SC;
2645 memcpy(scb->cdb, SC->cmnd, SC->cmd_len);
2647 scb->sg_count = scsi_dma_map(SC);
2655 scsi_for_each_sg(SC, sg, scb->sg_count, i) {