[PATCH] [6/6] Always re-read vendor for each function

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Feb 23 2003 - 10:20:28 EST


This patch appears not to be in 2.5.62, but applies cleanly.

Subject: [6/6] Always re-read vendor for each function
We should probably always read the vendor ID from each function
rather than assuming that it is identical to function 0.

 drivers/pcmcia/cardbus.c | 4 ++--
 1 files changed, 2 insertions, 2 deletions

diff -ur -x sa11* -x Kconfig -x Makefile orig/drivers/pcmcia/cardbus.c linux/drivers/pcmcia/cardbus.c
--- orig/drivers/pcmcia/cardbus.c Sun Feb 23 14:12:57 2003
+++ linux/drivers/pcmcia/cardbus.c Sun Feb 23 14:15:26 2003
@@ -263,9 +263,9 @@
                 dev->sysdata = bus->sysdata;
                 dev->dev.parent = bus->dev;
                 dev->dev.bus = &pci_bus_type;
-
                 dev->devfn = i;
- dev->vendor = vend;
+
+ pci_read_config_word(dev, PCI_VENDOR_ID, &dev->vendor);
                 pci_read_config_word(dev, PCI_DEVICE_ID, &dev->device);
                 dev->hdr_type = hdr & 0x7f;
                 dev->dma_mask = 0xffffffff;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:38 EST