From 6220537628fb5e55c94d7dbe1ec190bf38d3b01b Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Mon, 6 Dec 2010 12:18:19 -0800 Subject: [PATCH] Revert "Don't try to use bogus bridge data" This reverts commit 2bda5b733bb12854760750c08138db95e77aea0c. It actually conflicts with 9ba94caf57e3a8c3e9c6f3f5f068f4a7a7b3ff9d which came earlier, but I didn't catch it probably because I did a blind rebase before pushing. When reading bridge bus info, we may need to read out the current bridge info if the PCI bridge private is uninitialized, so remove the check at the top that would always short circuit the case where the priv was still 0. References: https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207. Reported-by: Bryce Harrington Signed-off-by: Jesse Barnes --- src/common_bridge.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/common_bridge.c b/src/common_bridge.c index f37420f..2609d7c 100644 --- a/src/common_bridge.c +++ b/src/common_bridge.c @@ -270,10 +270,6 @@ pci_device_get_bridge_buses(struct pci_device * dev, int *primary_bus, return ENODEV; } - if (!priv->bridge.pci) { - return ENODEV; - } - switch ((dev->device_class >> 8) & 0x0ff) { case 0x00: /* What to do for host bridges? I'm pretty sure this isn't right. -- 2.11.0