aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/msi.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d986afb7032b..a7b72f633d07 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -640,17 +640,10 @@ void pci_msi_shutdown(struct pci_dev *dev)
640 640
641void pci_disable_msi(struct pci_dev* dev) 641void pci_disable_msi(struct pci_dev* dev)
642{ 642{
643 struct msi_desc *entry;
644
645 if (!pci_msi_enable || !dev || !dev->msi_enabled) 643 if (!pci_msi_enable || !dev || !dev->msi_enabled)
646 return; 644 return;
647 645
648 pci_msi_shutdown(dev); 646 pci_msi_shutdown(dev);
649
650 entry = list_entry(dev->msi_list.next, struct msi_desc, list);
651 if (entry->msi_attrib.is_msix)
652 return;
653
654 msi_free_irqs(dev); 647 msi_free_irqs(dev);
655} 648}
656EXPORT_SYMBOL(pci_disable_msi); 649EXPORT_SYMBOL(pci_disable_msi);
@@ -774,13 +767,13 @@ void pci_msix_shutdown(struct pci_dev* dev)
774 pci_intx_for_msi(dev, 1); 767 pci_intx_for_msi(dev, 1);
775 dev->msix_enabled = 0; 768 dev->msix_enabled = 0;
776} 769}
770
777void pci_disable_msix(struct pci_dev* dev) 771void pci_disable_msix(struct pci_dev* dev)
778{ 772{
779 if (!pci_msi_enable || !dev || !dev->msix_enabled) 773 if (!pci_msi_enable || !dev || !dev->msix_enabled)
780 return; 774 return;
781 775
782 pci_msix_shutdown(dev); 776 pci_msix_shutdown(dev);
783
784 msix_free_all_irqs(dev); 777 msix_free_all_irqs(dev);
785} 778}
786EXPORT_SYMBOL(pci_disable_msix); 779EXPORT_SYMBOL(pci_disable_msix);