aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-10-02 12:45:08 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 15:23:02 -0400
commit9ccfc756a70d454dfa82f48897e2883560c01a0e (patch)
tree9a6d3b10b1ec0e5fe7a63252a21598a03e93ad4e /drivers/scsi/scsi_error.c
parent9a41a62b74388827998253d62c58707e63cc5874 (diff)
[SCSI] move the mid-layer printk's over to shost/starget/sdev_printk
This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 52b348c36d56..dd6a9f61bdf1 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -241,11 +241,10 @@ static inline void scsi_eh_prt_fail_stats(struct Scsi_Host *shost,
241 241
242 if (cmd_cancel || cmd_failed) { 242 if (cmd_cancel || cmd_failed) {
243 SCSI_LOG_ERROR_RECOVERY(3, 243 SCSI_LOG_ERROR_RECOVERY(3,
244 printk("%s: %d:%d:%d:%d cmds failed: %d," 244 sdev_printk(KERN_INFO, sdev,
245 " cancel: %d\n", 245 "%s: cmds failed: %d, cancel: %d\n",
246 __FUNCTION__, shost->host_no, 246 __FUNCTION__, cmd_failed,
247 sdev->channel, sdev->id, sdev->lun, 247 cmd_cancel));
248 cmd_failed, cmd_cancel));
249 cmd_cancel = 0; 248 cmd_cancel = 0;
250 cmd_failed = 0; 249 cmd_failed = 0;
251 ++devices_failed; 250 ++devices_failed;
@@ -1174,13 +1173,9 @@ static void scsi_eh_offline_sdevs(struct list_head *work_q,
1174 struct scsi_cmnd *scmd, *next; 1173 struct scsi_cmnd *scmd, *next;
1175 1174
1176 list_for_each_entry_safe(scmd, next, work_q, eh_entry) { 1175 list_for_each_entry_safe(scmd, next, work_q, eh_entry) {
1177 printk(KERN_INFO "scsi: Device offlined - not" 1176 sdev_printk(KERN_INFO, scmd->device,
1178 " ready after error recovery: host" 1177 "scsi: Device offlined - not"
1179 " %d channel %d id %d lun %d\n", 1178 " ready after error recovery\n");
1180 scmd->device->host->host_no,
1181 scmd->device->channel,
1182 scmd->device->id,
1183 scmd->device->lun);
1184 scsi_device_set_state(scmd->device, SDEV_OFFLINE); 1179 scsi_device_set_state(scmd->device, SDEV_OFFLINE);
1185 if (scmd->eh_eflags & SCSI_EH_CANCEL_CMD) { 1180 if (scmd->eh_eflags & SCSI_EH_CANCEL_CMD) {
1186 /* 1181 /*
@@ -1342,10 +1337,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
1342 return SUCCESS; 1337 return SUCCESS;
1343 1338
1344 case RESERVATION_CONFLICT: 1339 case RESERVATION_CONFLICT:
1345 printk(KERN_INFO "scsi: reservation conflict: host" 1340 sdev_printk(KERN_INFO, scmd->device,
1346 " %d channel %d id %d lun %d\n", 1341 "reservation conflict\n");
1347 scmd->device->host->host_no, scmd->device->channel,
1348 scmd->device->id, scmd->device->lun);
1349 return SUCCESS; /* causes immediate i/o error */ 1342 return SUCCESS; /* causes immediate i/o error */
1350 default: 1343 default:
1351 return FAILED; 1344 return FAILED;