Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97ea9d8e authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Alex Shi
Browse files

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 d5dea7d9 ("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: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>

(cherry picked from commit 1851617cd2da9cc53cdc1738f4148f4f042c0e56)
Signed-off-by: default avatarAlex Shi <alex.shi@linaro.org>

Conflicts solution:
	drivers/pci/msi.c /* force remove contents in pci_msi_init_pci_dev */
parent c56c7188
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment