summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/debug.c')
-rw-r--r--drivers/usb/storage/debug.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c
index a2b5526c9fa0..b428129526c1 100644
--- a/drivers/usb/storage/debug.c
+++ b/drivers/usb/storage/debug.c
@@ -150,7 +150,7 @@ void usb_stor_show_command(struct scsi_cmnd *srb)
default: what = "(unknown command)"; break;
}
US_DEBUGP("Command %s (%d bytes)\n", what, srb->cmd_len);
- US_DEBUGP("");
+ US_DEBUGP("bytes: ");
for (i = 0; i < srb->cmd_len && i < 16; i++)
US_DEBUGPX(" %02x", srb->cmnd[i]);
US_DEBUGPX("\n");
@@ -175,3 +175,21 @@ void usb_stor_show_sense(
US_DEBUGPX(what, ascq);
US_DEBUGPX("\n");
}
+
+int usb_stor_dbg(const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int r;
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ r = printk(KERN_DEBUG USB_STORAGE "%pV", &vaf);
+
+ va_end(args);
+
+ return r;
+}
OpenPOWER on IntegriCloud