aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-06-25 10:39:58 -0400
committerChristoph Hellwig <hch@lst.de>2014-07-17 16:07:41 -0400
commite5f73ce3248f724103918b609b6279116c141918 (patch)
tree225577f59cf2dd8163483db40623763c5aba6512 /drivers/scsi/scsi_ioctl.c
parentb30d8bca5b525ba557e2fd0dcad5e6e5a2cc58a7 (diff)
scsi: use dev_printk() variants for ioctl
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_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index d9564fb04f62..1aaaf43c6803 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -91,12 +91,14 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
91 int result; 91 int result;
92 struct scsi_sense_hdr sshdr; 92 struct scsi_sense_hdr sshdr;
93 93
94 SCSI_LOG_IOCTL(1, printk("Trying ioctl with scsi command %d\n", *cmd)); 94 SCSI_LOG_IOCTL(1, sdev_printk(KERN_INFO, sdev,
95 "Trying ioctl with scsi command %d\n", *cmd));
95 96
96 result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0, 97 result = scsi_execute_req(sdev, cmd, DMA_NONE, NULL, 0,
97 &sshdr, timeout, retries, NULL); 98 &sshdr, timeout, retries, NULL);
98 99
99 SCSI_LOG_IOCTL(2, printk("Ioctl returned 0x%x\n", result)); 100 SCSI_LOG_IOCTL(2, sdev_printk(KERN_INFO, sdev,
101 "Ioctl returned 0x%x\n", result));
100 102
101 if ((driver_byte(result) & DRIVER_SENSE) && 103 if ((driver_byte(result) & DRIVER_SENSE) &&
102 (scsi_sense_valid(&sshdr))) { 104 (scsi_sense_valid(&sshdr))) {
@@ -105,9 +107,11 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
105 if (cmd[0] == ALLOW_MEDIUM_REMOVAL) 107 if (cmd[0] == ALLOW_MEDIUM_REMOVAL)
106 sdev->lockable = 0; 108 sdev->lockable = 0;
107 else 109 else
108 printk(KERN_INFO "ioctl_internal_command: " 110 sdev_printk(KERN_INFO, sdev,
109 "ILLEGAL REQUEST asc=0x%x ascq=0x%x\n", 111 "ioctl_internal_command: "
110 sshdr.asc, sshdr.ascq); 112 "ILLEGAL REQUEST "
113 "asc=0x%x ascq=0x%x\n",
114 sshdr.asc, sshdr.ascq);
111 break; 115 break;
112 case NOT_READY: /* This happens if there is no disc in drive */ 116 case NOT_READY: /* This happens if there is no disc in drive */
113 if (sdev->removable) 117 if (sdev->removable)
@@ -127,7 +131,8 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd,
127 } 131 }
128 } 132 }
129 133
130 SCSI_LOG_IOCTL(2, printk("IOCTL Releasing command\n")); 134 SCSI_LOG_IOCTL(2, sdev_printk(KERN_INFO, sdev,
135 "IOCTL Releasing command\n"));
131 return result; 136 return result;
132} 137}
133 138