[PATCH] PCI: disable msi mode in pci_disable_device
[deliverable/linux.git] / drivers / pci / pci.c
index aa480370ef1019b7ca435870aaa3904d757310f9..d408a3c3042649268922b9383005cff6a111f2b9 100644 (file)
@@ -551,7 +551,14 @@ void
 pci_disable_device(struct pci_dev *dev)
 {
        u16 pci_command;
-       
+
+       if (dev->msi_enabled)
+               disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+                       PCI_CAP_ID_MSI);
+       if (dev->msix_enabled)
+               disable_msi_mode(dev, pci_find_capability(dev, PCI_CAP_ID_MSI),
+                       PCI_CAP_ID_MSIX);
+
        pci_read_config_word(dev, PCI_COMMAND, &pci_command);
        if (pci_command & PCI_COMMAND_MASTER) {
                pci_command &= ~PCI_COMMAND_MASTER;
This page took 0.02766 seconds and 5 git commands to generate.