Commit 63b70075 authored by Ewan D. Milne's avatar Ewan D. Milne Committed by Thadeu Lima de Souza Cascardo

scsi: ses: Fix SAS device detection in enclosure

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: 835831c5 ("ses: use scsi_is_sas_rphy instead of is_sas_attached")
Signed-off-by: default avatarEwan D. Milne <emilne@redhat.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
(back ported from commit 9373eba6)
Signed-off-by: default avatarJoseph Salisbury <joseph.salisbury@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 908c4745
...@@ -586,7 +586,7 @@ static void ses_match_to_enclosure(struct enclosure_device *edev, ...@@ -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); 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); efd.addr = sas_get_address(sdev);
if (efd.addr) { if (efd.addr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment