* [PATCH 0/5] smartpqi updates
@ 2024-07-11 19:46 Don Brace
2024-07-11 19:47 ` [PATCH 1/5] smartpqi: add new controller PCI IDs Don Brace
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:46 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
These patches are based on Martin Petersen's 6.11/scsi-queue tree
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
6.11/scsi-queue
The functional changes of note to smartpqi are for: multipath failover
and improving the accuracy of our RAID bypass counter.
For multipath we are:
Reverting commit 94a68c814328 ("scsi: smartpqi: Quickly propagate path failures to SCSI midlayer")
because under certain rare conditions involving encryption-enabled devices,
a false path failure is reported to the SML causing multipath to failover
to the other path.
Improving errors returned from the driver back to the SML by checking for
error codes returned from the firmware and returning the correct ASC/ASCQ codes
to the SML.
The other two patches add PCI-IDs for new controllers and change the
driver version.
This set of changes consists of:
* smartpqi-add-new-controller-PCI-IDs
No functional changes. Just adding in more device support.
* smartpqi-improve-accuracy-of-RAID-bypass-counter
We changed from using a integer variable to a __percpu variable. Using an integer
was causing some race conditions when updating the "raid_bypass_cnt" value. This
lead to unreliable results.
Found by internal testing. No known externally reported bugs.
* smartpqi-revert-propagate-the-multipath-failure-to-SML-quickly
We are reverting commit 94a68c814328
("scsi: smartpqi: Quickly propagate path failures to SCSI midlayer")
because when encryption is enabled, a false path failure was being reported to the SML
causing multipath to fail the path. This was because when encryption is enabled,
the controller temporarily disables our Accelerated I/O path which caused the
false path disabled detection. Disabling the accelerated I/O path can cause
some performance degradation.
Found by internal testing. No known externally reported bugs.
* smartpqi-improve-handling-of-multipath-failover
We are better aligning error codes retuned by our controller firmware with what the OS
is expecting. This improves multipath failover detection.
Found by internal testing. No known externally reported bugs.
* smartpqi-update-version-to-2.1.28-025
No functional changes.
---
David Strahan (1):
smartpqi: add new controller PCI IDs
Don Brace (1):
smartpqi: update driver version to 2.1.28-025
Gilbert Wu (1):
smartpqi: revert propagate-the-multipath-failure-to-SML-quickly
Kevin Barnett (2):
smartpqi: improve accuracy/performance of raid-bypass-counter.
smartpqi: fix improve handling of multipath failover
drivers/scsi/smartpqi/smartpqi.h | 2 +-
drivers/scsi/smartpqi/smartpqi_init.c | 176 ++++++++++++++++++++++----
2 files changed, 151 insertions(+), 27 deletions(-)
--
2.45.2.827.g557ae147e6
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/5] smartpqi: add new controller PCI IDs
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
@ 2024-07-11 19:47 ` Don Brace
2024-07-11 19:47 ` [PATCH 2/5] smartpqi: improve accuracy/performance of raid-bypass-counter Don Brace
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:47 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
From: David Strahan <David.Strahan@microchip.com>
All PCI ID entries in Hex.
Add new inagile pci ids:
VID / DID / SVID / SDID
---- ---- ---- ----
SMART-HBA 8242-24i 9005 / 028f / 1ff9 / 0045
RAID 8236-16i 9005 / 028f / 1ff9 / 0046
RAID 8240-24i 9005 / 028f / 1ff9 / 0047
SMART-HBA 8238-16i 9005 / 028f / 1ff9 / 0048
PM8222-SHBA 9005 / 028f / 1ff9 / 004a
RAID PM8204-2GB 9005 / 028f / 1ff9 / 004b
RAID PM8204-4GB 9005 / 028f / 1ff9 / 004c
PM8222-HBA 9005 / 028f / 1ff9 / 004f
MT0804M6R 9005 / 028f / 1ff9 / 0051
MT0801M6E 9005 / 028f / 1ff9 / 0052
MT0808M6R 9005 / 028f / 1ff9 / 0053
MT0800M6H 9005 / 028f / 1ff9 / 0054
RS0800M5H24i 9005 / 028f / 1ff9 / 006b
RS0800M5E8i 9005 / 028f / 1ff9 / 006c
RS0800M5H8i 9005 / 028f / 1ff9 / 006d
RS0804M5R16i 9005 / 028f / 1ff9 / 006f
RS0800M5E24i 9005 / 028f / 1ff9 / 0070
RS0800M5H16i 9005 / 028f / 1ff9 / 0071
RS0800M5E16i 9005 / 028f / 1ff9 / 0072
RT0800M7E 9005 / 028f / 1ff9 / 0086
RT0800M7H 9005 / 028f / 1ff9 / 0087
RT0804M7R 9005 / 028f / 1ff9 / 0088
RT0808M7R 9005 / 028f / 1ff9 / 0089
RT1608M6R16i 9005 / 028f / 1ff9 / 00a1
Add new h3c pci_id:
VID / DID / SVID / SDID
---- ---- ---- ----
UN RAID P4408-Mr-2 9005 / 028f / 193d / 1110
Add new powerleader pci ids:
VID / DID / SVID / SDID
---- ---- ---- ----
PL SmartROC PM8204 9005 / 028f / 1f3a / 0104
---
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: David Strahan <David.Strahan@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 104 ++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 24c7cb285dca..9166dfa1fedc 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -9472,6 +9472,10 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x193d, 0x110b)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x193d, 0x1110)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x193d, 0x8460)
@@ -9588,6 +9592,14 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1bd4, 0x0089)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x00a1)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1f3a, 0x0104)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x19e5, 0xd227)
@@ -10180,6 +10192,98 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1137, 0x02fa)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0045)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0046)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0047)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0048)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x004a)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x004b)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x004c)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x004f)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0051)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0052)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0053)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0054)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x006b)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x006c)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x006d)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x006f)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0070)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0071)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0072)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0086)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0087)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0088)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ff9, 0x0089)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1e93, 0x1000)
--
2.45.2.827.g557ae147e6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] smartpqi: improve accuracy/performance of raid-bypass-counter.
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 ` Don Brace
2024-07-11 19:47 ` [PATCH 3/5] smartpqi: revert propagate-the-multipath-failure-to-SML-quickly Don Brace
` (4 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:47 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
From: Kevin Barnett <kevin.barnett@microchip.com>
The original implementation of this counter used an atomic variable.
However, this implementation negatively impacted performance in some
configurations.
Switch to using per_cpu variables.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Co-developed-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi.h | 2 +-
drivers/scsi/smartpqi/smartpqi_init.c | 30 +++++++++++++++++++++++----
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi.h b/drivers/scsi/smartpqi/smartpqi.h
index cdedc271857a..023fbce04e7a 100644
--- a/drivers/scsi/smartpqi/smartpqi.h
+++ b/drivers/scsi/smartpqi/smartpqi.h
@@ -1158,7 +1158,7 @@ struct pqi_scsi_dev {
struct pqi_stream_data stream_data[NUM_STREAMS_PER_LUN];
atomic_t scsi_cmds_outstanding[PQI_MAX_LUNS_PER_DEVICE];
- unsigned int raid_bypass_cnt;
+ u64 __percpu *raid_bypass_cnt;
struct pqi_tmf_work tmf_work[PQI_MAX_LUNS_PER_DEVICE];
};
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 9166dfa1fedc..eaebe3cc00aa 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -1508,6 +1508,12 @@ static int pqi_get_raid_map(struct pqi_ctrl_info *ctrl_info,
if (rc)
goto error;
+ device->raid_bypass_cnt = alloc_percpu(u64);
+ if (!device->raid_bypass_cnt) {
+ rc = -ENOMEM;
+ goto error;
+ }
+
device->raid_map = raid_map;
return 0;
@@ -2099,6 +2105,10 @@ static void pqi_scsi_update_device(struct pqi_ctrl_info *ctrl_info,
/* To prevent this from being freed later. */
new_device->raid_map = NULL;
}
+ if (new_device->raid_bypass_enabled && existing_device->raid_bypass_cnt == NULL) {
+ existing_device->raid_bypass_cnt = new_device->raid_bypass_cnt;
+ new_device->raid_bypass_cnt = NULL;
+ }
existing_device->raid_bypass_configured = new_device->raid_bypass_configured;
existing_device->raid_bypass_enabled = new_device->raid_bypass_enabled;
}
@@ -2121,6 +2131,7 @@ static void pqi_scsi_update_device(struct pqi_ctrl_info *ctrl_info,
static inline void pqi_free_device(struct pqi_scsi_dev *device)
{
if (device) {
+ free_percpu(device->raid_bypass_cnt);
kfree(device->raid_map);
kfree(device);
}
@@ -6007,6 +6018,7 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scm
u16 hw_queue;
struct pqi_queue_group *queue_group;
bool raid_bypassed;
+ u64 *raid_bypass_cnt;
u8 lun;
scmd->host_scribble = PQI_NO_COMPLETION;
@@ -6053,7 +6065,8 @@ static int pqi_scsi_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scm
rc = pqi_raid_bypass_submit_scsi_cmd(ctrl_info, device, scmd, queue_group);
if (rc == 0 || rc == SCSI_MLQUEUE_HOST_BUSY) {
raid_bypassed = true;
- device->raid_bypass_cnt++;
+ raid_bypass_cnt = per_cpu_ptr(device->raid_bypass_cnt, smp_processor_id());
+ (*raid_bypass_cnt)++;
}
}
if (!raid_bypassed)
@@ -7350,7 +7363,9 @@ static ssize_t pqi_raid_bypass_cnt_show(struct device *dev,
struct scsi_device *sdev;
struct pqi_scsi_dev *device;
unsigned long flags;
- unsigned int raid_bypass_cnt;
+ u64 raid_bypass_cnt;
+ int cpu;
+ u64 *per_cpu_bypass_cnt_ptr;
sdev = to_scsi_device(dev);
ctrl_info = shost_to_hba(sdev->host);
@@ -7366,11 +7381,18 @@ static ssize_t pqi_raid_bypass_cnt_show(struct device *dev,
return -ENODEV;
}
- raid_bypass_cnt = device->raid_bypass_cnt;
+ raid_bypass_cnt = 0;
+
+ if (device->raid_bypass_cnt) {
+ for_each_online_cpu(cpu) {
+ per_cpu_bypass_cnt_ptr = per_cpu_ptr(device->raid_bypass_cnt, cpu);
+ raid_bypass_cnt += *per_cpu_bypass_cnt_ptr;
+ }
+ }
spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);
- return scnprintf(buffer, PAGE_SIZE, "0x%x\n", raid_bypass_cnt);
+ return scnprintf(buffer, PAGE_SIZE, "0x%llx\n", raid_bypass_cnt);
}
static ssize_t pqi_sas_ncq_prio_enable_show(struct device *dev,
--
2.45.2.827.g557ae147e6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] smartpqi: revert propagate-the-multipath-failure-to-SML-quickly
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 ` Don Brace
2024-07-11 19:47 ` [PATCH 4/5] smartpqi: fix improve handling of multipath failover Don Brace
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:47 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
From: Gilbert Wu <Gilbert.Wu@microchip.com>
Correct a rare multipath failure issue by reverting:
commit 94a68c814328
("scsi: smartpqi: Quickly propagate path failures to SCSI midlayer")
Link: https://lore.kernel.org/all/164375209313.440833.9992416628621839233.stgit@brunhilda.pdev.net/
Reason for revert: The patch propagated the path failure to SML
quickly when one of the path fails during IO and AIO path gets
disabled for a multipath device.
But it created a new issue: when creating a volume on an
encryption-enabled controller, the firmware reports the AIO path is
disabled, which cause the driver to report a path failure to SML for
a multipath device.
There will be a new fix to handle "Illegal request" and "Invalid field
in parameter list" on RAID path when the AIO path is disabled on a
multipath device.
Fixes: 94a68c814328 ("scsi: smartpqi: Quickly propagate path failures to SCSI midlayer")
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: Gilbert Wu <Gilbert.Wu@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index eaebe3cc00aa..d8df7440bbe1 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2365,14 +2365,6 @@ static inline void pqi_mask_device(u8 *scsi3addr)
scsi3addr[3] |= 0xc0;
}
-static inline bool pqi_is_multipath_device(struct pqi_scsi_dev *device)
-{
- if (pqi_is_logical_device(device))
- return false;
-
- return (device->path_map & (device->path_map - 1)) != 0;
-}
-
static inline bool pqi_expose_device(struct pqi_scsi_dev *device)
{
return !device->is_physical_device || !pqi_skip_device(device->scsi3addr);
@@ -3269,14 +3261,12 @@ static void pqi_process_aio_io_error(struct pqi_io_request *io_request)
int residual_count;
int xfer_count;
bool device_offline;
- struct pqi_scsi_dev *device;
scmd = io_request->scmd;
error_info = io_request->error_info;
host_byte = DID_OK;
sense_data_length = 0;
device_offline = false;
- device = scmd->device->hostdata;
switch (error_info->service_response) {
case PQI_AIO_SERV_RESPONSE_COMPLETE:
@@ -3301,14 +3291,8 @@ static void pqi_process_aio_io_error(struct pqi_io_request *io_request)
break;
case PQI_AIO_STATUS_AIO_PATH_DISABLED:
pqi_aio_path_disabled(io_request);
- if (pqi_is_multipath_device(device)) {
- pqi_device_remove_start(device);
- host_byte = DID_NO_CONNECT;
- scsi_status = SAM_STAT_CHECK_CONDITION;
- } else {
- scsi_status = SAM_STAT_GOOD;
- io_request->status = -EAGAIN;
- }
+ scsi_status = SAM_STAT_GOOD;
+ io_request->status = -EAGAIN;
break;
case PQI_AIO_STATUS_NO_PATH_TO_DEVICE:
case PQI_AIO_STATUS_INVALID_DEVICE:
--
2.45.2.827.g557ae147e6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] smartpqi: fix improve handling of multipath failover
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
` (2 preceding siblings ...)
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
2024-07-11 19:47 ` [PATCH 5/5] smartpqi: update driver version to 2.1.28-025 Don Brace
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:47 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] smartpqi: update driver version to 2.1.28-025
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
` (3 preceding siblings ...)
2024-07-11 19:47 ` [PATCH 4/5] smartpqi: fix improve handling of multipath failover Don Brace
@ 2024-07-11 19:47 ` Don Brace
2024-08-03 2:12 ` [PATCH 0/5] smartpqi updates Martin K. Petersen
2024-08-05 21:17 ` Martin K. Petersen
6 siblings, 0 replies; 11+ messages in thread
From: Don Brace @ 2024-07-11 19:47 UTC (permalink / raw)
To: don.brace, Kevin.Barnett, scott.teel, Justin.Lindley,
scott.benesh, gerry.morong, mahesh.rajashekhara, mike.mcgowen,
murthy.bhat, kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD
Cc: linux-scsi
Update driver version to 2.1.28-025
Reviewed-by: Mike Tran <mike.tran@microchip.com>
Reviewed-by: Gerry Morong <gerry.morong@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 0dd901445dcc..823cc97a9788 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -33,11 +33,11 @@
#define BUILD_TIMESTAMP
#endif
-#define DRIVER_VERSION "2.1.26-030"
+#define DRIVER_VERSION "2.1.28-025"
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 1
-#define DRIVER_RELEASE 26
-#define DRIVER_REVISION 30
+#define DRIVER_RELEASE 28
+#define DRIVER_REVISION 25
#define DRIVER_NAME "Microchip SmartPQI Driver (v" \
DRIVER_VERSION BUILD_TIMESTAMP ")"
--
2.45.2.827.g557ae147e6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 0/5] smartpqi updates
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
` (4 preceding siblings ...)
2024-07-11 19:47 ` [PATCH 5/5] smartpqi: update driver version to 2.1.28-025 Don Brace
@ 2024-08-03 2:12 ` Martin K. Petersen
2024-08-05 21:17 ` Martin K. Petersen
6 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2024-08-03 2:12 UTC (permalink / raw)
To: Don Brace
Cc: Kevin.Barnett, scott.teel, Justin.Lindley, scott.benesh,
gerry.morong, mahesh.rajashekhara, mike.mcgowen, murthy.bhat,
kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, Martin Petersen, joseph.szczypek, POSWALD,
linux-scsi
Don,
> The functional changes of note to smartpqi are for: multipath failover
> and improving the accuracy of our RAID bypass counter.
Applied to 6.12/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/5] smartpqi updates
2024-07-11 19:46 [PATCH 0/5] smartpqi updates Don Brace
` (5 preceding siblings ...)
2024-08-03 2:12 ` [PATCH 0/5] smartpqi updates Martin K. Petersen
@ 2024-08-05 21:17 ` Martin K. Petersen
6 siblings, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2024-08-05 21:17 UTC (permalink / raw)
To: Kevin.Barnett, scott.teel, Justin.Lindley, scott.benesh,
gerry.morong, mahesh.rajashekhara, mike.mcgowen, murthy.bhat,
kumar.meiyappan, jeremy.reeves, david.strahan, hch,
James Bottomley, joseph.szczypek, POSWALD, Don Brace
Cc: Martin K . Petersen, linux-scsi
On Thu, 11 Jul 2024 14:46:59 -0500, Don Brace wrote:
> These patches are based on Martin Petersen's 6.11/scsi-queue tree
> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
> 6.11/scsi-queue
>
> The functional changes of note to smartpqi are for: multipath failover
> and improving the accuracy of our RAID bypass counter.
>
> [...]
Applied to 6.12/scsi-queue, thanks!
[1/5] smartpqi: add new controller PCI IDs
https://git.kernel.org/mkp/scsi/c/0e21e73384d3
[2/5] smartpqi: improve accuracy/performance of raid-bypass-counter.
https://git.kernel.org/mkp/scsi/c/bb0f5445b27f
[3/5] smartpqi: revert propagate-the-multipath-failure-to-SML-quickly
https://git.kernel.org/mkp/scsi/c/f1393d52e6cd
[4/5] smartpqi: fix improve handling of multipath failover
https://git.kernel.org/mkp/scsi/c/57abab70a5e0
[5/5] smartpqi: update driver version to 2.1.28-025
https://git.kernel.org/mkp/scsi/c/5b4ded3f35d5
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 0/5] smartpqi updates
@ 2025-04-23 18:32 Don Brace
2025-04-29 1:45 ` Martin K. Petersen
2025-05-06 4:25 ` Martin K. Petersen
0 siblings, 2 replies; 11+ messages in thread
From: Don Brace @ 2025-04-23 18:32 UTC (permalink / raw)
To: don.brace, scott.teel, scott.benesh, gerry.morong,
mahesh.rajashekhara, mike.mcgowen, murthy.bhat, kumar.meiyappan,
jeremy.reeves, hch, James.Bottomley, martin.petersen,
joseph.szczypek, POSWALD, cameron.cumberland, Yi Zhang
Cc: linux-scsi
These patches are based on Martin Petersen's 6.16/scsi-queue tree
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
6.16/scsi-queue
There are two main functional changes in this patch series:
smartpqi-take-drives-offline-when-controller-is-offline
smartpqi-fix-smp_processor_id-call-trace-for-preemptible-kernels
The other two patches add PCI-IDs for new controllers and change the
driver version.
This set of changes consists of:
* smartpqi-take-drives-offline-when-controller-is-offline
On rare occasions, the controller can lock up and the driver was
removing the controller instance from OS but leaving the
drives exposed and their state was still 'running'.
This patch sets the drive state as 'offline' to avoid confusion.
* smartpqi-add-new-pci_ids
Add support for more PCI devices.
* smartpqi-enhance_wwid-logging-logic
Cosmetic change for logging WWIDs for NVMe devices and for drives
that support the extended format.
* smartpqi-fix-smp_processor_id-call-trace-for-preemptible-kernels
When preemption is enabled, there are call traces in the console
logs which are annoying. The call trace mentions using
smp_processor_id(). Since the driver is only using this function call
when accessing a per_cpu variable, we changed the call to
raw_smp_processor_id(). This patch was written by
Yi Zhang <yi.zhang@redhat.com> and I am posting it on his behalf.
* smartpqi-update-driver-version-to-2.1.34-035
No functional changes.
---
David Strahan (2):
smartpqi: take drives offline when controller is offline
smartpqi: add new pci ids
Don Brace (1):
smartpqi: update driver version to 2.1.34-035
Venkatesh Emparala (1):
Enhance WWID Logging Logic.
Yi Zhang (1):
smartpqi: fix smp_processor_id() call trace for preemptible kernels
drivers/scsi/smartpqi/smartpqi_init.c | 140 ++++++++++++++++++++++++--
1 file changed, 130 insertions(+), 10 deletions(-)
--
2.49.0.391.g4bbb303af6
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/5] smartpqi updates
2025-04-23 18:32 Don Brace
@ 2025-04-29 1:45 ` Martin K. Petersen
2025-05-06 4:25 ` Martin K. Petersen
1 sibling, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2025-04-29 1:45 UTC (permalink / raw)
To: Don Brace
Cc: scott.teel, scott.benesh, gerry.morong, mahesh.rajashekhara,
mike.mcgowen, murthy.bhat, kumar.meiyappan, jeremy.reeves, hch,
James.Bottomley, martin.petersen, joseph.szczypek, POSWALD,
cameron.cumberland, Yi Zhang, linux-scsi
Don,
> These patches are based on Martin Petersen's 6.16/scsi-queue tree
> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
> 6.16/scsi-queue
Applied to 6.16/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/5] smartpqi updates
2025-04-23 18:32 Don Brace
2025-04-29 1:45 ` Martin K. Petersen
@ 2025-05-06 4:25 ` Martin K. Petersen
1 sibling, 0 replies; 11+ messages in thread
From: Martin K. Petersen @ 2025-05-06 4:25 UTC (permalink / raw)
To: scott.teel, scott.benesh, gerry.morong, mahesh.rajashekhara,
mike.mcgowen, murthy.bhat, kumar.meiyappan, jeremy.reeves, hch,
James.Bottomley, joseph.szczypek, POSWALD, cameron.cumberland,
Yi Zhang, Don Brace
Cc: Martin K . Petersen, linux-scsi
On Wed, 23 Apr 2025 13:32:24 -0500, Don Brace wrote:
> These patches are based on Martin Petersen's 6.16/scsi-queue tree
> https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
> 6.16/scsi-queue
>
> There are two main functional changes in this patch series:
> smartpqi-take-drives-offline-when-controller-is-offline
> smartpqi-fix-smp_processor_id-call-trace-for-preemptible-kernels
>
> [...]
Applied to 6.16/scsi-queue, thanks!
[1/5] smartpqi: take drives offline when controller is offline
https://git.kernel.org/mkp/scsi/c/32c79c268078
[2/5] smartpqi: add new pci ids
https://git.kernel.org/mkp/scsi/c/01b8bdddcfab
[3/5] Enhance WWID Logging Logic.
https://git.kernel.org/mkp/scsi/c/001164fc3082
[4/5] smartpqi: fix smp_processor_id() call trace for preemptible kernels
https://git.kernel.org/mkp/scsi/c/42d033cf4b51
[5/5] smartpqi: update driver version to 2.1.34-035
https://git.kernel.org/mkp/scsi/c/6e6d9e85bad2
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-05-06 4:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 4/5] smartpqi: fix improve handling of multipath failover Don Brace
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
-- strict thread matches above, loose matches on Subject: below --
2025-04-23 18:32 Don Brace
2025-04-29 1:45 ` Martin K. Petersen
2025-05-06 4:25 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox