[PATCH 1/2] usb/storage: add SCSI ID and LUN to debug output
From: Sven Schnelle
Date: Sun Feb 02 2020 - 05:10:07 EST
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@xxxxxxxxxxxxxx>
---
drivers/usb/storage/debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
}
--
2.24.1