From: Keith Busch <keith.busch@intel.com>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Cc: Wei Zhang <wzhang@fb.com>, Jens Axboe <axboe@fb.com>,
Keith Busch <keith.busch@intel.com>
Subject: [PATCH 2/3] pci/msix: Skip disabling removed devices
Date: Mon, 8 Aug 2016 13:14:26 -0600 [thread overview]
Message-ID: <1470683667-28418-3-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1470683667-28418-1-git-send-email-keith.busch@intel.com>
There is no need to disable MSIx interrupts on a device that doesn't
exist.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
drivers/pci/msi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a02981e..b60ee25 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -999,6 +999,11 @@ void pci_msix_shutdown(struct pci_dev *dev)
if (!pci_msi_enable || !dev || !dev->msix_enabled)
return;
+ if (!pci_device_is_present(dev)) {
+ dev->msix_enabled = 0;
+ return;
+ }
+
/* Return the device with MSI-X masked as initial states */
for_each_pci_msi_entry(entry, dev) {
/* Keep cached states to be restored */
--
2.7.2
next prev parent reply other threads:[~2016-08-08 19:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-08 19:14 [PATCH 0/3] Limiting pci access requests Keith Busch
2016-08-08 19:14 ` [PATCH 1/3] pcie: Don't search capabilities on removed devices Keith Busch
2016-08-18 22:38 ` Bjorn Helgaas
2016-08-08 19:14 ` Keith Busch [this message]
2016-08-18 23:29 ` [PATCH 2/3] pci/msix: Skip disabling " Bjorn Helgaas
2016-08-19 17:11 ` Keith Busch
2016-08-08 19:14 ` [PATCH 3/3] pcie/aer: Cache capability position Keith Busch
2016-08-09 17:33 ` Bjorn Helgaas
2016-09-06 21:05 ` Jon Derrick
2016-09-06 21:18 ` Keith Busch
2016-08-09 17:36 ` [PATCH 0/3] Limiting pci access requests Bjorn Helgaas
2016-08-09 18:56 ` Keith Busch
2016-08-09 18:56 ` Lukas Wunner
2016-08-17 21:05 ` Keith Busch
2016-08-18 14:02 ` Lukas Wunner
2016-08-18 16:05 ` Keith Busch
2016-08-18 16:59 ` Lukas Wunner
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=1470683667-28418-3-git-send-email-keith.busch@intel.com \
--to=keith.busch@intel.com \
--cc=axboe@fb.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=wzhang@fb.com \
/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;
as well as URLs for NNTP newsgroup(s).