diff options
author | Ian Romanick <idr@us.ibm.com> | 2007-03-27 07:57:00 -0700 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2007-03-27 08:02:00 -0700 |
commit | 28dc34c2a6045ab95183d708500009bd1eea1659 (patch) | |
tree | 3813221b6429be021ebe52da002f0b1c29fdc599 /src | |
parent | 061a011ceffc13db3b147dd105d8b7c2edcc3bc8 (diff) |
Make sure header_type is available in read_bridge_info.
Diffstat (limited to 'src')
-rw-r--r-- | src/common_bridge.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common_bridge.c b/src/common_bridge.c index 68a535e..ec1eddd 100644 --- 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; |