[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2cd0c62d68d9b0ea6e977c315e8b39ed0aa76416.1471273623.git.jthumshirn@suse.de>
Date: Mon, 15 Aug 2016 17:12:23 +0200
From: Johannes Thumshirn <jthumshirn@...e.de>
To: James Bottomley <jejb@...ux.vnet.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Cc: Hannes Reinecke <hare@...e.de>,
Linux Kernel Mailinglist <linux-kernel@...r.kernel.org>,
Linux SCSI Mailinglist <linux-scsi@...r.kernel.org>,
Johannes Thumshirn <jthumshirn@...e.de>,
stable@...r.kernel.org, #@...e.de, v4.5+@...e.de
Subject: [PATCH v2 2/3] 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: 3f8d6f2a0 ('ses: fix discovery of SATA devices in SAS enclosures')
Cc: stable@...r.kernel.org # v4.5+
Suggested-by: Hannes Reinecke <hare@...e.de>
Signed-off-by: Johannes Thumshirn <jthumshirn@...e.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
Powered by blists - more mailing lists