summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2017-01-09 22:33:36 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-01-17 19:58:57 +0100
commit9373eba6cfae48911b977d14323032cd5d161aae (patch)
tree03734392f22fdafef98505897cd9855688ed2ec2
parentscsi: libfc: Fix variable name in fc_set_wwpn (diff)
downloadlinux-9373eba6cfae48911b977d14323032cd5d161aae.tar.xz
linux-9373eba6cfae48911b977d14323032cd5d161aae.zip
scsi: ses: Fix SAS device detection in enclosure
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@redhat.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/ses.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index 8c9a35c91705..50adabbb5808 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) {