Thread (11 messages) 11 messages, 2 authors, 2021-07-24
STALE1810d LANDED: 4 (0M)
Revisions (18)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]
  6. v1 [diff vs current]
  7. v2 [diff vs current]
  8. v3 current
  9. v1 [diff vs current]
  10. v2 [diff vs current]
  11. v1 [diff vs current]
  12. v2 [diff vs current]
  13. v1 [diff vs current]
  14. v1 [diff vs current]
  15. v2 [diff vs current]
  16. v1 [diff vs current]
  17. v1 [diff vs current]
  18. v1 [diff vs current]

[smartpqi updates V3 PATCH 5/9] smartpqi: add SCSI cmd info for resets

From: Don Brace <don.brace@microchip.com>
Date: 2021-07-14 18:29:05
Also in: lkml
Subsystem: microsemi smart array smartpqi driver (smartpqi), scsi subsystem, the rest · Maintainers: Don Brace, "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

From: Murthy Bhat <redacted>

Report on SCSI command that has triggered the reset.
 - Also add check for NULL SCSI commands resulting from
   issuing sg_reset when there is no outstanding commands.

   Example:
   sg_reset -d /dev/sgXY
   smartpqi 0000:39:00.0: resetting scsi 4:0:1:0 due to cmd 0x12

Reviewed-by: Kevin Barnett <redacted>
Reviewed-by: Mike McGowen <redacted>
Reviewed-by: Scott Benesh <redacted>
Reviewed-by: Scott Teel <redacted>
Signed-off-by: Murthy Bhat <redacted>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 29382b290243..ffc7ca221e27 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6033,8 +6033,10 @@ static int pqi_eh_device_reset_handler(struct scsi_cmnd *scmd)
 	mutex_lock(&ctrl_info->lun_reset_mutex);
 
 	dev_err(&ctrl_info->pci_dev->dev,
-		"resetting scsi %d:%d:%d:%d\n",
-		shost->host_no, device->bus, device->target, device->lun);
+		"resetting scsi %d:%d:%d:%d due to cmd 0x%02x\n",
+		shost->host_no,
+		device->bus, device->target, device->lun,
+		scmd->cmd_len > 0 ? scmd->cmnd[0] : 0xff);
 
 	pqi_check_ctrl_health(ctrl_info);
 	if (pqi_ctrl_offline(ctrl_info))
-- 
2.28.0.rc1.9.ge7ae437ac1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help