linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][V2] scsi: smartpqi: Enable sas_address sysfs for SATA device type.
@ 2021-10-21  6:22 Jiping Ma
  0 siblings, 0 replies; only message in thread
From: Jiping Ma @ 2021-10-21  6:22 UTC (permalink / raw)
  To: jejb, martin.petersen, scott.benesh, don.brace, scott.teel,
	kevin.barnett, Murthy.Bhat, jiping.ma2
  Cc: linux-scsi, linux-kernel, yue.tao

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 <jiping.ma2@windriver.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-21  6:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21  6:22 [PATCH][V2] scsi: smartpqi: Enable sas_address sysfs for SATA device type Jiping Ma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).