All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libsas: set sas_address and device type of rphy
@ 2011-09-23  6:32 Jack Wang
  2011-09-24  1:54 ` Dan Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Wang @ 2011-09-23  6:32 UTC (permalink / raw)
  To: 'James Bottomley', linux-scsi
  Cc: 'Dan Williams', 'Xiangliang Yu',
	'Mark Salyzyn', 'Luben Tuikov',
	lindar_liu, '于爱华'

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

Hi James,

Libsas forget to set the sas_address and device type of rphy lead to file
under /sys/class/sas_x show wrong value, fix that.

>From 976849ae6da4bc454a89d91b98824c915d3c99a2 Mon Sep 17 00:00:00 2001
From: Jack Wang <jack_wang@usish.com>
Date: Fri, 23 Sep 2011 14:19:24 +0800
Subject: [PATCH] set rphy sas_address and device type correctly

Signed-off-by: Jack Wang <jack_wang@usish.com>
Tested-by: Crystal Yu <crystal_yu@usish.com>
---
 sas_expander.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sas_expander.c b/sas_expander.c
index 874e29d..4ad0a40 100644
--- a/sas_expander.c
+++ b/sas_expander.c
@@ -199,6 +199,8 @@ static void sas_set_ex_phy(struct domain_device *dev,
int phy_id,
 	phy->virtual = dr->virtual;
 	phy->last_da_index = -1;
 
+	phy->phy->identify.sas_address = SAS_ADDR(phy->attached_sas_addr);
+	phy->phy->identify.device_type = phy->attached_dev_type;
 	phy->phy->identify.initiator_port_protocols = phy->attached_iproto;
 	phy->phy->identify.target_port_protocols = phy->attached_tproto;
 	phy->phy->identify.phy_identifier = phy_id;
-- 
1.7.4.msysgit.0

[-- Attachment #2: 0001-set-rphy-sas_address-and-device-type-correctly.patch --]
[-- Type: application/octet-stream, Size: 1007 bytes --]

>From 976849ae6da4bc454a89d91b98824c915d3c99a2 Mon Sep 17 00:00:00 2001
From: Jack Wang <jack_wang@usish.com>
Date: Fri, 23 Sep 2011 14:19:24 +0800
Subject: [PATCH] set rphy sas_address and device type correctly

Signed-off-by: Jack Wang <jack_wang@usish.com>
Tested-by: Crystal Yu <crystal_yu@usish.com>
---
 sas_expander.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sas_expander.c b/sas_expander.c
index 874e29d..4ad0a40 100644
--- a/sas_expander.c
+++ b/sas_expander.c
@@ -199,6 +199,8 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id,
 	phy->virtual = dr->virtual;
 	phy->last_da_index = -1;
 
+	phy->phy->identify.sas_address = SAS_ADDR(phy->attached_sas_addr);
+	phy->phy->identify.device_type = phy->attached_dev_type;
 	phy->phy->identify.initiator_port_protocols = phy->attached_iproto;
 	phy->phy->identify.target_port_protocols = phy->attached_tproto;
 	phy->phy->identify.phy_identifier = phy_id;
-- 
1.7.4.msysgit.0


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

* Re: [PATCH] libsas: set sas_address and device type of rphy
  2011-09-23  6:32 [PATCH] libsas: set sas_address and device type of rphy Jack Wang
@ 2011-09-24  1:54 ` Dan Williams
  2011-09-26  0:47   ` Jack Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Williams @ 2011-09-24  1:54 UTC (permalink / raw)
  To: Jack Wang
  Cc: James Bottomley, linux-scsi, Xiangliang Yu, Mark Salyzyn,
	Luben Tuikov, lindar_liu, 于爱华

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

2011/9/22 Jack Wang <jack_wang@usish.com>:
> Hi James,
>
> Libsas forget to set the sas_address and device type of rphy lead to file
> under /sys/class/sas_x show wrong value, fix that.
>
> From 976849ae6da4bc454a89d91b98824c915d3c99a2 Mon Sep 17 00:00:00 2001
> From: Jack Wang <jack_wang@usish.com>
> Date: Fri, 23 Sep 2011 14:19:24 +0800
> Subject: [PATCH] set rphy sas_address and device type correctly
>
> Signed-off-by: Jack Wang <jack_wang@usish.com>
> Tested-by: Crystal Yu <crystal_yu@usish.com>
> ---
>  sas_expander.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Hi Jack, quick note, this patch does not apply...

> diff --git a/sas_expander.c b/sas_expander.c
> index 874e29d..4ad0a40 100644
> --- a/sas_expander.c
> +++ b/sas_expander.c

...should be:
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c

I went ahead and fixed this up.

--
Dan

[-- Attachment #2: 0001-set-rphy-sas_address-and-device-type-correctly.patch --]
[-- Type: application/octet-stream, Size: 1059 bytes --]

From 976849ae6da4bc454a89d91b98824c915d3c99a2 Mon Sep 17 00:00:00 2001
From: Jack Wang <jack_wang@usish.com>
Date: Fri, 23 Sep 2011 14:19:24 +0800
Subject: [PATCH] set rphy sas_address and device type correctly

Signed-off-by: Jack Wang <jack_wang@usish.com>
Tested-by: Crystal Yu <crystal_yu@usish.com>
---
 sas_expander.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c
index 874e29d..4ad0a40 100644
--- a/drivers/scsi/libsas/sas_expander.c
+++ b/drivers/scsi/libsas/sas_expander.c
@@ -199,6 +199,8 @@ static void sas_set_ex_phy(struct domain_device *dev, int phy_id,
 	phy->virtual = dr->virtual;
 	phy->last_da_index = -1;
 
+	phy->phy->identify.sas_address = SAS_ADDR(phy->attached_sas_addr);
+	phy->phy->identify.device_type = phy->attached_dev_type;
 	phy->phy->identify.initiator_port_protocols = phy->attached_iproto;
 	phy->phy->identify.target_port_protocols = phy->attached_tproto;
 	phy->phy->identify.phy_identifier = phy_id;
-- 
1.7.4.msysgit.0


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

* Re: [PATCH] libsas: set sas_address and device type of rphy
  2011-09-24  1:54 ` Dan Williams
@ 2011-09-26  0:47   ` Jack Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Wang @ 2011-09-26  0:47 UTC (permalink / raw)
  To: 'Dan Williams'
  Cc: 'James Bottomley', linux-scsi, 'Xiangliang Yu',
	'Mark Salyzyn', 'Luben Tuikov',
	lindar_liu, '于爱华'

Hi Dan,

Sorry for my mistake and thanks for your fix.
Re: [PATCH] libsas: set sas_address and device type of rphy
> 
> 2011/9/22 Jack Wang <jack_wang@usish.com>:
> > Hi James,
> >
> > Libsas forget to set the sas_address and device type of rphy lead to file
> > under /sys/class/sas_x show wrong value, fix that.
> >
> > From 976849ae6da4bc454a89d91b98824c915d3c99a2 Mon Sep 17 00:00:00 2001
> > From: Jack Wang <jack_wang@usish.com>
> > Date: Fri, 23 Sep 2011 14:19:24 +0800
> > Subject: [PATCH] set rphy sas_address and device type correctly
> >
> > Signed-off-by: Jack Wang <jack_wang@usish.com>
> > Tested-by: Crystal Yu <crystal_yu@usish.com>
> > ---
> >  sas_expander.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> Hi Jack, quick note, this patch does not apply...
> 
> > diff --git a/sas_expander.c b/sas_expander.c
> > index 874e29d..4ad0a40 100644
> > --- a/sas_expander.c
> > +++ b/sas_expander.c
> 
> ...should be:
> --- a/drivers/scsi/libsas/sas_expander.c
> +++ b/drivers/scsi/libsas/sas_expander.c
> 
> I went ahead and fixed this up.
> 
> --
> Dan


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

end of thread, other threads:[~2011-09-26  0:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23  6:32 [PATCH] libsas: set sas_address and device type of rphy Jack Wang
2011-09-24  1:54 ` Dan Williams
2011-09-26  0:47   ` Jack Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.