]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Always re-read vendor for each function
authorRussell King <rmk@arm.linux.org.uk>
Sun, 23 Feb 2003 02:48:15 +0000 (18:48 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 23 Feb 2003 02:48:15 +0000 (18:48 -0800)
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

index c1cd1698412381781f888d0d22830ef1d78d0526..a4199617134a83d2d5aae0ed017b20bfe4e584c6 100644 (file)
@@ -263,9 +263,9 @@ int cb_alloc(socket_info_t * s)
                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;