All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ses: Fix SAS device detection in enclosure
@ 2017-01-09 21:33 Ewan D. Milne
  2017-01-16 21:02 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ewan D. Milne @ 2017-01-09 21:33 UTC (permalink / raw)
  To: linux-scsi

From: "Ewan D. Milne" <emilne@redhat.com>

The call to scsi_is_sas_rphy() needs to be made on the
SAS end_device, not on the SCSI device.

Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of is_sas_attached")
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
---
 drivers/scsi/ses.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 8c9a35c..50adabb 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,
 
 	ses_enclosure_data_process(edev, to_scsi_device(edev->edev.parent), 0);
 
-	if (scsi_is_sas_rphy(&sdev->sdev_gendev))
+	if (scsi_is_sas_rphy(sdev->sdev_target->dev.parent))
 		efd.addr = sas_get_address(sdev);
 
 	if (efd.addr) {
-- 
1.8.3.1


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

* Re: [PATCH] ses: Fix SAS device detection in enclosure
  2017-01-09 21:33 [PATCH] ses: Fix SAS device detection in enclosure Ewan D. Milne
@ 2017-01-16 21:02 ` Martin K. Petersen
  2017-01-17  7:56   ` Johannes Thumshirn
  2017-01-17 14:47 ` James Bottomley
  2017-01-17 19:02 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Martin K. Petersen @ 2017-01-16 21:02 UTC (permalink / raw)
  To: Ewan D. Milne; +Cc: linux-scsi, James Bottomley

>>>>> "Ewan" == Ewan D Milne <emilne@redhat.com> writes:

Ewan> The call to scsi_is_sas_rphy() needs to be made on the SAS
Ewan> end_device, not on the SCSI device.

Ewan> Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of
Ewan> is_sas_attached") Reviewed-by: Johannes Thumshirn
Ewan> <jthumshirn@suse.de> Signed-off-by: Ewan D. Milne
Ewan> <emilne@redhat.com> ---
Ewan>  drivers/scsi/ses.c | 2 +- 1 file changed, 1 insertion(+), 1
Ewan>  deletion(-)

Ewan> diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index
Ewan> 8c9a35c..50adabb 100644
Ewan> --- a/drivers/scsi/ses.c
Ewan> +++ b/drivers/scsi/ses.c
Ewan> @@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct
Ewan> enclosure_device *edev,
 
Ewan>  	ses_enclosure_data_process(edev,
Ewan>  	to_scsi_device(edev->edev.parent), 0);
 
Ewan> - if (scsi_is_sas_rphy(&sdev->sdev_gendev))
Ewan> + if (scsi_is_sas_rphy(sdev->sdev_target->dev.parent))
Ewan>  		efd.addr = sas_get_address(sdev);
 
Ewan>  	if (efd.addr) {
Ewan> -- 1.8.3.1

James?

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] ses: Fix SAS device detection in enclosure
  2017-01-16 21:02 ` Martin K. Petersen
@ 2017-01-17  7:56   ` Johannes Thumshirn
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2017-01-17  7:56 UTC (permalink / raw)
  To: Martin K. Petersen; +Cc: Ewan D. Milne, linux-scsi, James Bottomley

On Mon, Jan 16, 2017 at 04:02:24PM -0500, Martin K . Petersen wrote:
> >>>>> "Ewan" == Ewan D Milne <emilne@redhat.com> writes:
> 
> Ewan> The call to scsi_is_sas_rphy() needs to be made on the SAS
> Ewan> end_device, not on the SCSI device.
> 
> Ewan> Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of
> Ewan> is_sas_attached") Reviewed-by: Johannes Thumshirn
> Ewan> <jthumshirn@suse.de> Signed-off-by: Ewan D. Milne
> Ewan> <emilne@redhat.com> ---
> Ewan>  drivers/scsi/ses.c | 2 +- 1 file changed, 1 insertion(+), 1
> Ewan>  deletion(-)
> 
> Ewan> diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index
> Ewan> 8c9a35c..50adabb 100644
> Ewan> --- a/drivers/scsi/ses.c
> Ewan> +++ b/drivers/scsi/ses.c
> Ewan> @@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struct
> Ewan> enclosure_device *edev,
>  
> Ewan>  	ses_enclosure_data_process(edev,
> Ewan>  	to_scsi_device(edev->edev.parent), 0);
>  
> Ewan> - if (scsi_is_sas_rphy(&sdev->sdev_gendev))
> Ewan> + if (scsi_is_sas_rphy(sdev->sdev_target->dev.parent))
> Ewan>  		efd.addr = sas_get_address(sdev);
>  
> Ewan>  	if (efd.addr) {
> Ewan> -- 1.8.3.1
> 
> James?

FWIW I have positive test results from a customer of ours with this as well.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* Re: [PATCH] ses: Fix SAS device detection in enclosure
  2017-01-09 21:33 [PATCH] ses: Fix SAS device detection in enclosure Ewan D. Milne
  2017-01-16 21:02 ` Martin K. Petersen
@ 2017-01-17 14:47 ` James Bottomley
  2017-01-17 19:02 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2017-01-17 14:47 UTC (permalink / raw)
  To: Ewan D. Milne, linux-scsi

On Mon, 2017-01-09 at 16:33 -0500, Ewan D. Milne wrote:
> From: "Ewan D. Milne" <emilne@redhat.com>
> 
> The call to scsi_is_sas_rphy() needs to be made on the
> SAS end_device, not on the SCSI device.
> 
> Fixes: 835831c57e9b ("ses: use scsi_is_sas_rphy instead of
> is_sas_attached")
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>

Yes, looks good to me as well

Reviewed-by: James Bottomley <James.Bottomley@HansenPartnership.com>



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

* Re: [PATCH] ses: Fix SAS device detection in enclosure
  2017-01-09 21:33 [PATCH] ses: Fix SAS device detection in enclosure Ewan D. Milne
  2017-01-16 21:02 ` Martin K. Petersen
  2017-01-17 14:47 ` James Bottomley
@ 2017-01-17 19:02 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2017-01-17 19:02 UTC (permalink / raw)
  To: Ewan D. Milne; +Cc: linux-scsi

>>>>> "Ewan" == Ewan D Milne <emilne@redhat.com> writes:

Ewan> The call to scsi_is_sas_rphy() needs to be made on the SAS
Ewan> end_device, not on the SCSI device.

Applied to 4.10/scsi-fixes.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2017-01-17 19:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 21:33 [PATCH] ses: Fix SAS device detection in enclosure Ewan D. Milne
2017-01-16 21:02 ` Martin K. Petersen
2017-01-17  7:56   ` Johannes Thumshirn
2017-01-17 14:47 ` James Bottomley
2017-01-17 19:02 ` Martin K. Petersen

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.