summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMahesh Rajashekhara <Mahesh.Rajashekhara@microchip.com>2023-08-24 10:58:11 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2023-08-24 22:54:21 -0400
commite1b919494aa9520c62742b1c59181476520c7863 (patch)
tree82cec441a0e7692d3828e64a5d92c844bf064ba6 /drivers
parent72b737fa73bf6c5c9b702a7ed51ecdccfc99c0d8 (diff)
downloadlwn-e1b919494aa9520c62742b1c59181476520c7863.tar.gz
lwn-e1b919494aa9520c62742b1c59181476520c7863.zip
scsi: smartpqi: Enhance error messages
Add more detail to some TMF messages. Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Link: https://lore.kernel.org/r/20230824155812.789913-8-don.brace@microchip.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index f1b393459f34..e288ba9af1a7 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -6358,10 +6358,8 @@ static int pqi_device_reset_handler(struct pqi_ctrl_info *ctrl_info, struct pqi_
mutex_lock(&ctrl_info->lun_reset_mutex);
dev_err(&ctrl_info->pci_dev->dev,
- "resetting scsi %d:%d:%d:%d due to cmd 0x%02x\n",
- ctrl_info->scsi_host->host_no,
- device->bus, device->target, lun,
- scmd->cmd_len > 0 ? scmd->cmnd[0] : 0xff);
+ "resetting scsi %d:%d:%d:%u SCSI cmd at %p due to cmd opcode 0x%02x\n",
+ ctrl_info->scsi_host->host_no, device->bus, device->target, lun, scmd, scsi_opcode);
pqi_check_ctrl_health(ctrl_info);
if (pqi_ctrl_offline(ctrl_info))
@@ -6415,18 +6413,20 @@ static int pqi_eh_abort_handler(struct scsi_cmnd *scmd)
shost = scmd->device->host;
ctrl_info = shost_to_hba(shost);
+ device = scmd->device->hostdata;
dev_err(&ctrl_info->pci_dev->dev,
- "attempting TASK ABORT on SCSI cmd at %p\n", scmd);
+ "attempting TASK ABORT on scsi %d:%d:%d:%d for SCSI cmd at %p\n",
+ shost->host_no, device->bus, device->target, (int)scmd->device->lun, scmd);
if (cmpxchg(&scmd->host_scribble, PQI_NO_COMPLETION, (void *)&wait) == NULL) {
dev_err(&ctrl_info->pci_dev->dev,
- "SCSI cmd at %p already completed\n", scmd);
+ "scsi %d:%d:%d:%d for SCSI cmd at %p already completed\n",
+ shost->host_no, device->bus, device->target, (int)scmd->device->lun, scmd);
scmd->result = DID_RESET << 16;
goto out;
}
- device = scmd->device->hostdata;
tmf_work = &device->tmf_work[scmd->device->lun];
if (cmpxchg(&tmf_work->scmd, NULL, scmd) == NULL) {
@@ -6440,7 +6440,8 @@ static int pqi_eh_abort_handler(struct scsi_cmnd *scmd)
wait_for_completion(&wait);
dev_err(&ctrl_info->pci_dev->dev,
- "TASK ABORT on SCSI cmd at %p: SUCCESS\n", scmd);
+ "TASK ABORT on scsi %d:%d:%d:%d for SCSI cmd at %p: SUCCESS\n",
+ shost->host_no, device->bus, device->target, (int)scmd->device->lun, scmd);
out: