diff options
author | Cho, Yu-Chen <acho@novell.com> | 2011-04-01 02:38:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-20 16:55:02 -0400 |
commit | beddfe8428443e800d0180c52fe2913717ecfb2d (patch) | |
tree | 49554d16f4b92c86b42d43d903af94ae96b75f42 /drivers/staging/keucr | |
parent | 615df84151368f8a2f96f4ffcdb49b05ece8e2a2 (diff) |
staging/keucr: scsiglue use pr_<level> for messages
scsiglue.c use pr_<level> for messages
Signed-off-by: Cho, Yu-Chen <acho@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/keucr')
-rw-r--r-- | drivers/staging/keucr/scsiglue.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/staging/keucr/scsiglue.c b/drivers/staging/keucr/scsiglue.c index da4f42af383..5e35d94c6a1 100644 --- a/drivers/staging/keucr/scsiglue.c +++ b/drivers/staging/keucr/scsiglue.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
2 | |||
1 | #include <linux/slab.h> | 3 | #include <linux/slab.h> |
2 | #include <linux/module.h> | 4 | #include <linux/module.h> |
3 | #include <linux/mutex.h> | 5 | #include <linux/mutex.h> |
@@ -16,7 +18,7 @@ | |||
16 | //----- host_info() --------------------- | 18 | //----- host_info() --------------------- |
17 | static const char* host_info(struct Scsi_Host *host) | 19 | static const char* host_info(struct Scsi_Host *host) |
18 | { | 20 | { |
19 | //printk("scsiglue --- host_info\n"); | 21 | /* pr_info("scsiglue --- host_info\n"); */ |
20 | return "SCSI emulation for USB Mass Storage devices"; | 22 | return "SCSI emulation for USB Mass Storage devices"; |
21 | } | 23 | } |
22 | 24 | ||
@@ -25,7 +27,7 @@ static int slave_alloc(struct scsi_device *sdev) | |||
25 | { | 27 | { |
26 | struct us_data *us = host_to_us(sdev->host); | 28 | struct us_data *us = host_to_us(sdev->host); |
27 | 29 | ||
28 | //printk("scsiglue --- slave_alloc\n"); | 30 | /* pr_info("scsiglue --- slave_alloc\n"); */ |
29 | sdev->inquiry_len = 36; | 31 | sdev->inquiry_len = 36; |
30 | 32 | ||
31 | blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1)); | 33 | blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1)); |
@@ -41,7 +43,7 @@ static int slave_configure(struct scsi_device *sdev) | |||
41 | { | 43 | { |
42 | struct us_data *us = host_to_us(sdev->host); | 44 | struct us_data *us = host_to_us(sdev->host); |
43 | 45 | ||
44 | //printk("scsiglue --- slave_configure\n"); | 46 | /* pr_info("scsiglue --- slave_configure\n"); */ |
45 | if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) | 47 | if (us->fflags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) |
46 | { | 48 | { |
47 | unsigned int max_sectors = 64; | 49 | unsigned int max_sectors = 64; |
@@ -91,19 +93,20 @@ static int queuecommand_lck(struct scsi_cmnd *srb, void (*done)(struct scsi_cmnd | |||
91 | { | 93 | { |
92 | struct us_data *us = host_to_us(srb->device->host); | 94 | struct us_data *us = host_to_us(srb->device->host); |
93 | 95 | ||
94 | //printk("scsiglue --- queuecommand\n"); | 96 | /* pr_info("scsiglue --- queuecommand\n"); */ |
95 | 97 | ||
96 | /* check for state-transition errors */ | 98 | /* check for state-transition errors */ |
97 | if (us->srb != NULL) | 99 | if (us->srb != NULL) |
98 | { | 100 | { |
99 | printk("Error in %s: us->srb = %p\n", __FUNCTION__, us->srb); | 101 | /* pr_info("Error in %s: us->srb = %p\n" |
102 | __FUNCTION__, us->srb); */ | ||
100 | return SCSI_MLQUEUE_HOST_BUSY; | 103 | return SCSI_MLQUEUE_HOST_BUSY; |
101 | } | 104 | } |
102 | 105 | ||
103 | /* fail the command if we are disconnecting */ | 106 | /* fail the command if we are disconnecting */ |
104 | if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) | 107 | if (test_bit(US_FLIDX_DISCONNECTING, &us->dflags)) |
105 | { | 108 | { |
106 | printk("Fail command during disconnect\n"); | 109 | pr_info("Fail command during disconnect\n"); |
107 | srb->result = DID_NO_CONNECT << 16; | 110 | srb->result = DID_NO_CONNECT << 16; |
108 | done(srb); | 111 | done(srb); |
109 | return 0; | 112 | return 0; |
@@ -129,7 +132,7 @@ static int command_abort(struct scsi_cmnd *srb) | |||
129 | { | 132 | { |
130 | struct us_data *us = host_to_us(srb->device->host); | 133 | struct us_data *us = host_to_us(srb->device->host); |
131 | 134 | ||
132 | //printk("scsiglue --- command_abort\n"); | 135 | /* pr_info("scsiglue --- command_abort\n"); */ |
133 | 136 | ||
134 | scsi_lock(us_to_host(us)); | 137 | scsi_lock(us_to_host(us)); |
135 | if (us->srb != srb) | 138 | if (us->srb != srb) |
@@ -159,7 +162,7 @@ static int device_reset(struct scsi_cmnd *srb) | |||
159 | struct us_data *us = host_to_us(srb->device->host); | 162 | struct us_data *us = host_to_us(srb->device->host); |
160 | int result; | 163 | int result; |
161 | 164 | ||
162 | //printk("scsiglue --- device_reset\n"); | 165 | /* pr_info("scsiglue --- device_reset\n"); */ |
163 | 166 | ||
164 | /* lock the device pointers and do the reset */ | 167 | /* lock the device pointers and do the reset */ |
165 | mutex_lock(&(us->dev_mutex)); | 168 | mutex_lock(&(us->dev_mutex)); |
@@ -175,7 +178,7 @@ static int bus_reset(struct scsi_cmnd *srb) | |||
175 | struct us_data *us = host_to_us(srb->device->host); | 178 | struct us_data *us = host_to_us(srb->device->host); |
176 | int result; | 179 | int result; |
177 | 180 | ||
178 | //printk("scsiglue --- bus_reset\n"); | 181 | /* pr_info("scsiglue --- bus_reset\n"); */ |
179 | result = usb_stor_port_reset(us); | 182 | result = usb_stor_port_reset(us); |
180 | return result < 0 ? FAILED : SUCCESS; | 183 | return result < 0 ? FAILED : SUCCESS; |
181 | } | 184 | } |
@@ -186,7 +189,7 @@ void usb_stor_report_device_reset(struct us_data *us) | |||
186 | int i; | 189 | int i; |
187 | struct Scsi_Host *host = us_to_host(us); | 190 | struct Scsi_Host *host = us_to_host(us); |
188 | 191 | ||
189 | //printk("scsiglue --- usb_stor_report_device_reset\n"); | 192 | /* pr_info("scsiglue --- usb_stor_report_device_reset\n"); */ |
190 | scsi_report_device_reset(host, 0, 0); | 193 | scsi_report_device_reset(host, 0, 0); |
191 | if (us->fflags & US_FL_SCM_MULT_TARG) | 194 | if (us->fflags & US_FL_SCM_MULT_TARG) |
192 | { | 195 | { |
@@ -200,7 +203,7 @@ void usb_stor_report_bus_reset(struct us_data *us) | |||
200 | { | 203 | { |
201 | struct Scsi_Host *host = us_to_host(us); | 204 | struct Scsi_Host *host = us_to_host(us); |
202 | 205 | ||
203 | //printk("scsiglue --- usb_stor_report_bus_reset\n"); | 206 | /* pr_info("scsiglue --- usb_stor_report_bus_reset\n"); */ |
204 | scsi_lock(host); | 207 | scsi_lock(host); |
205 | scsi_report_bus_reset(host, 0); | 208 | scsi_report_bus_reset(host, 0); |
206 | scsi_unlock(host); | 209 | scsi_unlock(host); |
@@ -222,7 +225,7 @@ static int proc_info (struct Scsi_Host *host, char *buffer, char **start, off_t | |||
222 | char *pos = buffer; | 225 | char *pos = buffer; |
223 | const char *string; | 226 | const char *string; |
224 | 227 | ||
225 | //printk("scsiglue --- proc_info\n"); | 228 | /* pr_info("scsiglue --- proc_info\n"); */ |
226 | if (inout) | 229 | if (inout) |
227 | return length; | 230 | return length; |
228 | 231 | ||
@@ -288,7 +291,7 @@ static ssize_t show_max_sectors(struct device *dev, struct device_attribute *att | |||
288 | { | 291 | { |
289 | struct scsi_device *sdev = to_scsi_device(dev); | 292 | struct scsi_device *sdev = to_scsi_device(dev); |
290 | 293 | ||
291 | //printk("scsiglue --- ssize_t show_max_sectors\n"); | 294 | /* pr_info("scsiglue --- ssize_t show_max_sectors\n"); */ |
292 | return sprintf(buf, "%u\n", queue_max_sectors(sdev->request_queue)); | 295 | return sprintf(buf, "%u\n", queue_max_sectors(sdev->request_queue)); |
293 | } | 296 | } |
294 | 297 | ||
@@ -299,7 +302,7 @@ static ssize_t store_max_sectors(struct device *dev, struct device_attribute *at | |||
299 | struct scsi_device *sdev = to_scsi_device(dev); | 302 | struct scsi_device *sdev = to_scsi_device(dev); |
300 | unsigned short ms; | 303 | unsigned short ms; |
301 | 304 | ||
302 | //printk("scsiglue --- ssize_t store_max_sectors\n"); | 305 | /* pr_info("scsiglue --- ssize_t store_max_sectors\n"); */ |
303 | if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) | 306 | if (sscanf(buf, "%hu", &ms) > 0 && ms <= SCSI_DEFAULT_MAX_SECTORS) |
304 | { | 307 | { |
305 | blk_queue_max_hw_sectors(sdev->request_queue, ms); | 308 | blk_queue_max_hw_sectors(sdev->request_queue, ms); |
@@ -383,7 +386,7 @@ unsigned int usb_stor_access_xfer_buf(struct us_data *us, unsigned char *buffer, | |||
383 | { | 386 | { |
384 | unsigned int cnt; | 387 | unsigned int cnt; |
385 | 388 | ||
386 | //printk("transport --- usb_stor_access_xfer_buf\n"); | 389 | /* pr_info("transport --- usb_stor_access_xfer_buf\n"); */ |
387 | struct scatterlist *sg = *sgptr; | 390 | struct scatterlist *sg = *sgptr; |
388 | 391 | ||
389 | if (!sg) | 392 | if (!sg) |
@@ -441,7 +444,7 @@ void usb_stor_set_xfer_buf(struct us_data *us, unsigned char *buffer, unsigned i | |||
441 | unsigned int offset = 0; | 444 | unsigned int offset = 0; |
442 | struct scatterlist *sg = NULL; | 445 | struct scatterlist *sg = NULL; |
443 | 446 | ||
444 | //printk("transport --- usb_stor_set_xfer_buf\n"); | 447 | /* pr_info("transport --- usb_stor_set_xfer_buf\n"); */ |
445 | // TO_XFER_BUF = 0, FROM_XFER_BUF = 1 | 448 | // TO_XFER_BUF = 0, FROM_XFER_BUF = 1 |
446 | buflen = min(buflen, scsi_bufflen(srb)); | 449 | buflen = min(buflen, scsi_bufflen(srb)); |
447 | buflen = usb_stor_access_xfer_buf(us, buffer, buflen, srb, &sg, &offset, dir); | 450 | buflen = usb_stor_access_xfer_buf(us, buffer, buflen, srb, &sg, &offset, dir); |