[SRU][Xenial][PATCH 4/4] scsi: ses: Fix SAS device detection in enclosure

Joseph Salisbury joseph.salisbury at canonical.com
Wed Sep 20 19:12:56 UTC 2017


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

BugLink: http://bugs.launchpad.net/bugs/1693369

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")
Signed-off-by: Ewan D. Milne <emilne at redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Reviewed-by: James Bottomley <James.Bottomley at HansenPartnership.com>
Signed-off-by: Martin K. Petersen <martin.petersen at oracle.com>
(back ported from commit 9373eba6cfae48911b977d14323032cd5d161aae)
Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.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 e10d87f..8a3164b 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -586,7 +586,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev,
 
 	ses_enclosure_data_process(edev, to_scsi_device(edev->edev.parent), 0);
 
-	if (is_sas_attached(sdev))
+	if (scsi_is_sas_rphy(sdev->sdev_target->dev.parent))
 		efd.addr = sas_get_address(sdev);
 
 	if (efd.addr) {
-- 
2.7.4





More information about the kernel-team mailing list