scsi: use dev_printk variants where possible
Using dev_printk variants prefixes the logging message with the originating device, which makes debugging easier. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
此提交包含在:
@@ -655,7 +655,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
|
||||
/* Check to see if the scsi lld made this device blocked. */
|
||||
if (unlikely(scsi_device_blocked(cmd->device))) {
|
||||
/*
|
||||
/*
|
||||
* in blocked state, the command is just put back on
|
||||
* the device queue. The suspend state has already
|
||||
* blocked the queue so future requests should not
|
||||
@@ -665,7 +665,8 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
|
||||
scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
|
||||
|
||||
SCSI_LOG_MLQUEUE(3, printk("queuecommand : device blocked \n"));
|
||||
SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
|
||||
"queuecommand : device blocked\n"));
|
||||
|
||||
/*
|
||||
* NOTE: rtn is still zero here because we don't need the
|
||||
@@ -674,7 +675,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* If SCSI-2 or lower, store the LUN value in cmnd.
|
||||
*/
|
||||
if (cmd->device->scsi_level <= SCSI_2 &&
|
||||
@@ -690,8 +691,8 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
* length exceeds what the host adapter can handle.
|
||||
*/
|
||||
if (cmd->cmd_len > cmd->device->host->max_cmd_len) {
|
||||
SCSI_LOG_MLQUEUE(3,
|
||||
printk("queuecommand : command too long. "
|
||||
SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
|
||||
"queuecommand : command too long. "
|
||||
"cdb_size=%d host->max_cmd_len=%d\n",
|
||||
cmd->cmd_len, cmd->device->host->max_cmd_len));
|
||||
cmd->result = (DID_ABORT << 16);
|
||||
@@ -715,14 +716,13 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
|
||||
rtn != SCSI_MLQUEUE_TARGET_BUSY)
|
||||
rtn = SCSI_MLQUEUE_HOST_BUSY;
|
||||
|
||||
scsi_queue_insert(cmd, rtn);
|
||||
SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
|
||||
"queuecommand : request rejected\n"));
|
||||
|
||||
SCSI_LOG_MLQUEUE(3,
|
||||
printk("queuecommand : request rejected\n"));
|
||||
scsi_queue_insert(cmd, rtn);
|
||||
}
|
||||
|
||||
out:
|
||||
SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n"));
|
||||
return rtn;
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者