Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/18499 )
Change subject: libpayload: Use interrupt transfers for USB hubs ......................................................................
Patch Set 3:
(3 comments)
https://review.coreboot.org/c/coreboot/+/18499/2/payloads/libpayload/drivers... File payloads/libpayload/drivers/usb/usbhub.c:
https://review.coreboot.org/c/coreboot/+/18499/2/payloads/libpayload/drivers... PS2, Line 203: clear_feature(dev, port, SEL_C_PORT_RESET, DR_PORT);
You need to add BH_PORT_RESET (5), PORT_LINK_STATE (6) and PORT_CONFIG_ERROR (7) here as well. […]
Thanks, done.
https://review.coreboot.org/c/coreboot/+/18499/2/payloads/libpayload/drivers... PS2, Line 215: while ((buf = dev->controller->poll_intr_queue(GEN_HUB(dev)->data))) {
One odd thing that I'm seeing is that when you instrument usb_hub_handle_port_change() and then plug […]
Implemented. Though, I don't think we can avoid all races. If, for instance, a hub is attached with multiple downstream devices and the first takes a moment to enumerate, we'll still gather status bits for the other ports. We could further mitigate that by going through the ports in two rounds: 1. Clear change bits. 2. Handle connection changes.
Still wouldn't be perfect but further reduce the noise, I guess.
https://review.coreboot.org/c/coreboot/+/18499/2/payloads/libpayload/drivers... PS2, Line 263: desc.bNbrPorts
nit: clearer: div_round_up(desc. […]
Done