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>
This commit is contained in:
parent
ac24d3c311
commit
bd7739f3aa
@ -628,7 +628,7 @@ void disable_children(struct bus *bus)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns true if the device is an enabled bridge that has at least
|
* 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)
|
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 (link = dev->link_list; link; link = link->next) {
|
||||||
for (child = link->children; child; child = child->sibling) {
|
for (child = link->children; child; child = child->sibling) {
|
||||||
|
if (child->path.type == DEVICE_PATH_NONE)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (child->enabled)
|
if (child->enabled)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user