• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/scsi/

Lines Matching refs:SC

103 /*          - Don't release HA Lock in ips_next() until SC taken off queue   */
783 int ips_eh_abort(struct scsi_cmnd *SC)
792 if (!SC)
795 host = SC->device->host;
796 ha = (ips_ha_t *) SC->device->host->hostdata;
808 while ((item) && (item->scsi_cmd != SC))
817 } else if (ips_removeq_wait(&ha->scb_waitlist, SC)) {
840 static int __ips_eh_reset(struct scsi_cmnd *SC)
854 if (!SC) {
860 ha = (ips_ha_t *) SC->device->host->hostdata;
873 while ((item) && (item->scsi_cmd != SC))
883 if (ips_removeq_wait(&ha->scb_waitlist, SC)) {
1026 static int ips_eh_reset(struct scsi_cmnd *SC)
1030 spin_lock_irq(SC->device->host->host_lock);
1031 rc = __ips_eh_reset(SC);
1032 spin_unlock_irq(SC->device->host->host_lock);
1049 static int ips_queue(struct scsi_cmnd *SC, void (*done) (struct scsi_cmnd *))
1056 ha = (ips_ha_t *) SC->device->host->hostdata;
1064 if (ips_is_passthru(SC)) {
1066 SC->result = DID_BUS_BUSY << 16;
1067 done(SC);
1072 SC->result = DID_BUS_BUSY << 16;
1073 done(SC);
1078 SC->scsi_done = done;
1083 SC->cmnd[0],
1084 SC->device->channel, SC->device->id, SC->device->lun);
1087 if ((scmd_channel(SC) > 0)
1088 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) {
1089 SC->result = DID_NO_CONNECT << 16;
1090 done(SC);
1095 if (ips_is_passthru(SC)) {
1102 pt = (ips_passthru_t *) scsi_sglist(SC);
1106 SC->result = DID_BUS_BUSY << 16;
1107 done(SC);
1111 __ips_eh_reset(SC);
1112 SC->result = DID_OK << 16;
1113 SC->scsi_done(SC);
1121 SC->result = DID_ERROR << 16;
1122 done(SC);
1127 scratch->scsi_cmd = SC;
1132 ips_putq_wait_tail(&ha->scb_waitlist, SC);
1493 static int ips_is_passthru(struct scsi_cmnd *SC)
1499 if (!SC)
1502 if ((SC->cmnd[0] == IPS_IOCTL_COMMAND) &&
1503 (SC->device->channel == 0) &&
1504 (SC->device->id == IPS_ADAPTER_ID) &&
1505 (SC->device->lun == 0) && scsi_sglist(SC)) {
1506 struct scatterlist *sg = scsi_sglist(SC);
1567 ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)
1572 struct scatterlist *sg = scsi_sglist(SC);
1576 scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
1590 ips_scmd_buf_read(SC, pt, sizeof (ips_passthru_t));
1593 ips_scmd_buf_write(SC, pt, sizeof (ips_passthru_t));
1599 ips_scmd_buf_read(SC, ha->ioctl_data, ha->ioctl_datasize);
1616 ips_scmd_buf_write(SC, ha->ioctl_data,
1618 SC->result = DID_OK << 16;
1624 if (SC->cmnd[0] == IPS_IOCTL_COMMAND) {
1638 ips_scmd_buf_write(SC, ha->ioctl_data,
2612 struct scsi_cmnd *SC;
2729 SC = ips_removeq_wait(&ha->scb_waitlist, q);
2734 SC->result = DID_OK;
2735 SC->host_scribble = NULL;
2737 scb->target_id = SC->device->id;
2738 scb->lun = SC->device->lun;
2739 scb->bus = SC->device->channel;
2740 scb->scsi_cmd = SC;
2748 memcpy(scb->cdb, SC->cmnd, SC->cmd_len);
2750 scb->sg_count = scsi_dma_map(SC);
2758 scsi_for_each_sg(SC, sg, scb->sg_count, i) {