projects
/
platform
/
upstream
/
libpciaccess.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
061a011
)
Make sure header_type is available in read_bridge_info.
author
Ian Romanick
<idr@us.ibm.com>
Tue, 27 Mar 2007 14:57:00 +0000
(07:57 -0700)
committer
Ian Romanick
<idr@us.ibm.com>
Tue, 27 Mar 2007 15:02:00 +0000
(08:02 -0700)
src/common_bridge.c
patch
|
blob
|
history
diff --git
a/src/common_bridge.c
b/src/common_bridge.c
index
68a535e
..
ec1eddd
100644
(file)
--- a/
src/common_bridge.c
+++ b/
src/common_bridge.c
@@
-55,8
+55,17
@@
read_bridge_info( struct pci_device_private * priv )
{
uint8_t buf[0x40];
pciaddr_t bytes;
+ int err;
+ /* Make sure the device has been probed. If not, header_type won't be
+ * set and the rest of this function will fail.
+ */
+ err = pci_device_probe(& priv->base);
+ if (err) {
+ return err;
+ }
+
switch ( priv->header_type & 0x7f ) {
case 0x00:
break;