lkml.org 
[lkml]   [2021]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [smartpqi updates V2 PATCH 5/9] smartpqi: add SCSI cmd info for resets
From
Date
On 7/13/21 4:02 PM, Don Brace wrote:
> From: Murthy Bhat <Murthy.Bhat@microchip.com>
>
> 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 <kevin.barnett@microchip.com>
> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
> Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
> Reviewed-by: Scott Teel <scott.teel@microchip.com>
> Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com>
> Signed-off-by: Don Brace <don.brace@microchip.com>

John Donnelly <john.p.donnelly@oracle.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))
>

\
 
 \ /
  Last update: 2021-07-14 03:16    [W:0.386 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site