[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

@@ -410,9 +410,7 @@ void scsi_log_send(struct scsi_cmnd *cmd)
SCSI_LOG_MLQUEUE_BITS);
if (level > 1) {
sdev = cmd->device;
printk(KERN_INFO "scsi <%d:%d:%d:%d> send ",
sdev->host->host_no, sdev->channel, sdev->id,
sdev->lun);
sdev_printk(KERN_INFO, sdev, "send ");
if (level > 2)
printk("0x%p ", cmd);
/*
@@ -456,9 +454,7 @@ void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
if (((level > 0) && (cmd->result || disposition != SUCCESS)) ||
(level > 1)) {
sdev = cmd->device;
printk(KERN_INFO "scsi <%d:%d:%d:%d> done ",
sdev->host->host_no, sdev->channel, sdev->id,
sdev->lun);
sdev_printk(KERN_INFO, sdev, "done ");
if (level > 2)
printk("0x%p ", cmd);
/*
@@ -810,9 +806,9 @@ static void scsi_softirq(struct softirq_action *h)
disposition = scsi_decide_disposition(cmd);
if (disposition != SUCCESS &&
time_before(cmd->jiffies_at_alloc + wait_for, jiffies)) {
dev_printk(KERN_ERR, &cmd->device->sdev_gendev,
"timing out command, waited %lus\n",
wait_for/HZ);
sdev_printk(KERN_ERR, cmd->device,
"timing out command, waited %lus\n",
wait_for/HZ);
disposition = SUCCESS;
}
@@ -970,10 +966,9 @@ void scsi_adjust_queue_depth(struct scsi_device *sdev, int tagged, int tags)
sdev->simple_tags = 1;
break;
default:
printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
"scsi_adjust_queue_depth, bad queue type, "
"disabled\n", sdev->host->host_no,
sdev->channel, sdev->id, sdev->lun);
sdev_printk(KERN_WARNING, sdev,
"scsi_adjust_queue_depth, bad queue type, "
"disabled\n");
case 0:
sdev->ordered_tags = sdev->simple_tags = 0;
sdev->queue_depth = tags;