aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/nsp32.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/nsp32.c')
-rw-r--r--drivers/scsi/nsp32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 6367f009cd74..e4ff4f00676d 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -481,7 +481,7 @@ static int nsp32_selection_autopara(struct scsi_cmnd *SCpnt)
481 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; 481 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
482 unsigned int base = SCpnt->device->host->io_port; 482 unsigned int base = SCpnt->device->host->io_port;
483 unsigned int host_id = SCpnt->device->host->this_id; 483 unsigned int host_id = SCpnt->device->host->this_id;
484 unsigned char target = SCpnt->device->id; 484 unsigned char target = scmd_id(SCpnt);
485 nsp32_autoparam *param = data->autoparam; 485 nsp32_autoparam *param = data->autoparam;
486 unsigned char phase; 486 unsigned char phase;
487 int i, ret; 487 int i, ret;
@@ -612,7 +612,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd *SCpnt)
612 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata; 612 nsp32_hw_data *data = (nsp32_hw_data *)SCpnt->device->host->hostdata;
613 unsigned int base = SCpnt->device->host->io_port; 613 unsigned int base = SCpnt->device->host->io_port;
614 unsigned int host_id = SCpnt->device->host->this_id; 614 unsigned int host_id = SCpnt->device->host->this_id;
615 unsigned char target = SCpnt->device->id; 615 unsigned char target = scmd_id(SCpnt);
616 unsigned char phase; 616 unsigned char phase;
617 int status; 617 int status;
618 unsigned short command = 0; 618 unsigned short command = 0;
@@ -973,7 +973,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
973 } 973 }
974 974
975 /* check target ID is not same as this initiator ID */ 975 /* check target ID is not same as this initiator ID */
976 if (SCpnt->device->id == SCpnt->device->host->this_id) { 976 if (scmd_id(SCpnt) == SCpnt->device->host->this_id) {
977 nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???"); 977 nsp32_dbg(NSP32_DEBUG_QUEUECOMMAND, "terget==host???");
978 SCpnt->result = DID_BAD_TARGET << 16; 978 SCpnt->result = DID_BAD_TARGET << 16;
979 done(SCpnt); 979 done(SCpnt);
@@ -1028,7 +1028,7 @@ static int nsp32_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_
1028 * (target don't have SDTR_DONE and SDTR_INITIATOR), sync 1028 * (target don't have SDTR_DONE and SDTR_INITIATOR), sync
1029 * message SDTR is needed to do synchronous transfer. 1029 * message SDTR is needed to do synchronous transfer.
1030 */ 1030 */
1031 target = &data->target[SCpnt->device->id]; 1031 target = &data->target[scmd_id(SCpnt)];
1032 data->cur_target = target; 1032 data->cur_target = target;
1033 1033
1034 if (!(target->sync_flag & (SDTR_DONE | SDTR_INITIATOR | SDTR_TARGET))) { 1034 if (!(target->sync_flag & (SDTR_DONE | SDTR_INITIATOR | SDTR_TARGET))) {