Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1464456

[PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of is_sas_attached

From Johannes Thumshirn <jthumshirn@suse.de>
Newsgroups linux.kernel
Subject [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of is_sas_attached
Date 2016-08-17 11:50 +0200
Message-ID <s75DY-7DZ-19@gated-at.bofh.it> (permalink)
References <s75DX-7DZ-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of is_sas_attached Johannes Thumshirn <jthumshirn@suse.de> - 2016-08-17 11:50 +0200
  Re: [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of  is_sas_attached James Bottomley <jejb@linux.vnet.ibm.com> - 2016-08-18 21:30 +0200
    Re: [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of  is_sas_attached Johannes Thumshirn <jthumshirn@suse.de> - 2016-08-19 09:00 +0200
  Re: [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of  is_sas_attached James Bottomley <jejb@linux.vnet.ibm.com> - 2016-08-19 03:10 +0200
  Re: [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of  is_sas_attached kbuild test robot <lkp@intel.com> - 2016-08-22 11:00 +0200
    Re: [PATCH v4 2/3] ses: use scsi_is_sas_rphy instead of  is_sas_attached Johannes Thumshirn <jthumshirn@suse.de> - 2016-08-24 09:50 +0200

csiph-web