]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ses: use scsi_is_sas_rphy instead of is_sas_attached
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 17 Aug 2016 09:46:17 +0000 (11:46 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Aug 2016 02:22:19 +0000 (22:22 -0400)
commit39b8e8edcdacb917673773f3513b12dbf1079385
tree1cfb9d4cf49fcb963bd451d1e30841d32681027f
parent9522ef16662e8b6726ab546c4533ebc4e5d136fb
scsi: ses: use scsi_is_sas_rphy instead of is_sas_attached

Use scsi_is_sas_rphy() instead of is_sas_attached() to decide whether we
should obtain the SAS address from a scsi device or not. This will
prevent us from tripping on the BUG_ON() in sas_sdev_to_rdev() if the
rphy isn't attached to the SAS transport class, like it is with hpsa's
logical devices.

Fixes: 0ee1443f9 ('ses: fix discovery of SATA devices in SAS enclosures')
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ses.c