smartpqi updates
Subsystems (2)
Don Brace
maintainercover smartpqi updates
These patches are based on Martin Petersen's 6.8/scsi-queue tree
https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
6.8/scsi-queue
The only functional change to smartpqi is correction of a race condition during a scan/rescan operation. The device->rescan flag can be updated by multiple threads causing issues.
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: fix logical volume rescan race condition
The driver has several threads that can contend for accessing a controller instance wide 'rescan' flag. In some rare cases a race condition can occur that bypasses a call to rescan for device changes. Some of these changes are; device removal, logical volume changes, and device adds. We basically added a spin-lock to protect the 'rescan' flag.
* smartpqi-change-driver-version-to-2.1.26-030
No functional changes.
---
David Strahan (1):
smartpqi: Add new controller PCI IDs
Don Brace (1):
smartpqi: bump driver version to 2.1.26-030
Mahesh Rajashekhara (1):
smartpqi: fix logical volume rescan race condition
drivers/scsi/smartpqi/smartpqi.h | 1 - drivers/scsi/smartpqi/smartpqi_init.c | 89 ++++++++++++++++++++++++--- 2 files changed, 79 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0.76.g1a87c842ec
Don Brace
maintainerPATCH 1/3 smartpqi: Add new controller PCI IDs
From: David Strahan <[email protected]>
All PCI ID entries in Hex.
Add PCI IDs for Cisco controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
Cisco 24G TriMode M1 RAID 4GB FBWC 32D 9005 / 028f / 1137 / 02f8
Cisco 24G TriMode M1 RAID 4GB FBWC 16D 9005 / 028f / 1137 / 02f9
Cisco 24G TriMode M1 HBA 16D 9005 / 028f / 1137 / 02fa
Add PCI IDs for CloudNine controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
SmartRAID P7604N-16i 9005 / 028f / 1f51 / 100e
SmartRAID P7604N-8i 9005 / 028f / 1f51 / 100f
SmartRAID P7504N-16i 9005 / 028f / 1f51 / 1010
SmartRAID P7504N-8i 9005 / 028f / 1f51 / 1011
SmartRAID P7504N-8i 9005 / 028f / 1f51 / 1043
SmartHBA P6500-8i 9005 / 028f / 1f51 / 1044
SmartRAID P7504-8i 9005 / 028f / 1f51 / 1045--- drivers/scsi/smartpqi/smartpqi_init.c | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
drivers/scsi/smartpqi/smartpqi_init.c +40 -0
@@ -10142,6 +10142,18 @@ static const struct pci_device_id pqi_pci_id_table[] = {PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f ,0x1014 ,0x0718 ) }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1137 ,0x02f8 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1137 ,0x02f9 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1137 ,0x02fa ) + }, {PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f ,0x1e93 ,0x1000 )
@@ -10198,6 +10210,34 @@ static const struct pci_device_id pqi_pci_id_table[] = {PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f ,0x1f51 ,0x100a ) }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x100e ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x100f ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x1010 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x1011 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x1043 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x1044 ) + }, + { +PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f , +0x1f51 ,0x1045 ) + }, {PCI_DEVICE_SUB (PCI_VENDOR_ID_ADAPTEC2 ,0x028f ,PCI_ANY_ID ,PCI_ANY_ID )
Signature · 1 line
2.43.0.76.g1a87c842ec
Don Brace
maintainerPATCH 2/3 smartpqi: fix logical volume rescan race condition
In reply to Don BraceFrom: Mahesh Rajashekhara <[email protected]>
Correct rescan flag race condition.
Multiple conditions are being evaluated before notifying OS to do a rescan.
Driver will skip re-scanning the device if any one of the following conditions are met:
- Devices that have not yet been added to the OS or devices that have been removed.
- Devices which are already marked for removal or in the phase of removal.
Under very rare conditions, after logical volume size expansion, the OS still sees the size of the logical volume which was before expansion.
The rescan flag in the driver is used to signal the need for a logical volume rescan. A race condition can occur in the driver, and it leads to one thread overwriting the flag inadvertently. As a result, driver is not notifying the OS SML to rescan the logical volume.
Move device->rescan update into new function pqi_mark_volumes_for_rescan() and protect with a spin lock.
Move check for device->rescan into new function pqi_volume_rescan_needed() and protect function call with a spin_lock.
--- drivers/scsi/smartpqi/smartpqi.h | 1 - drivers/scsi/smartpqi/smartpqi_init.c | 43 ++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 8 deletions(-)
drivers/scsi/smartpqi/smartpqi.h +0 -1
@@ -1347,7 +1347,6 @@ struct pqi_ctrl_info {bool controller_online;bool block_requests;bool scan_blocked; - u8 logical_volume_rescan_needed : 1; u8 inbound_spanning_supported : 1; u8 outbound_spanning_supported : 1; u8 pqi_mode_enabled : 1;
drivers/scsi/smartpqi/smartpqi_init.c +36 -7
80 lines not on this page · raw message
Signature · 1 line
2.43.0.76.g1a87c842ec
Don Brace
maintainerPATCH 3/3 smartpqi: bump driver version to 2.1.26-030
In reply to Don Brace--- drivers/scsi/smartpqi/smartpqi_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/smartpqi/smartpqi_init.c +3 -3
@@ -33,11 +33,11 @@#define BUILD_TIMESTAMP #endif -#define DRIVER_VERSION "2.1.24-046" +#define DRIVER_VERSION "2.1.26-030"#define DRIVER_MAJOR 2#define DRIVER_MINOR 1 -#define DRIVER_RELEASE 24 -#define DRIVER_REVISION 46 +#define DRIVER_RELEASE 26 +#define DRIVER_REVISION 30#define DRIVER_NAME "Microchip SmartPQI Driver (v" \ DRIVER_VERSION BUILD_TIMESTAMP ")"
Signature · 1 line
2.43.0.76.g1a87c842ec
Martin K. Petersen
AppliedDon,
Quoted 3 lines
The only functional change to smartpqi is correction of a race condition during a scan/rescan operation. The
device->rescanflag can be updated by multiple threads causing issues.
Applied to 6.8/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering