patch msi-fix-msi_remove_pci_irq_vectors.patch added to gregkh-2.6 tree
gregkh at suse.de
gregkh at suse.de
Thu Feb 1 17:07:38 EST 2007
This is a note to let you know that I've just added the patch titled
Subject: msi: Fix msi_remove_pci_irq_vectors.
to my gregkh-2.6 tree. Its filename is
msi-fix-msi_remove_pci_irq_vectors.patch
This tree can be found at
http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/
>From owner-linux-pci at atrey.karlin.mff.cuni.cz Wed Jan 31 22:00:21 2007
From: ebiederm at xmission.com (Eric W. Biederman)
Date: Sun, 28 Jan 2007 12:45:54 -0700
Subject: msi: Fix msi_remove_pci_irq_vectors.
To: Greg Kroah-Hartman <greg at kroah.com>
Cc: "David S. Miller" <davem at davemloft.net>, Kyle McMartin <kyle at parisc-linux.org>, <linuxppc-dev at ozlabs.org>, Brice Goglin <brice at myri.com>, <shaohua.li at intel.com>, Michael Ellerman <michael at ellerman.id.au>, Grant Grundler <grundler at parisc-linux.org>, Tony Luck <tony.luck at intel.com>, Ingo Molnar <mingo at elte.hu>
Message-ID: <m14pqbq6j1.fsf_-_ at ebiederm.dsl.xmission.com>
Since msi_remove_pci_irq_vectors is designed to be called during
hotplug remove it is actively wrong to query the hardware and expect
meaningful results back.
To that end remove the pci_find_capability calls. Testing
dev->msi_enabled and dev->msix_enabled gives us all of the information
we need.
Signed-off-by: Eric W. Biederman <ebiederm at xmission.com>
Acked-by: Ingo Molnar <mingo at elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
drivers/pci/msi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- gregkh-2.6.orig/drivers/pci/msi.c
+++ gregkh-2.6/drivers/pci/msi.c
@@ -854,13 +854,10 @@ void pci_disable_msix(struct pci_dev* de
**/
void msi_remove_pci_irq_vectors(struct pci_dev* dev)
{
- int pos;
-
if (!pci_msi_enable || !dev)
return;
- pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
- if (pos > 0 && dev->msi_enabled) {
+ if (dev->msi_enabled) {
if (irq_has_action(dev->first_msi_irq)) {
printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() "
"called without free_irq() on MSI irq %d\n",
@@ -869,8 +866,7 @@ void msi_remove_pci_irq_vectors(struct p
} else /* Release MSI irq assigned to this device */
msi_free_irq(dev, dev->first_msi_irq);
}
- pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
- if (pos > 0 && dev->msix_enabled) {
+ if (dev->msix_enabled) {
int irq, head, tail = 0, warning = 0;
void __iomem *base = NULL;
Patches currently in gregkh-2.6 which might be from greg at kroah.com are
More information about the Linuxppc-dev
mailing list