diff options
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r-- | drivers/scsi/scsi_debug.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 322b5a41a36f..aadf051274fa 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
@@ -283,7 +283,7 @@ int scsi_debug_queuecommand(struct scsi_cmnd * SCpnt, done_funct_t done) | |||
283 | unsigned char *cmd = (unsigned char *) SCpnt->cmnd; | 283 | unsigned char *cmd = (unsigned char *) SCpnt->cmnd; |
284 | int block, upper_blk, num, k; | 284 | int block, upper_blk, num, k; |
285 | int errsts = 0; | 285 | int errsts = 0; |
286 | int target = SCpnt->device->id; | 286 | int target = scmd_id(SCpnt); |
287 | struct sdebug_dev_info * devip = NULL; | 287 | struct sdebug_dev_info * devip = NULL; |
288 | int inj_recovered = 0; | 288 | int inj_recovered = 0; |
289 | 289 | ||
@@ -1008,8 +1008,7 @@ static void timer_intr_handler(unsigned long indx) | |||
1008 | static int scsi_debug_slave_alloc(struct scsi_device * sdp) | 1008 | static int scsi_debug_slave_alloc(struct scsi_device * sdp) |
1009 | { | 1009 | { |
1010 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 1010 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
1011 | printk(KERN_INFO "scsi_debug: slave_alloc <%u %u %u %u>\n", | 1011 | sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_alloc\n"); |
1012 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | ||
1013 | return 0; | 1012 | return 0; |
1014 | } | 1013 | } |
1015 | 1014 | ||
@@ -1018,8 +1017,7 @@ static int scsi_debug_slave_configure(struct scsi_device * sdp) | |||
1018 | struct sdebug_dev_info * devip; | 1017 | struct sdebug_dev_info * devip; |
1019 | 1018 | ||
1020 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 1019 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
1021 | printk(KERN_INFO "scsi_debug: slave_configure <%u %u %u %u>\n", | 1020 | sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_configure\n"); |
1022 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | ||
1023 | if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) | 1021 | if (sdp->host->max_cmd_len != SCSI_DEBUG_MAX_CMD_LEN) |
1024 | sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; | 1022 | sdp->host->max_cmd_len = SCSI_DEBUG_MAX_CMD_LEN; |
1025 | devip = devInfoReg(sdp); | 1023 | devip = devInfoReg(sdp); |
@@ -1036,8 +1034,7 @@ static void scsi_debug_slave_destroy(struct scsi_device * sdp) | |||
1036 | (struct sdebug_dev_info *)sdp->hostdata; | 1034 | (struct sdebug_dev_info *)sdp->hostdata; |
1037 | 1035 | ||
1038 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) | 1036 | if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) |
1039 | printk(KERN_INFO "scsi_debug: slave_destroy <%u %u %u %u>\n", | 1037 | sdev_printk(KERN_INFO, sdp, "scsi_debug: slave_destroy\n"); |
1040 | sdp->host->host_no, sdp->channel, sdp->id, sdp->lun); | ||
1041 | if (devip) { | 1038 | if (devip) { |
1042 | /* make this slot avaliable for re-use */ | 1039 | /* make this slot avaliable for re-use */ |
1043 | devip->used = 0; | 1040 | devip->used = 0; |
@@ -1326,9 +1323,9 @@ static int schedule_resp(struct scsi_cmnd * cmnd, | |||
1326 | if (scsi_result) { | 1323 | if (scsi_result) { |
1327 | struct scsi_device * sdp = cmnd->device; | 1324 | struct scsi_device * sdp = cmnd->device; |
1328 | 1325 | ||
1329 | printk(KERN_INFO "scsi_debug: <%u %u %u %u> " | 1326 | sdev_printk(KERN_INFO, sdp, |
1330 | "non-zero result=0x%x\n", sdp->host->host_no, | 1327 | "non-zero result=0x%x\n", |
1331 | sdp->channel, sdp->id, sdp->lun, scsi_result); | 1328 | scsi_result); |
1332 | } | 1329 | } |
1333 | } | 1330 | } |
1334 | if (cmnd && devip) { | 1331 | if (cmnd && devip) { |