From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941950AbcJFNZ4 (ORCPT ); Thu, 6 Oct 2016 09:25:56 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55240 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751308AbcJFNZq (ORCPT ); Thu, 6 Oct 2016 09:25:46 -0400 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" X-Mailer: Evolution 3.16.5 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16100613-0012-0000-0000-000010D30678 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005863; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000186; SDB=6.00765038; UDB=6.00365500; IPR=6.00540895; BA=6.00004791; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012894; XFM=3.00000011; UTC=2016-10-06 13:25:44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16100613-0013-0000-0000-00004615E171 Message-Id: <1475760334.3744.2.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-10-06_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1610060238 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) { > >