[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>
This commit is contained in:
James Bottomley
2005-10-02 11:45:08 -05:00
committed by James Bottomley
parent 9a41a62b74
commit 9ccfc756a7
16 changed files with 96 additions and 119 deletions

View File

@@ -241,11 +241,10 @@ static inline void scsi_eh_prt_fail_stats(struct Scsi_Host *shost,
if (cmd_cancel || cmd_failed) {
SCSI_LOG_ERROR_RECOVERY(3,
printk("%s: %d:%d:%d:%d cmds failed: %d,"
" cancel: %d\n",
__FUNCTION__, shost->host_no,
sdev->channel, sdev->id, sdev->lun,
cmd_failed, cmd_cancel));
sdev_printk(KERN_INFO, sdev,
"%s: cmds failed: %d, cancel: %d\n",
__FUNCTION__, cmd_failed,
cmd_cancel));
cmd_cancel = 0;
cmd_failed = 0;
++devices_failed;
@@ -1174,13 +1173,9 @@ static void scsi_eh_offline_sdevs(struct list_head *work_q,
struct scsi_cmnd *scmd, *next;
list_for_each_entry_safe(scmd, next, work_q, eh_entry) {
printk(KERN_INFO "scsi: Device offlined - not"
" ready after error recovery: host"
" %d channel %d id %d lun %d\n",
scmd->device->host->host_no,
scmd->device->channel,
scmd->device->id,
scmd->device->lun);
sdev_printk(KERN_INFO, scmd->device,
"scsi: Device offlined - not"
" ready after error recovery\n");
scsi_device_set_state(scmd->device, SDEV_OFFLINE);
if (scmd->eh_eflags & SCSI_EH_CANCEL_CMD) {
/*
@@ -1342,10 +1337,8 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
return SUCCESS;
case RESERVATION_CONFLICT:
printk(KERN_INFO "scsi: reservation conflict: host"
" %d channel %d id %d lun %d\n",
scmd->device->host->host_no, scmd->device->channel,
scmd->device->id, scmd->device->lun);
sdev_printk(KERN_INFO, scmd->device,
"reservation conflict\n");
return SUCCESS; /* causes immediate i/o error */
default:
return FAILED;