Re: Sun GEM card looses TX on x86 32bit PCI

David S. Miller (davem@redhat.com)
Tue, 12 Mar 2002 12:39:04 -0800 (PST)


From: Beezly <beezly@beezly.org.uk>
Date: 12 Mar 2002 20:34:29 +0000

I had a quick fiddle around with pci_find_capability(<blah>,
PCI_CAP_ID_VPD), but it always returns NULL (i.e. no VPD). However, I've
also noticed that no-one appears to use that macro in any of the kernel
source. Is there another way to look at the VPD?

The vital product data is stored in the PCI ROM.
pci_find_capability() does not give you the VPD, it is for
capabilities indicated in PCI config space.

The VPD format in the PCI ROM is specified in the PCI-2.x
specification. To dump out the PCI ROM you'll need to
ioremap() the PCI_ROM_RESOURCE it just like we do the registers.
Then you have to enable the ROM so it will respond (by setting
PCI_ROM_ADDRESS_ENABLE in "PCI_ROM_ADDRESS" in PCI config space).

Then you can use the ioremap() cookie to read the ROM using
readl(cookie + offset).

-
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/