diff mbox series

[1/2] usb/storage: add SCSI ID and LUN to debug output

Message ID 20200202093750.4439-2-svens@stackframe.org (mailing list archive)
State New, archived
Headers show
Series [1/2] usb/storage: add SCSI ID and LUN to debug output | expand

Commit Message

Sven Schnelle Feb. 2, 2020, 9:37 a.m. UTC
Add the LUN and SCSI ID to the debug output so it is a bit easier to
figure out which device is actually adressed.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
---
 drivers/usb/storage/debug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c
index d7f50b7a079e..4787656b4f4f 100644
--- a/drivers/usb/storage/debug.c
+++ b/drivers/usb/storage/debug.c
@@ -136,7 +136,8 @@  void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb)
 	case WRITE_LONG_2: what = "WRITE_LONG_2"; break;
 	default: what = "(unknown command)"; break;
 	}
-	usb_stor_dbg(us, "Command %s (%d bytes)\n", what, srb->cmd_len);
+	usb_stor_dbg(us, "ID %d:%lld Command %s (%d bytes)\n",
+		srb->device->id, srb->device->lun, what, srb->cmd_len);
 	usb_stor_dbg(us, "bytes: %*ph\n", min_t(int, srb->cmd_len, 16),
 		     (const unsigned char *)srb->cmnd);
 }