diff --git a/kernel-rt/centos/kernel-rt.spec b/kernel-rt/centos/kernel-rt.spec index 24ec14f4..a4769a93 100644 --- a/kernel-rt/centos/kernel-rt.spec +++ b/kernel-rt/centos/kernel-rt.spec @@ -786,6 +786,7 @@ Patch6: 0007-turn-off-write-same-in-smartqpi-driver.patch Patch7: 0008-Allow-dmar-quirks-for-broken-bioses.patch Patch8: 0009-tpm-ignore-burstcount-to-improve-tpm_tis-send-perfor.patch Patch9: 0010-restrict-iSCSI-kthreads-to-CPUs-in-cpu_kthread_mask.patch +Patch10: 0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch # END OF PATCH DEFINITIONS %endif diff --git a/kernel-rt/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch b/kernel-rt/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch new file mode 100644 index 00000000..202ddafd --- /dev/null +++ b/kernel-rt/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch @@ -0,0 +1,41 @@ +From 2a32d5bc7e385fbf40f22cc413354e17a24d4de9 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 10 Oct 2021 18:56:26 -0700 +Subject: [PATCH] scsi: smartpqi: Enable sas_address sysfs for SATA device + type. + +We met the issue DM complains that it can't find the disk specified +in the deployment config file after we updated the Linux kernel to 5.10. +The error is "failed to find disk for path /dev/disk/by-path/ +pci-0000:3b:00.0-sas-0x31402ec001d92983-lun-0" + +This happens because device type SATA is excluded from being +processed with the function pqi_is_device_with_sas_address. +which causes all SATA type disk drives to appear the same, having +zeroes in the lun name. /dev/disk/by-path/ +pci-0000:3b:00.0-sas-0x0000000000000000-lun-0 + +We can add type SA_DEVICE_TYPE_SATA to class device_with_sas_address, +since it will also get the sas_address from wwid. and works transparently +with the old kernel without gaps. + +Signed-off-by: Jiping Ma +--- + drivers/scsi/smartpqi/smartpqi_init.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c +index ecb2af3f43ca..df16e0a27a41 100644 +--- a/drivers/scsi/smartpqi/smartpqi_init.c ++++ b/drivers/scsi/smartpqi/smartpqi_init.c +@@ -2101,6 +2101,7 @@ static inline void pqi_mask_device(u8 *scsi3addr) + static inline bool pqi_is_device_with_sas_address(struct pqi_scsi_dev *device) + { + switch (device->device_type) { ++ case SA_DEVICE_TYPE_SATA: + case SA_DEVICE_TYPE_SAS: + case SA_DEVICE_TYPE_EXPANDER_SMP: + case SA_DEVICE_TYPE_SES: +-- +2.31.1 + diff --git a/kernel-std/centos/kernel.spec b/kernel-std/centos/kernel.spec index ea87abc5..51f53f3b 100644 --- a/kernel-std/centos/kernel.spec +++ b/kernel-std/centos/kernel.spec @@ -819,6 +819,7 @@ Patch6: 0007-turn-off-write-same-in-smartqpi-driver.patch Patch7: 0008-Allow-dmar-quirks-for-broken-bioses.patch Patch8: 0009-tpm-ignore-burstcount-to-improve-tpm_tis-send-perfor.patch Patch9: 0010-bpf-cgroups-Fix-cgroup-v2-fallback-on-v1-v2-mixed-mo.patch +Patch10: 0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch # END OF PATCH DEFINITIONS %endif diff --git a/kernel-std/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch b/kernel-std/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch new file mode 100644 index 00000000..202ddafd --- /dev/null +++ b/kernel-std/centos/patches/0011-scsi-smartpqi-Enable-sas_address-sysfs-for-SATA-dev.patch @@ -0,0 +1,41 @@ +From 2a32d5bc7e385fbf40f22cc413354e17a24d4de9 Mon Sep 17 00:00:00 2001 +From: Jiping Ma +Date: Sun, 10 Oct 2021 18:56:26 -0700 +Subject: [PATCH] scsi: smartpqi: Enable sas_address sysfs for SATA device + type. + +We met the issue DM complains that it can't find the disk specified +in the deployment config file after we updated the Linux kernel to 5.10. +The error is "failed to find disk for path /dev/disk/by-path/ +pci-0000:3b:00.0-sas-0x31402ec001d92983-lun-0" + +This happens because device type SATA is excluded from being +processed with the function pqi_is_device_with_sas_address. +which causes all SATA type disk drives to appear the same, having +zeroes in the lun name. /dev/disk/by-path/ +pci-0000:3b:00.0-sas-0x0000000000000000-lun-0 + +We can add type SA_DEVICE_TYPE_SATA to class device_with_sas_address, +since it will also get the sas_address from wwid. and works transparently +with the old kernel without gaps. + +Signed-off-by: Jiping Ma +--- + drivers/scsi/smartpqi/smartpqi_init.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c +index ecb2af3f43ca..df16e0a27a41 100644 +--- a/drivers/scsi/smartpqi/smartpqi_init.c ++++ b/drivers/scsi/smartpqi/smartpqi_init.c +@@ -2101,6 +2101,7 @@ static inline void pqi_mask_device(u8 *scsi3addr) + static inline bool pqi_is_device_with_sas_address(struct pqi_scsi_dev *device) + { + switch (device->device_type) { ++ case SA_DEVICE_TYPE_SATA: + case SA_DEVICE_TYPE_SAS: + case SA_DEVICE_TYPE_EXPANDER_SMP: + case SA_DEVICE_TYPE_SES: +-- +2.31.1 +