lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210714182847.50360-6-don.brace@microchip.com>
Date:   Wed, 14 Jul 2021 13:28:43 -0500
From:   Don Brace <don.brace@...rochip.com>
To:     <hch@...radead.org>, <martin.petersen@...cle.com>,
        <jejb@...ux.vnet.ibm.com>, <linux-scsi@...r.kernel.org>
CC:     <Kevin.Barnett@...rochip.com>, <scott.teel@...rochip.com>,
        <Justin.Lindley@...rochip.com>, <scott.benesh@...rochip.com>,
        <gerry.morong@...rochip.com>, <mahesh.rajashekhara@...rochip.com>,
        <mike.mcgowen@...rochip.com>, <murthy.bhat@...rochip.com>,
        <balsundar.p@...rochip.com>, <joseph.szczypek@....com>,
        <jeff@...onical.com>, <POSWALD@...e.com>,
        <john.p.donnelly@...cle.com>, <mwilck@...e.com>,
        <pmenzel@...gen.mpg.de>, <linux-kernel@...r.kernel.org>
Subject: [smartpqi updates V3 PATCH 5/9] smartpqi: add SCSI cmd info for resets

From: Murthy Bhat <Murthy.Bhat@...rochip.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@...rochip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@...rochip.com>
Reviewed-by: Scott Benesh <scott.benesh@...rochip.com>
Reviewed-by: Scott Teel <scott.teel@...rochip.com>
Signed-off-by: Murthy Bhat <Murthy.Bhat@...rochip.com>
Signed-off-by: Don Brace <don.brace@...rochip.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ