All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ses: use scsi_is_sas_rphy instead of is_sas_attached
@ 2016-08-15  8:52 Johannes Thumshirn
  2016-08-15  8:52 ` [PATCH 2/2] sas: remove is_sas_attached() Johannes Thumshirn
  2016-08-15 14:11   ` kbuild test robot
  0 siblings, 2 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2016-08-15  8:52 UTC (permalink / raw)
  To: James Bottomley, Martin K . Petersen
  Cc: Hannes Reinecke, Linux Kernel Mailinglist, Linux SCSI Mailinglist,
	Johannes Thumshirn, stable, #, v4.5+

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: 3f8d6f2a0 ('ses: fix discovery of SATA devices in SAS enclosures')
Cc: stable@vger.kernel.org # v4.5+
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 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 53ef1cb6..1d82053 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 (is_sas_attached(sdev))
+	if (scsi_is_sas_rphy(&sdev->sdev_gendev))
 		efd.addr = sas_get_address(sdev);
 
 	if (efd.addr) {
-- 
1.8.5.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-08-15 15:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-15  8:52 [PATCH 1/2] ses: use scsi_is_sas_rphy instead of is_sas_attached Johannes Thumshirn
2016-08-15  8:52 ` [PATCH 2/2] sas: remove is_sas_attached() Johannes Thumshirn
2016-08-15 14:11 ` [PATCH 1/2] ses: use scsi_is_sas_rphy instead of is_sas_attached kbuild test robot
2016-08-15 14:11   ` kbuild test robot
2016-08-15 14:25   ` James Bottomley
2016-08-15 14:40     ` Johannes Thumshirn
2016-08-15 14:40       ` Johannes Thumshirn
2016-08-15 14:59       ` James Bottomley
2016-08-15 15:04         ` Johannes Thumshirn
2016-08-15 15:04           ` Johannes Thumshirn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.