From patchwork Mon Aug 8 22:53:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian King X-Patchwork-Id: 9269915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 259B7607D6 for ; Mon, 8 Aug 2016 22:53:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 172492815E for ; Mon, 8 Aug 2016 22:53:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 095D127FE4; Mon, 8 Aug 2016 22:53:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB5CE27FE4 for ; Mon, 8 Aug 2016 22:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752258AbcHHWxW (ORCPT ); Mon, 8 Aug 2016 18:53:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:6651 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751998AbcHHWxU (ORCPT ); Mon, 8 Aug 2016 18:53:20 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u78Mp6NO010029 for ; Mon, 8 Aug 2016 18:53:19 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 24nbs0udqy-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 08 Aug 2016 18:53:19 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 8 Aug 2016 16:53:18 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 8 Aug 2016 16:53:14 -0600 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: brking@linux.vnet.ibm.com Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 44EEF1FF0043; Mon, 8 Aug 2016 16:52:56 -0600 (MDT) Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u78MrDX2983472; Mon, 8 Aug 2016 15:53:13 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AA50E13603C; Mon, 8 Aug 2016 16:53:13 -0600 (MDT) Received: from [9.10.127.177] (unknown [9.10.127.177]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 19112136043; Mon, 8 Aug 2016 16:53:13 -0600 (MDT) 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> 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Tested-by: Michael Ellerman 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; }