linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiping Ma <jiping.ma2@windriver.com>
To: jejb@linux.ibm.com, martin.petersen@oracle.com,
	scott.benesh@microchip.com, don.brace@microchip.com,
	scott.teel@microchip.com, kevin.barnett@microchip.com,
	Murthy.Bhat@microchip.com, jiping.ma2@windriver.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	yue.tao@windriver.com
Subject: [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type.
Date: Sun, 10 Oct 2021 19:46:11 -0700	[thread overview]
Message-ID: <20211011024611.152626-1-jiping.ma2@windriver.com> (raw)

Current version:
/sys/devices/pci0000:36/0000:36:02.0/0000:3b:00.0/host0/scsi_host/host0$
find -name sas_address -print -exec cat {} \;
./port-0:3/end_device-0:3/sas_device/end_device-0:3/sas_address
0x0000000000000000
./port-0:3/end_device-0:3/target0:0:2/0:0:2:0/sas_address
cat: ./port-0:3/end_device-0:3/target0:0:2/0:0:2:0/sas_address:
No such device
./port-0:1/end_device-0:1/target0:0:0/0:0:0:0/sas_address
cat: ./port-0:1/end_device-0:1/target0:0:0/0:0:0:0/sas_address:
No such device
./port-0:1/end_device-0:1/sas_device/end_device-0:1/sas_address
0x0000000000000000
./port-0:4/end_device-0:4/sas_device/end_device-0:4/sas_address
0x0000000000000000
./port-0:4/end_device-0:4/target0:0:3/0:0:3:0/sas_address
cat: ./port-0:4/end_device-0:4/target0:0:3/0:0:3:0/sas_address:
No such device
./port-0:2/end_device-0:2/sas_device/end_device-0:2/sas_address
0x0000000000000000
./port-0:2/end_device-0:2/target0:0:1/0:0:1:0/sas_address
cat: ./port-0:2/end_device-0:2/target0:0:1/0:0:1:0/sas_address:
No such device

After patch applied:
/sys/devices/pci0000:36/0000:36:02.0/0000:3b:00.0/host0/scsi_host/host0$
find -name sas_address -print -exec cat {} \;
./port-0:3/end_device-0:3/sas_device/end_device-0:3/sas_address
0x31402ec001d92985
./port-0:3/end_device-0:3/target0:0:2/0:0:2:0/sas_address
0x31402ec001d92985
./port-0:1/end_device-0:1/target0:0:0/0:0:0:0/sas_address
0x31402ec001d92983
./port-0:1/end_device-0:1/sas_device/end_device-0:1/sas_address
0x31402ec001d92983
./port-0:4/end_device-0:4/sas_device/end_device-0:4/sas_address
0x31402ec001d92986
./port-0:4/end_device-0:4/target0:0:3/0:0:3:0/sas_address
0x31402ec001d92986
./port-0:2/end_device-0:2/sas_device/end_device-0:2/sas_address
0x31402ec001d92984
./port-0:2/end_device-0:2/target0:0:1/0:0:1:0/sas_address
0x31402ec001d92984

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


             reply	other threads:[~2021-10-11  2:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11  2:46 Jiping Ma [this message]
2021-10-14  0:44 ` [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type Ma, Jiping
2021-10-19 15:54   ` Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211011024611.152626-1-jiping.ma2@windriver.com \
    --to=jiping.ma2@windriver.com \
    --cc=Murthy.Bhat@microchip.com \
    --cc=don.brace@microchip.com \
    --cc=jejb@linux.ibm.com \
    --cc=kevin.barnett@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=scott.benesh@microchip.com \
    --cc=scott.teel@microchip.com \
    --cc=yue.tao@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).