summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLichao Mu <mulichao@outlook.com>2019-07-11 12:19:34 -0400
committerAdam Jackson <ajax@redhat.com>2019-07-11 12:21:16 -0400
commit53e53b09eb80e4e2b3e1fad3f4886bf9290a61e0 (patch)
tree28177c442323accb687bdb0590c6b8d694feb02f
parent640f114e3bf195f77a2151fc6cbdfed8ace8b6ae (diff)
Fix pci_device_get_bridge_info() for multifunction bridges
Fixes: xorg/lib/libpciaccess#9
-rw-r--r--src/common_bridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common_bridge.c b/src/common_bridge.c
index b4b5d7e..84cc57b 100644
--- a/src/common_bridge.c
+++ b/src/common_bridge.c
@@ -216,7 +216,7 @@ pci_device_get_bridge_info( struct pci_device * dev )
read_bridge_info(priv);
}
- return (priv->header_type == 1) ? priv->bridge.pci : NULL;
+ return ((priv->header_type & 0x7f) == 1) ? priv->bridge.pci : NULL;
}