diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2019-04-24 09:35:51 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-05-07 16:05:27 +0000 |
commit | bd7739f3aa64aa5409265397722728ba1ffa78ac (patch) | |
tree | 9b7b6f2cb229235d377531ae2449fcbc8afb5fa9 /src/device | |
parent | ac24d3c3118f0ffbf7f26e0ef867c58dbdcc98e3 (diff) | |
download | coreboot-bd7739f3aa64aa5409265397722728ba1ffa78ac.tar.xz |
device: ignore NONE devices behind bridge
Ignore NONE devices in dev_is_active_bridge that are commonly used to
indicate hotplug capable ports.
Tested on Lenovo T520:
The empty ExpressCard Slot is no longer marked as active bridge.
Change-Id: I23347270aaab17647023969091ce4bcdd41dd57a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32441
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/device_util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c index 5c4f911b8b..47df3052e2 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -628,7 +628,7 @@ void disable_children(struct bus *bus) /* * Returns true if the device is an enabled bridge that has at least - * one enabled device on its secondary bus. + * one enabled device on its secondary bus that is not of type NONE. */ bool dev_is_active_bridge(struct device *dev) { @@ -643,6 +643,9 @@ bool dev_is_active_bridge(struct device *dev) for (link = dev->link_list; link; link = link->next) { for (child = link->children; child; child = child->sibling) { + if (child->path.type == DEVICE_PATH_NONE) + continue; + if (child->enabled) return 1; } |