aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2009-08-05 22:31:27 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-09 16:29:29 -0400
commitc901851fddb82529ddcd443d0778b1dee1386a14 (patch)
treee4dc3400c7d9109beb32e798812d718a159f896d /drivers/pci/msi.c
parent80286879c209034245f0a28a2171d2ec23b7481c (diff)
PCI MSI: Remove attribute check from pci_disable_msi()
The msi_list never have MSI-X's msi_desc while MSI is enabled, and also it never have MSI's msi_desc while MSI-X is enabled. This patch remove check for MSI-X entry from the pci_disable_msi(), referring that pci_disable_msix() does not have any check for MSI entry. Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/msi.c')
-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);