From: Keith Busch <keith.busch@intel.com>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>
Cc: "Busch, Keith" <keith.busch@intel.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>,
Sreekanth Reddy <Sreekanth.Reddy@lsi.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: RE: [RFC PATCH] Let device drivers disable msi on shutdown
Date: Tue, 24 Jun 2014 16:25:53 -0600 (MDT) [thread overview]
Message-ID: <alpine.LRH.2.03.1406241603580.4699@AMR> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B402958B4AD28@G9W0745.americas.hpqcorp.net>
On Tue, 24 Jun 2014, Elliott, Robert (Server Storage) wrote:
> 1. That will cover the .shutdown function used by mptfc.c, mptspi.c,
> and mptscsih.c, but mptsas.c uses mptsas_shutdown rather than
> mptscsih_shutdown. It doesn't call pci_disable_msi either.
Missed that; thanks.
> 2. mptscsih_suspend is another caller of mptscsih_shutdown
> (although the latter does nothing right now). This is done
> before calling mpt_suspend, which writes to some chip registers
> to disable interrupts before calling pci_disable_msi. Adding a
> pci_disable_msi call before those writes might not be safe.
Clearly more paths into this function than I investigated.
> 3. That mptscsih_suspend call chain will result in calling
> pci_disable_msi twice, which might trigger this in
> pci_disable_msi -> pci_msi_shutdown:
> BUG_ON(list_empty(&dev->msi_list));
Ah, but pci_disable_msi will not even invoke pci_msi_shutdown:
if (!pci_msi_enable || !dev || !dev->msi_enabled)
return;
The same check is done in pci_msi_shutdown. If that check wasn't there,
every driver would hit that BUG_ON since most every other pci driver
disables their interrupts in their shutdown path before returning, and
then pci-driver calls it again! MPT appears to be the exception.
next prev parent reply other threads:[~2014-06-24 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 16:48 [RFC PATCH] Let device drivers disable msi on shutdown Keith Busch
2014-06-24 21:21 ` Elliott, Robert (Server Storage)
2014-06-24 22:25 ` Keith Busch [this message]
2014-07-10 18:38 ` Bjorn Helgaas
2014-07-10 18:53 ` Keith Busch
2014-07-10 19:53 ` Bjorn Helgaas
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=alpine.LRH.2.03.1406241603580.4699@AMR \
--to=keith.busch@intel.com \
--cc=Elliott@hp.com \
--cc=Nagalakshmi.Nandigama@lsi.com \
--cc=Sreekanth.Reddy@lsi.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-scsi@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox