]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 7 May 2015 14:52:21 +0000 (09:52 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 7 May 2015 14:52:21 +0000 (09:52 -0500)
commit50b31af44180293cbdbc8dcea93f1d33a7b9e6a1
tree2c742020d1c4222bccaceb1cf118fde5eab3c0a7
parent019ccce32a792becebfc055908a9149dcd9e86f0
PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI

If we enable MSI, then kexec a new kernel, the new kernel may receive MSIs
it is not prepared for.  Commit d1bcc1a4e1f4 ("PCI: msi: Disable msi
interrupts when we initialize a pci device") prevents this, but only if the
new kernel is built with CONFIG_PCI_MSI=y.

Move the "disable MSI" functionality from drivers/pci/msi.c to a new
pci_msi_setup_pci_dev() in drivers/pci/probe.c so we can disable MSIs when
we enumerate devices even if the kernel doesn't include full MSI support.

[bhelgaas: changelog, disable MSIs in pci_setup_device(), put
pci_msi_setup_pci_dev() at its final destination]
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/msi.c
drivers/pci/probe.c