2021-07-06 18:17:40

by Don Brace

[permalink] [raw]
Subject: [smartpqi updates PATCH 4/9] smartpqi: add SCSI cmd info for resets

From: Murthy Bhat <[email protected]>

Report on SCSI command that has triggered the reset.
- Also add check for 0 length SCSI commands.

Reviewed-by: Kevin Barnett <[email protected]>
Reviewed-by: Mike McGowen <[email protected]>
Reviewed-by: Scott Benesh <[email protected]>
Reviewed-by: Scott Teel <[email protected]>
Signed-off-by: Murthy Bhat <[email protected]>
Signed-off-by: Don Brace <[email protected]>
---
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 5ce1c41a758d..c2ddb66b5c2d 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


2021-07-07 07:38:51

by Paul Menzel

[permalink] [raw]
Subject: Re: [smartpqi updates PATCH 4/9] smartpqi: add SCSI cmd info for resets

Dear Murthy, dear Don,


Am 06.07.21 um 20:16 schrieb Don Brace:
> From: Murthy Bhat <[email protected]>
>
> Report on SCSI command that has triggered the reset.
> - Also add check for 0 length SCSI commands.

Can you please add an example log message line to the git commit message
summary?


Kind regards,

Paul


> Reviewed-by: Kevin Barnett <[email protected]>
> Reviewed-by: Mike McGowen <[email protected]>
> Reviewed-by: Scott Benesh <[email protected]>
> Reviewed-by: Scott Teel <[email protected]>
> Signed-off-by: Murthy Bhat <[email protected]>
> Signed-off-by: Don Brace <[email protected]>
> ---
> 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 5ce1c41a758d..c2ddb66b5c2d 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))
>

2021-07-08 20:21:11

by Don Brace

[permalink] [raw]
Subject: RE: [smartpqi updates PATCH 4/9] smartpqi: add SCSI cmd info for resets

From: Paul Menzel [mailto:[email protected]]
Subject: Re: [smartpqi updates PATCH 4/9] smartpqi: add SCSI cmd info for resets

Dear Murthy, dear Don,


Am 06.07.21 um 20:16 schrieb Don Brace:
> From: Murthy Bhat <[email protected]>
>
> Report on SCSI command that has triggered the reset.
> - Also add check for 0 length SCSI commands.

Can you please add an example log message line to the git commit message summary?

Don: Thanks for your review. I added an example.

Kind regards,

Paul


> Reviewed-by: Kevin Barnett <[email protected]>
> Reviewed-by: Mike McGowen <[email protected]>
> Reviewed-by: Scott Benesh <[email protected]>
> Reviewed-by: Scott Teel <[email protected]>
> Signed-off-by: Murthy Bhat <[email protected]>
> Signed-off-by: Don Brace <[email protected]>
> ---
> 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 5ce1c41a758d..c2ddb66b5c2d 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))
>