linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type.
@ 2021-10-11  2:46 Jiping Ma
  2021-10-14  0:44 ` Ma, Jiping
  0 siblings, 1 reply; 3+ messages in thread
From: Jiping Ma @ 2021-10-11  2:46 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

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type.
  2021-10-11  2:46 [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type Jiping Ma
@ 2021-10-14  0:44 ` Ma, Jiping
  2021-10-19 15:54   ` Paul Gortmaker
  0 siblings, 1 reply; 3+ messages in thread
From: Ma, Jiping @ 2021-10-14  0:44 UTC (permalink / raw)
  To: jejb, martin.petersen, scott.benesh, don.brace, scott.teel,
	kevin.barnett, Murthy.Bhat
  Cc: linux-scsi, linux-kernel, yue.tao

ping

Thanks,

Jiping

On 10/11/2021 10:46 AM, Jiping Ma wrote:
> 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:

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type.
  2021-10-14  0:44 ` Ma, Jiping
@ 2021-10-19 15:54   ` Paul Gortmaker
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Gortmaker @ 2021-10-19 15:54 UTC (permalink / raw)
  To: Ma, Jiping
  Cc: jejb, martin.petersen, scott.benesh, don.brace, scott.teel,
	kevin.barnett, Murthy.Bhat, linux-scsi, linux-kernel, yue.tao

[Re: [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type.] On 14/10/2021 (Thu 08:44) Ma, Jiping wrote:

> ping
> 
> Thanks,

If you want prompt responses, you can help yourself by writing proper
commit logs that don't assume everyone has the exact same context in
their mind that you have on your specific problem.

Start with a clear problem statement that covers the symptoms.

  "When I connect device type ABC to host XYZ, I can't do foobar,
   because I get <describe symptoms here>"

Then describe the technical "why" it happens, showing that you
understand what is going on.

  "This happens because device types ABC are excluded from being
  treated/processed with <functions/code/whatever>"

Finally describe what your chosen fix is and why it is the best possible
choice to fix things, with the least risk of side effects.

  "We can add type ABC to class foobar, since it supports all the
   basic functions of class XYZ and works transparently without gaps."

Additional details like command line output are good, but you shouldn't
fill the commit log with nothing but them.   Be concise when adding
captured output - only show what needs to be shown.

Finally, don't send a "ping" only a couple days after your original
send.  Speaking for myself, if someone does that to me, they immediately
go to the end of my queue.   Maintainers are busy.  Be patient and
polite and write good commit logs and things will probably go a lot
better for you.

Paul.
--

> 
> Jiping
> 
> On 10/11/2021 10:46 AM, Jiping Ma wrote:
> > 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:

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-19 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-11  2:46 [PATCH] scsi: smartpqi: Enable sas_address sys fs for SATA device type Jiping Ma
2021-10-14  0:44 ` Ma, Jiping
2021-10-19 15:54   ` Paul Gortmaker

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).