diff options
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 9213c57cd968..db452319be90 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -676,7 +676,7 @@ int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) | |||
676 | 676 | ||
677 | void pci_disable_msix(struct pci_dev* dev) | 677 | void pci_disable_msix(struct pci_dev* dev) |
678 | { | 678 | { |
679 | int irq, head, tail = 0, warning = 0; | 679 | int irq, head, tail = 0; |
680 | 680 | ||
681 | if (!pci_msi_enable) | 681 | if (!pci_msi_enable) |
682 | return; | 682 | return; |
@@ -693,19 +693,14 @@ void pci_disable_msix(struct pci_dev* dev) | |||
693 | irq = head = dev->first_msi_irq; | 693 | irq = head = dev->first_msi_irq; |
694 | while (head != tail) { | 694 | while (head != tail) { |
695 | tail = get_irq_msi(irq)->link.tail; | 695 | tail = get_irq_msi(irq)->link.tail; |
696 | if (irq_has_action(irq)) | 696 | |
697 | warning = 1; | 697 | BUG_ON(irq_has_action(irq)); |
698 | else if (irq != head) /* Release MSI-X irq */ | 698 | |
699 | if (irq != head) /* Release MSI-X irq */ | ||
699 | msi_free_irq(dev, irq); | 700 | msi_free_irq(dev, irq); |
700 | irq = tail; | 701 | irq = tail; |
701 | } | 702 | } |
702 | msi_free_irq(dev, irq); | 703 | msi_free_irq(dev, irq); |
703 | if (warning) { | ||
704 | printk(KERN_WARNING "PCI: %s: pci_disable_msix() called without " | ||
705 | "free_irq() on all MSI-X irqs\n", | ||
706 | pci_name(dev)); | ||
707 | BUG_ON(warning > 0); | ||
708 | } | ||
709 | dev->first_msi_irq = 0; | 704 | dev->first_msi_irq = 0; |
710 | } | 705 | } |
711 | 706 | ||