lkml.org 
[lkml]   [2002]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Sun GEM card looses TX on x86 32bit PCI
From
   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/

\
 
 \ /
  Last update: 2005-03-22 13:21    [W:0.083 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site