From: Don Brace <don.brace@microchip.com>
To: <don.brace@microchip.com>, <Kevin.Barnett@microchip.com>,
<scott.teel@microchip.com>, <Justin.Lindley@microchip.com>,
<scott.benesh@microchip.com>, <gerry.morong@microchip.com>,
<mahesh.rajashekhara@microchip.com>, <mike.mcgowen@microchip.com>,
<murthy.bhat@microchip.com>, <kumar.meiyappan@microchip.com>,
<jeremy.reeves@microchip.com>, <david.strahan@microchip.com>,
<hch@infradead.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Martin Petersen <martin.petersen@oracle.com>,
<joseph.szczypek@hpe.com>, <POSWALD@suse.com>
Cc: <linux-scsi@vger.kernel.org>
Subject: [PATCH 4/5] smartpqi: fix improve handling of multipath failover
Date: Thu, 11 Jul 2024 14:47:03 -0500 [thread overview]
Message-ID: <20240711194704.982400-5-don.brace@microchip.com> (raw)
In-Reply-To: <20240711194704.982400-1-don.brace@microchip.com>
From: Kevin Barnett <kevin.barnett@microchip.com>
Improve multipath fail-overs by mapping firmware errors into
I/O errors.
In some rare instances, firmware does not return the proper error code
for I/O errors caused by a multipath path failure.
Map I/O errors returned by firmware into errors that help the multipath
layer to detect the failure of a path.
Reviewed-by: Gerry Morong <gerry.morong@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index d8df7440bbe1..0dd901445dcc 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -3247,6 +3247,20 @@ static void pqi_process_raid_io_error(struct pqi_io_request *io_request)
sense_data_length);
}
+ if (pqi_cmd_priv(scmd)->this_residual &&
+ !pqi_is_logical_device(scmd->device->hostdata) &&
+ scsi_status == SAM_STAT_CHECK_CONDITION &&
+ host_byte == DID_OK &&
+ sense_data_length &&
+ scsi_normalize_sense(error_info->data, sense_data_length, &sshdr) &&
+ sshdr.sense_key == ILLEGAL_REQUEST &&
+ sshdr.asc == 0x26 &&
+ sshdr.ascq == 0x0) {
+ host_byte = DID_NO_CONNECT;
+ pqi_take_device_offline(scmd->device, "AIO");
+ scsi_build_sense_buffer(0, scmd->sense_buffer, HARDWARE_ERROR, 0x3e, 0x1);
+ }
+
scmd->result = scsi_status;
set_host_byte(scmd, host_byte);
}
@@ -6021,7 +6035,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scm
ctrl_info = shost_to_hba(shost);
- if (pqi_ctrl_offline(ctrl_info) || pqi_device_in_remove(device)) {
+ if (pqi_ctrl_offline(ctrl_info) || pqi_device_offline(device) || pqi_device_in_remove(device)) {
set_host_byte(scmd, DID_NO_CONNECT);
pqi_scsi_done(scmd);
return 0;
--
2.45.2.827.g557ae147e6
next prev parent reply other threads:[~2024-07-11 19:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
2024-07-11 19:47 ` [PATCH 1/5] smartpqi: add new controller PCI IDs Don Brace
2024-07-11 19:47 ` [PATCH 2/5] smartpqi: improve accuracy/performance of raid-bypass-counter Don Brace
2024-07-11 19:47 ` [PATCH 3/5] smartpqi: revert propagate-the-multipath-failure-to-SML-quickly Don Brace
2024-07-11 19:47 ` Don Brace [this message]
2024-07-11 19:47 ` [PATCH 5/5] smartpqi: update driver version to 2.1.28-025 Don Brace
2024-08-03 2:12 ` [PATCH 0/5] smartpqi updates Martin K. Petersen
2024-08-05 21:17 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240711194704.982400-5-don.brace@microchip.com \
--to=don.brace@microchip.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=Justin.Lindley@microchip.com \
--cc=Kevin.Barnett@microchip.com \
--cc=POSWALD@suse.com \
--cc=david.strahan@microchip.com \
--cc=gerry.morong@microchip.com \
--cc=hch@infradead.org \
--cc=jeremy.reeves@microchip.com \
--cc=joseph.szczypek@hpe.com \
--cc=kumar.meiyappan@microchip.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mahesh.rajashekhara@microchip.com \
--cc=martin.petersen@oracle.com \
--cc=mike.mcgowen@microchip.com \
--cc=murthy.bhat@microchip.com \
--cc=scott.benesh@microchip.com \
--cc=scott.teel@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox