Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32441
Change subject: device: ignore NONE devices behind bridge ......................................................................
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 --- M src/device/device_util.c 1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/32441/1
diff --git a/src/device/device_util.c b/src/device/device_util.c index 5c4f911..47df305 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -628,7 +628,7 @@
/* * 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 @@
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; }
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32441 )
Change subject: device: ignore NONE devices behind bridge ......................................................................
Patch Set 1: Code-Review+1
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32441 )
Change subject: device: ignore NONE devices behind bridge ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32441/1/src/device/device_util.c File src/device/device_util.c:
https://review.coreboot.org/#/c/32441/1/src/device/device_util.c@649 PS1, Line 649: if (child->enabled) Is it necessary that this "none" device is enabled?
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32441 )
Change subject: device: ignore NONE devices behind bridge ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32441/1/src/device/device_util.c File src/device/device_util.c:
https://review.coreboot.org/#/c/32441/1/src/device/device_util.c@649 PS1, Line 649: if (child->enabled)
Is it necessary that this "none" device is enabled?
yes, as it allocates resources for the hotplug device
Philipp Deppenwiese has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32441 )
Change subject: device: ignore NONE devices behind bridge ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32441 )
Change subject: device: ignore NONE devices behind bridge ......................................................................
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 --- M src/device/device_util.c 1 file changed, 4 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Philipp Deppenwiese: Looks good to me, approved
diff --git a/src/device/device_util.c b/src/device/device_util.c index 5c4f911..47df305 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -628,7 +628,7 @@
/* * 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 @@
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; }