Subject: patch msi-fix-msi_remove_pci_irq_vectors.patch added to gregkh-2.6 tree

From: <[email-masked]>
Date: Wed, 31 Jan 2007 22:07:38 -0800

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 [email-masked]  Wed Jan 31 22:00:21 2007
From: [email-masked] (Eric W. Biederman)
Date: Sun, 28 Jan 2007 12:45:54 -0700
Subject: msi: Fix msi_remove_pci_irq_vectors.
To: Greg Kroah-Hartman <[email-masked]>
Cc: "David S. Miller" <[email-masked]>, Kyle McMartin <[email-masked]>, <[email-masked]>, Brice Goglin <[email-masked]>, <[email-masked]>, Michael Ellerman <[email-masked]>, Grant Grundler <[email-masked]>, Tony Luck <[email-masked]>, Ingo Molnar <[email-masked]>
Message-ID: <[email-masked]>

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 <[email-masked]>
Acked-by: Ingo Molnar <[email-masked]>
Signed-off-by: Greg Kroah-Hartman <[email-masked]>

---
 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 [email-masked] are