aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-06-25 10:39:59 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-17 16:07:42 -0400
commit91921e016a2199e7afe5933c94bd9f723d946598 (patch)
treed8b64fe4264d08caa42469c6b0f5a9882fc3ace3 /drivers/scsi/scsi.c
parente5f73ce3248f724103918b609b6279116c141918 (diff)
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>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index bff351b526cf..ce5b4e5e7a5a 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -655,7 +655,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
655 655
656 /* Check to see if the scsi lld made this device blocked. */ 656 /* Check to see if the scsi lld made this device blocked. */
657 if (unlikely(scsi_device_blocked(cmd->device))) { 657 if (unlikely(scsi_device_blocked(cmd->device))) {
658 /* 658 /*
659 * in blocked state, the command is just put back on 659 * in blocked state, the command is just put back on
660 * the device queue. The suspend state has already 660 * the device queue. The suspend state has already
661 * blocked the queue so future requests should not 661 * blocked the queue so future requests should not
@@ -665,7 +665,8 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
665 665
666 scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY); 666 scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
667 667
668 SCSI_LOG_MLQUEUE(3, printk("queuecommand : device blocked \n")); 668 SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
669 "queuecommand : device blocked\n"));
669 670
670 /* 671 /*
671 * NOTE: rtn is still zero here because we don't need the 672 * NOTE: rtn is still zero here because we don't need the
@@ -674,7 +675,7 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
674 goto out; 675 goto out;
675 } 676 }
676 677
677 /* 678 /*
678 * If SCSI-2 or lower, store the LUN value in cmnd. 679 * If SCSI-2 or lower, store the LUN value in cmnd.
679 */ 680 */
680 if (cmd->device->scsi_level <= SCSI_2 && 681 if (cmd->device->scsi_level <= SCSI_2 &&
@@ -690,8 +691,8 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
690 * length exceeds what the host adapter can handle. 691 * length exceeds what the host adapter can handle.
691 */ 692 */
692 if (cmd->cmd_len > cmd->device->host->max_cmd_len) { 693 if (cmd->cmd_len > cmd->device->host->max_cmd_len) {
693 SCSI_LOG_MLQUEUE(3, 694 SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
694 printk("queuecommand : command too long. " 695 "queuecommand : command too long. "
695 "cdb_size=%d host->max_cmd_len=%d\n", 696 "cdb_size=%d host->max_cmd_len=%d\n",
696 cmd->cmd_len, cmd->device->host->max_cmd_len)); 697 cmd->cmd_len, cmd->device->host->max_cmd_len));
697 cmd->result = (DID_ABORT << 16); 698 cmd->result = (DID_ABORT << 16);
@@ -715,14 +716,13 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
715 rtn != SCSI_MLQUEUE_TARGET_BUSY) 716 rtn != SCSI_MLQUEUE_TARGET_BUSY)
716 rtn = SCSI_MLQUEUE_HOST_BUSY; 717 rtn = SCSI_MLQUEUE_HOST_BUSY;
717 718
718 scsi_queue_insert(cmd, rtn); 719 SCSI_LOG_MLQUEUE(3, scmd_printk(KERN_INFO, cmd,
720 "queuecommand : request rejected\n"));
719 721
720 SCSI_LOG_MLQUEUE(3, 722 scsi_queue_insert(cmd, rtn);
721 printk("queuecommand : request rejected\n"));
722 } 723 }
723 724
724 out: 725 out:
725 SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n"));
726 return rtn; 726 return rtn;
727} 727}
728 728