public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: smartpqi_init: Reporting 'logical unit failure'
@ 2019-02-27 16:31 Erwan Velu
  2019-02-28 13:09 ` Erwan Velu
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Erwan Velu @ 2019-02-27 16:31 UTC (permalink / raw)
  Cc: Erwan Velu, Don Brace, James E.J. Bottomley, Martin K. Petersen,
	open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi),
	open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi),
	open list

When this HARDWARE_ERROR/0x3e/0x1 case is triggered, the logical volume is offlined.
When reading the kernel log, the cause why the device got offlined isn't reported to the user.
This situation makes difficult for admins to estimate _why_ the volume got offlined.
Reading this part of the code makes clear this is because driver received a HARDWARE_ERROR/0x3e/0x1 which is a 'logical unit failure'.

This patch is just about reporting that fact to help admins making a relationship between this event and the offlining.

Signed-off-by: Erwan Velu <e.velu@criteo.com>
---
 drivers/scsi/smartpqi/smartpqi_init.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index f564af8949e8..89f37d76735c 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2764,6 +2764,12 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
 				sshdr.sense_key == HARDWARE_ERROR &&
 				sshdr.asc == 0x3e &&
 				sshdr.ascq == 0x1) {
+			struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
+			struct pqi_scsi_dev *device = scmd->device->hostdata;
+
+			dev_err(&ctrl_info->pci_dev->dev, "received 'logical unit failure' from controller for scsi %d:%d:%d:%d\n",
+							ctrl_info->scsi_host->host_no, device->bus,
+							device->target, device->lun);
 			pqi_take_device_offline(scmd->device, "RAID");
 			host_byte = DID_NO_CONNECT;
 		}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-03-11 16:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 16:31 [PATCH] scsi: smartpqi_init: Reporting 'logical unit failure' Erwan Velu
2019-02-28 13:09 ` Erwan Velu
2019-02-28 20:03 ` Elliott, Robert (Persistent Memory)
2019-03-01 14:59   ` Erwan Velu
2019-03-01 14:58 ` [PATCH v2] " Erwan Velu
2019-03-01 15:26   ` James Bottomley
2019-03-01 15:43     ` Erwan Velu
2019-03-01 15:56       ` James Bottomley
2019-03-01 16:00         ` Erwan Velu
2019-03-01 16:08         ` [PATCH v3] " Erwan Velu
2019-03-05 22:30           ` Don.Brace
2019-03-06 17:34           ` Martin K. Petersen
2019-03-11 16:36             ` Erwan Velu
2019-03-11 16:43             ` Erwan Velu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox