* [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
@ 2019-03-21 9:49 ` Erwan Velu
0 siblings, 0 replies; 8+ messages in thread
From: Erwan Velu @ 2019-03-21 9:49 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 a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
This patch is about printing an error message when a non-handled message is received.
This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
Signed-off-by: Erwan Velu <e.velu@criteo.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 75ec43aa8df3..baf16c138800 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2762,16 +2762,25 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
scsi_normalize_sense(error_info->data,
sense_data_length, &sshdr) &&
sshdr.sense_key == HARDWARE_ERROR &&
- sshdr.asc == 0x3e &&
- sshdr.ascq == 0x1) {
+ sshdr.asc == 0x3e) {
struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
struct pqi_scsi_dev *device = scmd->device->hostdata;
- if (printk_ratelimit())
- scmd_printk(KERN_ERR, scmd, "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;
+ switch (sshdr.ascq) {
+ case 0x1: /*LOGICAL UNIT FAILURE */
+ if (printk_ratelimit())
+ scmd_printk(KERN_ERR, scmd, "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;
+ break;
+
+ default: /* See http://www.t10.org/lists/asc-num.htm#ASC_3E */
+ if (printk_ratelimit())
+ scmd_printk(KERN_ERR, scmd, "received unhandled error %d from controller for scsi %d:%d:%d:%d\n",
+ sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
+ break;
+ }
}
if (sense_data_length > SCSI_SENSE_BUFFERSIZE)
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
@ 2019-03-21 9:49 ` Erwan Velu
0 siblings, 0 replies; 8+ messages in thread
From: Erwan Velu @ 2019-03-21 9:49 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 a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
This patch is about printing an error message when a non-handled message is received.
This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
Signed-off-by: Erwan Velu <e.velu@criteo.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 75ec43aa8df3..baf16c138800 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2762,16 +2762,25 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
scsi_normalize_sense(error_info->data,
sense_data_length, &sshdr) &&
sshdr.sense_key == HARDWARE_ERROR &&
- sshdr.asc == 0x3e &&
- sshdr.ascq == 0x1) {
+ sshdr.asc == 0x3e) {
struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
struct pqi_scsi_dev *device = scmd->device->hostdata;
- if (printk_ratelimit())
- scmd_printk(KERN_ERR, scmd, "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;
+ switch (sshdr.ascq) {
+ case 0x1: /*LOGICAL UNIT FAILURE */
+ if (printk_ratelimit())
+ scmd_printk(KERN_ERR, scmd, "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;
+ break;
+
+ default: /* See http://www.t10.org/lists/asc-num.htm#ASC_3E */
+ if (printk_ratelimit())
+ scmd_printk(KERN_ERR, scmd, "received unhandled error %d from controller for scsi %d:%d:%d:%d\n",
+ sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
+ break;
+ }
}
if (sense_data_length > SCSI_SENSE_BUFFERSIZE)
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
2019-03-21 9:49 ` Erwan Velu
@ 2019-04-10 11:02 ` Erwan Velu
-1 siblings, 0 replies; 8+ messages in thread
From: Erwan Velu @ 2019-04-10 11:02 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
Hi there !
Any reactions to this one ? I didn't got a single comment.
Cheers,
Erwan,
Le jeu. 21 mars 2019 à 10:49, Erwan Velu <erwanaliasr1@gmail.com> a écrit :
>
> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
>
> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
>
> This patch is about printing an error message when a non-handled message is received.
> This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
>
> This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
>
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> ---
> drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
> index 75ec43aa8df3..baf16c138800 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -2762,16 +2762,25 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
> scsi_normalize_sense(error_info->data,
> sense_data_length, &sshdr) &&
> sshdr.sense_key == HARDWARE_ERROR &&
> - sshdr.asc == 0x3e &&
> - sshdr.ascq == 0x1) {
> + sshdr.asc == 0x3e) {
> struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
> struct pqi_scsi_dev *device = scmd->device->hostdata;
>
> - if (printk_ratelimit())
> - scmd_printk(KERN_ERR, scmd, "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;
> + switch (sshdr.ascq) {
> + case 0x1: /*LOGICAL UNIT FAILURE */
> + if (printk_ratelimit())
> + scmd_printk(KERN_ERR, scmd, "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;
> + break;
> +
> + default: /* See http://www.t10.org/lists/asc-num.htm#ASC_3E */
> + if (printk_ratelimit())
> + scmd_printk(KERN_ERR, scmd, "received unhandled error %d from controller for scsi %d:%d:%d:%d\n",
> + sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
> + break;
> + }
> }
>
> if (sense_data_length > SCSI_SENSE_BUFFERSIZE)
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
@ 2019-04-10 11:02 ` Erwan Velu
0 siblings, 0 replies; 8+ messages in thread
From: Erwan Velu @ 2019-04-10 11:02 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
Hi there !
Any reactions to this one ? I didn't got a single comment.
Cheers,
Erwan,
Le jeu. 21 mars 2019 à 10:49, Erwan Velu <erwanaliasr1@gmail.com> a écrit :
>
> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
>
> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
>
> This patch is about printing an error message when a non-handled message is received.
> This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
>
> This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
>
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> ---
> drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
> index 75ec43aa8df3..baf16c138800 100644
> --- a/drivers/scsi/smartpqi/smartpqi_init.c
> +++ b/drivers/scsi/smartpqi/smartpqi_init.c
> @@ -2762,16 +2762,25 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
> scsi_normalize_sense(error_info->data,
> sense_data_length, &sshdr) &&
> sshdr.sense_key == HARDWARE_ERROR &&
> - sshdr.asc == 0x3e &&
> - sshdr.ascq == 0x1) {
> + sshdr.asc == 0x3e) {
> struct pqi_ctrl_info *ctrl_info = shost_to_hba(scmd->device->host);
> struct pqi_scsi_dev *device = scmd->device->hostdata;
>
> - if (printk_ratelimit())
> - scmd_printk(KERN_ERR, scmd, "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;
> + switch (sshdr.ascq) {
> + case 0x1: /*LOGICAL UNIT FAILURE */
> + if (printk_ratelimit())
> + scmd_printk(KERN_ERR, scmd, "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;
> + break;
> +
> + default: /* See http://www.t10.org/lists/asc-num.htm#ASC_3E */
> + if (printk_ratelimit())
> + scmd_printk(KERN_ERR, scmd, "received unhandled error %d from controller for scsi %d:%d:%d:%d\n",
> + sshdr.ascq, ctrl_info->scsi_host->host_no, device->bus, device->target, device->lun);
> + break;
> + }
> }
>
> if (sense_data_length > SCSI_SENSE_BUFFERSIZE)
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
2019-04-10 11:02 ` Erwan Velu
@ 2019-05-01 14:22 ` Don.Brace
-1 siblings, 0 replies; 8+ messages in thread
From: Don.Brace @ 2019-05-01 14:22 UTC (permalink / raw)
To: erwanaliasr1
Cc: e.velu, don.brace, jejb, martin.petersen, esc.storagedev,
linux-scsi, linux-kernel
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Erwan Velu
Sent: Wednesday, April 10, 2019 6:03 AM
Cc: Erwan Velu <e.velu@criteo.com>; Don Brace <don.brace@microsemi.com>; James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>; open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) <esc.storagedev@microsemi.com>; open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) <linux-scsi@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
Hi there !
Any reactions to this one ? I didn't got a single comment.
Cheers,
Erwan,
Le jeu. 21 mars 2019 à 10:49, Erwan Velu <erwanaliasr1@gmail.com> a écrit :
>
> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
>
> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
>
> This patch is about printing an error message when a non-handled message is received.
> This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
>
> This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
>
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
Acked-by: Don Brace <don.brace@microsemi.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
@ 2019-05-01 14:22 ` Don.Brace
0 siblings, 0 replies; 8+ messages in thread
From: Don.Brace @ 2019-05-01 14:22 UTC (permalink / raw)
To: erwanaliasr1
Cc: e.velu, don.brace, jejb, martin.petersen, esc.storagedev,
linux-scsi, linux-kernel
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Erwan Velu
Sent: Wednesday, April 10, 2019 6:03 AM
Cc: Erwan Velu <e.velu@criteo.com>; Don Brace <don.brace@microsemi.com>; James E.J. Bottomley <jejb@linux.ibm.com>; Martin K. Petersen <martin.petersen@oracle.com>; open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) <esc.storagedev@microsemi.com>; open list:MICROSEMI SMART ARRAY SMARTPQI DRIVER (smartpqi) <linux-scsi@vger.kernel.org>; open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
Hi there !
Any reactions to this one ? I didn't got a single comment.
Cheers,
Erwan,
Le jeu. 21 mars 2019 à 10:49, Erwan Velu <erwanaliasr1@gmail.com> a écrit :
>
> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is only considering the case where ascq=0x1.
>
> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E specification, other values may occur like a timeout (ascq=0x2).
>
> This patch is about printing an error message when a non-handled message is received.
> This could help diagnose a possible miss-behavior of the controller and/or a missing implementation in the Linux Kernel.
>
> This patch keeps the exact same error handling but prints a message if an ascq != 1 income.
>
> Signed-off-by: Erwan Velu <e.velu@criteo.com>
Acked-by: Don Brace <don.brace@microsemi.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
2019-05-01 14:22 ` Don.Brace
@ 2019-05-14 0:30 ` Martin K. Petersen
-1 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2019-05-14 0:30 UTC (permalink / raw)
To: Don.Brace
Cc: erwanaliasr1, e.velu, don.brace, jejb, martin.petersen,
esc.storagedev, linux-scsi, linux-kernel
>> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is
>> only considering the case where ascq=0x1.
>>
>> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E
>> specification, other values may occur like a timeout (ascq=0x2).
>>
>> This patch is about printing an error message when a non-handled
>> message is received. This could help diagnose a possible
>> miss-behavior of the controller and/or a missing implementation in
>> the Linux Kernel.
>>
>> This patch keeps the exact same error handling but prints a message
>> if an ascq != 1 income.
>>
>> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> Acked-by: Don Brace <don.brace@microsemi.com>
Applied to 5.2/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors
@ 2019-05-14 0:30 ` Martin K. Petersen
0 siblings, 0 replies; 8+ messages in thread
From: Martin K. Petersen @ 2019-05-14 0:30 UTC (permalink / raw)
To: Don.Brace
Cc: erwanaliasr1, e.velu, don.brace, jejb, martin.petersen,
esc.storagedev, linux-scsi, linux-kernel
>> When a HARDWARE_ERROR is triggered for asc=0x3e, the actual code is
>> only considering the case where ascq=0x1.
>>
>> Following the http://www.t10.org/lists/asc-num.htm#ASC_3E
>> specification, other values may occur like a timeout (ascq=0x2).
>>
>> This patch is about printing an error message when a non-handled
>> message is received. This could help diagnose a possible
>> miss-behavior of the controller and/or a missing implementation in
>> the Linux Kernel.
>>
>> This patch keeps the exact same error handling but prints a message
>> if an ascq != 1 income.
>>
>> Signed-off-by: Erwan Velu <e.velu@criteo.com>
> Acked-by: Don Brace <don.brace@microsemi.com>
Applied to 5.2/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-05-14 0:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 9:49 [PATCH] scsi: smartpqi: Reporting unhandled SCSI errors Erwan Velu
2019-03-21 9:49 ` Erwan Velu
2019-04-10 11:02 ` Erwan Velu
2019-04-10 11:02 ` Erwan Velu
2019-05-01 14:22 ` Don.Brace
2019-05-01 14:22 ` Don.Brace
2019-05-14 0:30 ` Martin K. Petersen
2019-05-14 0:30 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.