linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 00/10] pci: fix unhandled interrupt on shutdown
@ 2015-03-26 11:37 Michael S. Tsirkin
  2015-03-26 11:37 ` [PATCH v4 01/10] pci: export functions for msi/msix ctrl Michael S. Tsirkin
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: Michael S. Tsirkin @ 2015-03-26 11:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: Bjorn Helgaas, linux-pci, Fam Zheng, Yinghai Lu

Fam Zheng noticed that pci shutdown disables msi and msix of a device while
device is still active. This was intended to fix kexec with fusion devices but
had the unintended effect of breaking even regular shutdown when using virtio.

The same problem would affect any driver which doesn't register
a level interrupt handler when using msix.

I think the fix is to avoid touching device on shutdown:
we clear bus master anyway, so we won't get any more
msi interrupts, and bus reset will clear the msi/msix
state eventually anyway.

Patches 1-6 work well for me.
Given they affect all pci devices, and the bug has been there since 2.6 times,
I think there's no rush: we can merge them for 4.1.

At the same time, once merged, patches 1-4 will likely make a good stable
candidate.

Patches 7-10 compiled only, will need maintainer ack.

Please review, and consider at least 1-6 for 4.1.

Changes from v3:
	fix a copy-and-paste error in
	  pci: drop some duplicate code
	other patches are unchanged
	drop Cc stable for now
Changes from v2:
	move code from probe to device enumeration
	add patches to unexport pci_msi_off

Michael S. Tsirkin (11):
  pci: export functions for msi/msix ctrl
  pci: move pci_msi_init_pci_dev to pci.c
  pci: drop some duplicate code
  pci: don't disable msi/msix at shutdown
  pci: make msi/msix shutdown functions static
  virtio_pci: drop msi_off on probe
  ntb: drop pci_msi_off call on probe
  mic: drop pci_msi_off call on probe
  pci: drop pci_msi_off calls from quirks
  pci: unexport pci_msi_off

 drivers/pci/pci.h                  | 25 +++++++++++++--
 include/linux/pci.h                |  5 ---
 drivers/misc/mic/host/mic_intr.c   |  2 --
 drivers/ntb/ntb_hw.c               |  2 --
 drivers/pci/msi.c                  | 62 ++++++++------------------------------
 drivers/pci/pci-driver.c           |  2 --
 drivers/pci/pci.c                  | 24 +++------------
 drivers/pci/probe.c                | 16 ++++++++++
 drivers/pci/quirks.c               |  2 --
 drivers/virtio/virtio_pci_common.c |  3 --
 10 files changed, 56 insertions(+), 88 deletions(-)

-- 
MST


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-03-26 12:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 11:37 [PATCH v4 00/10] pci: fix unhandled interrupt on shutdown Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 01/10] pci: export functions for msi/msix ctrl Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 02/10] pci: move pci_msi_init_pci_dev to pci.c Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 03/10] pci: drop some duplicate code Michael S. Tsirkin
2015-03-26 12:36   ` Yijing Wang
2015-03-26 11:37 ` [PATCH v4 04/10] pci: don't disable msi/msix at shutdown Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 05/10] pci: make msi/msix shutdown functions static Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 06/10] virtio_pci: drop msi_off on probe Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 07/10] ntb: drop pci_msi_off call " Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 08/10] mic: " Michael S. Tsirkin
2015-03-26 11:37 ` [PATCH v4 09/10] pci: drop pci_msi_off calls from quirks Michael S. Tsirkin
2015-03-26 11:38 ` [PATCH v4 10/10] pci: unexport pci_msi_off Michael S. Tsirkin

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).