From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752308AbcHHWxY (ORCPT ); Mon, 8 Aug 2016 18:53:24 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53680 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751433AbcHHWxT (ORCPT ); Mon, 8 Aug 2016 18:53:19 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: brking@linux.vnet.ibm.com Subject: [PATCH] ipr: Fix sync scsi scan To: Michael Ellerman , James Bottomley , Andrew Morton , Linus Torvalds References: <1470439261.2337.63.camel@HansenPartnership.com> <87popjshn6.fsf@concordia.ellerman.id.au> Cc: linux-scsi , linux-kernel , "Martin K. Petersen" , "aneesh.kumar@linux.vnet.ibm.com" From: Brian King Date: Mon, 8 Aug 2016 17:53:12 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <87popjshn6.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16080822-0020-0000-0000-000009826CD6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005568; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000178; SDB=6.00741934; UDB=6.00349173; IPR=6.00514492; BA=6.00004651; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012254; XFM=3.00000011; UTC=2016-08-08 22:53:16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16080822-0021-0000-0000-00005464DDEF Message-Id: <11d0860f-b8dd-61a4-ac32-3ce6da208d74@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-08_15:,, 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-1604210000 definitions=main-1608080246 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/08/2016 05:02 AM, Michael Ellerman wrote: > James Bottomley writes: > >> This is seven basic fixes (plus one MAINTAINERS update) which came in >> close to the merge window. >> >> The patch is available here: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc >> >> The short changelog is: >> >> Brian King (1): >> ipr: Wait to do async scan until scsi host is initialized > > This commit seems to be causing a ~10 minute pause during boot on my > powerpc boxes which have an IPR, eg: Sorry about that. I fixed up async scan and managed to break sync scan... This patch fixes it on my box. Does it fix the issue for you as well? Thanks, Brian -- Brian King Power Linux I/O IBM Linux Technology Center 8< Commit b195d5e2bffd3de3f07e8683e6abddf099ea0822 fixed async scan for ipr, but broke sync scan for ipr. This fixes sync scan back up. Signed-off-by: Brian King --- drivers/scsi/ipr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff -puN drivers/scsi/ipr.c~ipr_async_scan_fixup_again drivers/scsi/ipr.c --- linux-2.6.git/drivers/scsi/ipr.c~ipr_async_scan_fixup_again 2016-08-08 17:48:51.637984104 -0500 +++ linux-2.6.git-bjking1/drivers/scsi/ipr.c 2016-08-08 17:48:51.643984056 -0500 @@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pde __ipr_remove(pdev); return rc; } + spin_lock_irqsave(ioa_cfg->host->host_lock, flags); + ioa_cfg->scan_enabled = 1; + schedule_work(&ioa_cfg->work_q); + spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); - scsi_scan_host(ioa_cfg->host); ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight; if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) { @@ -10421,10 +10424,8 @@ static int ipr_probe(struct pci_dev *pde } } - spin_lock_irqsave(ioa_cfg->host->host_lock, flags); - ioa_cfg->scan_enabled = 1; - schedule_work(&ioa_cfg->work_q); - spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); + scsi_scan_host(ioa_cfg->host); + return 0; } _