From: Bjorn Helgaas <bhelgaas@google.com>
To: Timothy Pearson <tpearson@raptorengineeringinc.com>
Cc: Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
Yinghai Lu <yinghai@kernel.org>,
James Bottomley <jejb@kernel.org>,
martin.petersen@oracle.com,
Linux-Scsi <linux-scsi@vger.kernel.org>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
Sathya.Prakash@avagotech.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH v3] [SCSI] mpt2sas, mpt3sas: Abort initialization if no memory I/O resources detected
Date: Wed, 15 Jul 2015 09:59:01 -0500 [thread overview]
Message-ID: <20150715145901.GU24416@google.com> (raw)
In-Reply-To: <55A6658D.6030802@raptorengineeringinc.com>
On Wed, Jul 15, 2015 at 08:52:13AM -0500, Timothy Pearson wrote:
> On 07/15/2015 01:24 AM, Sreekanth Reddy wrote:
> > On Tue, Jul 14, 2015 at 10:36:58PM -0700, Yinghai Lu wrote:
> >> On Tue, Jul 14, 2015 at 9:49 PM, Sreekanth Reddy
> >> <sreekanth.reddy@avagotech.com> wrote:
> >>> Driver crashes if the BIOS do 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.
> >>
> >> But pci subsystem should assign resources to those unassigned BAR.
> >>
> >> Do you mean even kernel can not assign resource to them? or it takes so long for
> >> mpt FW to get ready?
> >
> > This is not an issue from mpt FW.
> >
> > I have just kept the same description provide by Timothy in his
> > initial patch.
> >
> > But I observe that their may be chance of getting "unable to handle
> > kernel NULL pointer dereference" kernel panic if no Memory Resource
> > available in the PCI subsystem. So agreed to the Timothy proposal of
> > aborting the driver initialization if it doesn't detect any Memory
> > resource instead of whole system get into panic state.
>
> On some systems Linux is unable / unwilling to assign a BAR if the BIOS
> does not assign one at startup. I didn't look into the Linux allocator
> side of things in much detail, but it is quite possible that Linux is
> unaware the device only has partial resources assigned.
There might be a Linux PCI core bug if we don't assign a BAR, although
resource assignment can always fail, even in the absence of bugs.
But there is definitely a driver bug if it uses ioc->chip when it hasn't
been initialized. That's what this patch seems to fix.
Bjorn
next prev parent reply other threads:[~2015-07-15 14:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-15 4:49 [PATCH v3] [SCSI] mpt2sas, mpt3sas: Abort initialization if no memory I/O resources detected Sreekanth Reddy
2015-07-15 5:36 ` Yinghai Lu
2015-07-15 6:24 ` Sreekanth Reddy
2015-07-15 6:24 ` Sreekanth Reddy
2015-07-15 13:52 ` Timothy Pearson
2015-07-15 14:59 ` Bjorn Helgaas [this message]
2015-07-15 18:28 ` Yinghai Lu
2015-07-15 18:46 ` Timothy Pearson
2015-07-15 20:59 ` Bjorn Helgaas
2015-07-27 8:19 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150715145901.GU24416@google.com \
--to=bhelgaas@google.com \
--cc=JBottomley@parallels.com \
--cc=Sathya.Prakash@avagotech.com \
--cc=hch@infradead.org \
--cc=jejb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sreekanth.reddy@avagotech.com \
--cc=tpearson@raptorengineeringinc.com \
--cc=yinghai@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.