From patchwork Tue Jun 23 19:32:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Pearson X-Patchwork-Id: 6662971 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4A758C05AC for ; Tue, 23 Jun 2015 19:32:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5897B205BB for ; Tue, 23 Jun 2015 19:32:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7420320591 for ; Tue, 23 Jun 2015 19:32:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933505AbbFWTck (ORCPT ); Tue, 23 Jun 2015 15:32:40 -0400 Received: from pearsoncomputing.net ([192.119.205.242]:23905 "EHLO mail.pearsoncomputing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932728AbbFWTcj (ORCPT ); Tue, 23 Jun 2015 15:32:39 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 08AA3640A57; Tue, 23 Jun 2015 14:32:39 -0500 (CDT) Received: from mail.pearsoncomputing.net ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id md6Nj-0q8FOH; Tue, 23 Jun 2015 14:32:38 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 8A8DD640EB5; Tue, 23 Jun 2015 14:32:38 -0500 (CDT) DKIM-Filter: OpenDKIM Filter v2.9.2 mail.pearsoncomputing.net 8A8DD640EB5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineeringinc.com; s=5DF8A618-71A7-11E4-BA59-1A98DAB8A1D6; t=1435087958; bh=c3O/+1XPS6katNz1ew7ZcZUSuS6I0zifHTQStSskKhc=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding; b=ntbScWAicTBrYY0mt3JckJI/W6UFkkW0bLwMz9cOMa9pfYnP9rzN38+HIrFewiZNl rohxJoTELVZH/sDkJT1eaIl75KOulh8DzH5N062jWlEsLTM+qI1LFVXYhdY1h6t4bO wWU1pKOKchXRbIx+2pH0km2mm4wqUJ4s/Gk9PNFQ= X-Virus-Scanned: amavisd-new at pearsoncomputing.net Received: from mail.pearsoncomputing.net ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lcfpGG7yXCeQ; Tue, 23 Jun 2015 14:32:38 -0500 (CDT) Received: from vali.starlink.edu (vali.starlink.edu [192.168.3.21]) by mail.pearsoncomputing.net (Postfix) with ESMTP id 2A19C640A57; Tue, 23 Jun 2015 14:32:38 -0500 (CDT) Date: Tue, 23 Jun 2015 14:32:38 -0500 (CDT) From: Timothy Pearson To: James Bottomley Cc: Sreekanth Reddy , Joe Lawrence , Nagalakshmi Nandigama , Sreekanth Reddy , "Support (LSI)" , DL-MPTFusionLinux@lsi.com, linux-scsi@vger.kernel.org Message-ID: <1741634911.3158.1435087958045.JavaMail.zimbra@raptorengineeringinc.com> In-Reply-To: <216113403.3157.1435087917094.JavaMail.zimbra@raptorengineeringinc.com> References: <557B578D.50706@raptorengineeringinc.com> <1435066507.2251.10.camel@HansenPartnership.com> <55899867.3010400@raptorengineeringinc.com> <1435081516.2251.118.camel@HansenPartnership.com> <55899BBA.5030509@raptorengineeringinc.com> <1435082169.2251.120.camel@HansenPartnership.com> <55899E79.1010208@raptorengineeringinc.com> <1435083585.2251.125.camel@HansenPartnership.com> Subject: [PATCH] mpt3sas: Abort initialization if no memory I/O resources detected MIME-Version: 1.0 X-Originating-IP: [192.168.3.54] X-Mailer: Zimbra 8.5.0_GA_3042 (ZimbraWebClient - FF3.6 (Linux)/8.5.0_GA_3042) Thread-Topic: mpt3sas: Abort initialization if no memory I/O resources detected Thread-Index: AUb9c8ip1QrOq2PPwKAM1P2AS7AlqA== Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The mpt3sas driver crashes if the BIOS does not set up at least one memory I/O resource. This failure can happen if the device is too slow to respond during POST and is missed by the BIOS, but Linux then detects the device later in the boot process. Signed-off-by: Timothy Pearson --- drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 14a781b..4460d48 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -1865,6 +1865,13 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) } } + if (ioc->chip == NULL) { + printk(MPT3SAS_FMT "unable to map " + "adapter memory (resource not found)!\n", ioc->name); + r = -EINVAL; + goto out_fail; + } + _base_mask_interrupts(ioc); r = _base_get_ioc_facts(ioc, CAN_SLEEP);