aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/nsp32.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-24 18:05:09 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 22:10:16 -0400
commit422c0d61d591cbfb70f029e13505fb437e169d68 (patch)
treeebafa14e1c1564ddf263868c3b6907642a8fdf1e /drivers/scsi/nsp32.c
parent017560fca496f72ed9dd734ffde63ce39dfe0411 (diff)
[SCSI] use scmd_id(), scmd_channel() throughout code
Wrap a highly common idiom. Makes the code easier to read, helps pave the way for sdev->{id,channel} removal, and adds a token that can easily by grepped-for in the future. There are a couple sdev_id() and scmd_printk() updates thrown in as well. Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
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))) {