From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55724 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935651AbcJFNZr (ORCPT ); Thu, 6 Oct 2016 09:25:47 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u96DO0Ho081858 for ; Thu, 6 Oct 2016 09:25:46 -0400 Received: from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153]) by mx0a-001b2d01.pphosted.com with ESMTP id 25wj3yh342-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 06 Oct 2016 09:25:45 -0400 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Oct 2016 07:25:45 -0600 Subject: Re: [PATCH 4.7 122/141] scsi: ses: use scsi_is_sas_rphy instead of is_sas_attached From: James Bottomley To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Johannes Thumshirn , "Martin K. Petersen" Date: Thu, 06 Oct 2016 21:25:34 +0800 In-Reply-To: <20161006074453.928083311@linuxfoundation.org> References: <20161006074448.608056610@linuxfoundation.org> <20161006074453.928083311@linuxfoundation.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: <1475760334.3744.2.camel@linux.vnet.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: On Thu, 2016-10-06 at 10:29 +0200, Greg Kroah-Hartman wrote: > 4.7-stable review patch. If anyone has any objections, please let me > know. This doesn't build if SCSI_SAS_ATTRS isn't set without this patch: commit c1a23f6d64552b4480208aa584ec7e9c13d6d9c3 Author: Johannes Thumshirn Date: Wed Aug 17 11:46:16 2016 +0200 scsi: sas: provide stub implementation for scsi_is_sas_rphy Does it? James > ------------------ > > From: Johannes Thumshirn > > commit 835831c57e9b0cccc24e96a812542875471d75b5 upstream. > > 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') > Signed-off-by: Johannes Thumshirn > Reviewed-by: James E.J. Bottomley > Signed-off-by: Martin K. Petersen > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/scsi/ses.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/scsi/ses.c > +++ b/drivers/scsi/ses.c > @@ -587,7 +587,7 @@ static void ses_match_to_enclosure(struc > > 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) { > >