* [PATCH 1/5] smartpqi: take drives offline when controller is offline
2025-04-23 18:32 [PATCH 0/5] smartpqi updates Don Brace
@ 2025-04-23 18:32 ` Don Brace
2025-04-23 18:32 ` [PATCH 2/5] smartpqi: add new pci ids Don Brace
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ 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
From: David Strahan <david.strahan@microchip.com>
When the controller is unexpectedly taken offline, show its drives
as offline.
During a controller lockup, the physical and logical drives under the
locked up controller are still listed at the OS level.
I.E.
The controller is offline but the status of each drive is 'running'.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: David Strahan <david.strahan@microchip.com>
Co-developed-by: Don Brace <don.brace@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 88135fdb8bd1..73f576ccf511 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -67,6 +67,7 @@ static struct pqi_cmd_priv *pqi_cmd_priv(struct scsi_cmnd *cmd)
static void pqi_verify_structures(void);
static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info,
enum pqi_ctrl_shutdown_reason ctrl_shutdown_reason);
+static void pqi_take_ctrl_devices_offline(struct pqi_ctrl_info *ctrl_info);
static void pqi_ctrl_offline_worker(struct work_struct *work);
static int pqi_scan_scsi_devices(struct pqi_ctrl_info *ctrl_info);
static void pqi_scan_start(struct Scsi_Host *shost);
@@ -9128,6 +9129,7 @@ static void pqi_take_ctrl_offline_deferred(struct pqi_ctrl_info *ctrl_info)
pqi_ctrl_wait_until_quiesced(ctrl_info);
pqi_fail_all_outstanding_requests(ctrl_info);
pqi_ctrl_unblock_requests(ctrl_info);
+ pqi_take_ctrl_devices_offline(ctrl_info);
}
static void pqi_ctrl_offline_worker(struct work_struct *work)
@@ -9202,6 +9204,27 @@ static void pqi_take_ctrl_offline(struct pqi_ctrl_info *ctrl_info,
schedule_work(&ctrl_info->ctrl_offline_work);
}
+static void pqi_take_ctrl_devices_offline(struct pqi_ctrl_info *ctrl_info)
+{
+ int rc;
+ unsigned long flags;
+ struct pqi_scsi_dev *device;
+
+ spin_lock_irqsave(&ctrl_info->scsi_device_list_lock, flags);
+ list_for_each_entry(device, &ctrl_info->scsi_device_list, scsi_device_list_entry) {
+ rc = list_is_last(&device->scsi_device_list_entry, &ctrl_info->scsi_device_list);
+ if (rc)
+ continue;
+
+ /*
+ * Is the sdev pointer NULL?
+ */
+ if (device->sdev)
+ scsi_device_set_state(device->sdev, SDEV_OFFLINE);
+ }
+ spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);
+}
+
static void pqi_print_ctrl_info(struct pci_dev *pci_dev,
const struct pci_device_id *id)
{
--
2.49.0.391.g4bbb303af6
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/5] smartpqi: add new pci ids
2025-04-23 18:32 [PATCH 0/5] smartpqi updates Don Brace
2025-04-23 18:32 ` [PATCH 1/5] smartpqi: take drives offline when controller is offline Don Brace
@ 2025-04-23 18:32 ` Don Brace
2025-04-23 18:32 ` [PATCH 3/5] Enhance WWID Logging Logic Don Brace
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ 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
From: David Strahan <david.strahan@microchip.com>
Add in support for more PCI devices.
All PCI ID entries in Hex.
Add PCI IDs for Ramaxel controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
Ramaxel SmartHBA RX8238-16i 9005 028f 1018 8238
Ramaxel SSSRAID card 9005 028f 1f3f 0610
Add PCI ID for Alibaba controller:
VID / DID / SVID / SDID
---- ---- ---- ----
HBA AS1340 9005 028f 1ded 3301
Add PCI IDs for Inspur controller:
VID / DID / SVID / SDID
---- ---- ---- ----
RT0800M6E2i 9005 028f 1bd4 00a3
Add PCI IDs for Delta controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
ThinkSystem 4450-8i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0222
24Gb HBA
ThinkSystem 4450-16i SAS/SATA/NVMe PCIe Gen4 9005 028f 1d49 0223
24Gb HBA
ThinkSystem 4450-8e SAS/SATA PCIe Gen4 9005 028f 1d49 0224
24Gb HBA
ThinkSystem RAID 4450-16e PCIe Gen4 24Gb 9005 028f 1d49 0225
Adapter HBA
ThinkSystem RAID 5450-16i PCIe Gen4 24Gb Adapter 9005 028f 1d49 0521
ThinkSystem RAID 9450-8i 4GB Flash PCIe Gen4 9005 028f 1d49 0624
24Gb Adapter
ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0625
24Gb Adapter
ThinkSystem RAID 9450-16i 4GB Flash PCIe Gen4 9005 028f 1d49 0626
24Gb Adapter
ThinkSystem RAID 9450-32i 8GB Flash PCIe Gen4 9005 028f 1d49 0627
24Gb Adapter
ThinkSystem RAID 9450-16e 4GB Flash PCIe Gen4 9005 028f 1d49 0628
24Gb Adapter
Add PCI ID for Cloudnine Controller:
VID / DID / SVID / SDID
---- ---- ---- ----
SmartHBA P6600-24i 9005 028f 1f51 100b
Add PCI IDs for Hurraydata Controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
HRDT TrustHBA H4100-8i 9005 028f 207d 4044
HRDT TrustHBA H4100-8e 9005 028f 207d 4054
HRDT TrustHBA H4100-16i 9005 028f 207d 4084
HRDT TrustHBA H4100-16e 9005 028f 207d 4094
HRDT TrustRAID D3152s-8i 9005 028f 207d 4140
HRDT TrustRAID D3154s-8i 9005 028f 207d 4240
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 | 84 +++++++++++++++++++++++++++
1 file changed, 84 insertions(+)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 73f576ccf511..3cb8619e9ce9 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -9731,6 +9731,10 @@ 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,
+ 0x1bd4, 0x00a3)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1ff9, 0x00a1)
@@ -10067,6 +10071,30 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_ADAPTEC2, 0x14f0)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4044)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4054)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4084)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4094)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4140)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x207d, 0x4240)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_ADVANTECH, 0x8312)
@@ -10283,6 +10311,14 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1cc4, 0x0201)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1018, 0x8238)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1f3f, 0x0610)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_LENOVO, 0x0220)
@@ -10291,10 +10327,30 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_LENOVO, 0x0221)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0222)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0223)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0224)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0225)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_LENOVO, 0x0520)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0521)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_LENOVO, 0x0522)
@@ -10315,6 +10371,26 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
PCI_VENDOR_ID_LENOVO, 0x0623)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0624)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0625)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0626)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0627)
+ },
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ PCI_VENDOR_ID_LENOVO, 0x0628)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1014, 0x0718)
@@ -10343,6 +10419,10 @@ static const struct pci_device_id pqi_pci_id_table[] = {
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1137, 0x0300)
},
+ {
+ PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
+ 0x1ded, 0x3301)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1ff9, 0x0045)
@@ -10491,6 +10571,10 @@ 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, 0x100b)
+ },
{
PCI_DEVICE_SUB(PCI_VENDOR_ID_ADAPTEC2, 0x028f,
0x1f51, 0x100e)
--
2.49.0.391.g4bbb303af6
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 3/5] Enhance WWID Logging Logic.
2025-04-23 18:32 [PATCH 0/5] smartpqi updates Don Brace
2025-04-23 18:32 ` [PATCH 1/5] smartpqi: take drives offline when controller is offline Don Brace
2025-04-23 18:32 ` [PATCH 2/5] smartpqi: add new pci ids Don Brace
@ 2025-04-23 18:32 ` Don Brace
2025-04-23 18:32 ` [PATCH 4/5] smartpqi: fix smp_processor_id() call trace for preemptible kernels Don Brace
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ 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
From: Venkatesh Emparala <Venkatesh.Emparala@microchip.com>
Log the extended WWID for NVMe devices and for devices that have the
firmware feature bit "PQI_FIRMWARE_FEATURE_RPL_EXTENDED_FORMAT_4_5"
enabled.
Log 8-bytes otherwise.
Reviewed-by: Scott Teel <scott.teel@microchip.com>
Reviewed-by: Scott Benesh <scott.benesh@microchip.com>
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com>
Signed-off-by: Venkatesh Emparala <Venkatesh.Emparala@microchip.com>
Signed-off-by: Don Brace <don.brace@microchip.com>
---
drivers/scsi/smartpqi/smartpqi_init.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index 3cb8619e9ce9..efc042071ec0 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -2011,18 +2011,31 @@ static void pqi_dev_info(struct pqi_ctrl_info *ctrl_info,
PQI_DEV_INFO_BUFFER_LENGTH - count,
"-:-");
- if (pqi_is_logical_device(device))
+ if (pqi_is_logical_device(device)) {
count += scnprintf(buffer + count,
PQI_DEV_INFO_BUFFER_LENGTH - count,
" %08x%08x",
*((u32 *)&device->scsi3addr),
*((u32 *)&device->scsi3addr[4]));
- else
+ } else if (ctrl_info->rpl_extended_format_4_5_supported) {
+ if (device->device_type == SA_DEVICE_TYPE_NVME)
+ count += scnprintf(buffer + count,
+ PQI_DEV_INFO_BUFFER_LENGTH - count,
+ " %016llx%016llx",
+ get_unaligned_be64(&device->wwid[0]),
+ get_unaligned_be64(&device->wwid[8]));
+ else
+ count += scnprintf(buffer + count,
+ PQI_DEV_INFO_BUFFER_LENGTH - count,
+ " %016llx",
+ get_unaligned_be64(&device->wwid[0]));
+ } else {
count += scnprintf(buffer + count,
PQI_DEV_INFO_BUFFER_LENGTH - count,
- " %016llx%016llx",
- get_unaligned_be64(&device->wwid[0]),
- get_unaligned_be64(&device->wwid[8]));
+ " %016llx",
+ get_unaligned_be64(&device->wwid[0]));
+ }
+
count += scnprintf(buffer + count, PQI_DEV_INFO_BUFFER_LENGTH - count,
" %s %.8s %.16s ",
--
2.49.0.391.g4bbb303af6
^ permalink raw reply related [flat|nested] 8+ messages in thread