ses: Fix SAS device detection in enclosure
PATCH 1/1 ses: Fix SAS device detection in enclosure
From: "Ewan D. Milne" <[email protected]>
The call to scsi_is_sas_rphy() needs to be made on the SAS end_device, not on the SCSI device.
--- drivers/scsi/ses.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ses.c +1 -1
@@ -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) {
Signature · 1 line
1.8.3.1
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ewan" == Ewan D Milne <[email protected]> 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> <[email protected]> Signed-off-by: Ewan D. Milne Ewan> <[email protected]> ---
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?
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 22 lines · Martin K . Petersen
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ewan" == Ewan D Milne <[email protected]> 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: usescsi_is_sas_rphyinstead of Ewan>is_sas_attached") Reviewed-by: Johannes Thumshirn Ewan> <[email protected]> Signed-off-by: Ewan D. Milne Ewan> <[email protected]> ---
Ewan>drivers/scsi/ses.c| 2 +- 1 file changed, 1 insertion(+), 1 Ewan> deletion(-)Ewan> diff --git
a/drivers/scsi/ses.cb/drivers/scsi/ses.cindex 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);
Quoted 8 lines
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.1James?
FWIW I have positive test results from a customer of ours with this as well.
Thanks,
Johannes
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +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
Quoted 9 lines · Ewan D. Milne
From: "Ewan D. Milne" <[email protected]>
The call to
scsi_is_sas_rphy()needs to be made on the SASend_device, not on the SCSI device.Fixes 835831c57e9b ("ses: use scsi_is_sas_rphy instead of
is_sas_attached")Reviewed-by Johannes Thumshirn <[email protected]>Signed-off-by Ewan D. Milne <[email protected]>
Yes, looks good to me as well
Martin K. Petersen
AppliedQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ewan" == Ewan D Milne <[email protected]> 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.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering