[PATCH] libpciaccess: Check for bridge header type even in the case of multi-function bridge device
James John
joejames70 at gmail.com
Thu Jul 20 15:48:53 UTC 2017
--Signed-off-by: James John <joejames70 at gmail.com>
---
src/common_bridge.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/common_bridge.c b/src/common_bridge.c
index b4b5d7e..1af030c 100644
--- a/src/common_bridge.c
+++ b/src/common_bridge.c
@@ -216,7 +216,8 @@ pci_device_get_bridge_info( struct pci_device * dev )
read_bridge_info(priv);
}
- return (priv->header_type == 1) ? priv->bridge.pci : NULL;
+ /* Check only lower two bits for bridge device type, MF device */
+ return ((priv->header_type & 0x3) == 1) ? priv->bridge.pci : NULL;
}
--
1.8.3.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20170720/5c3944be/attachment.html>
More information about the xorg-devel
mailing list