[coreboot-gerrit] Change in coreboot[master]: libpayload/drivers/usb/uhci: Fix infinite loop

Nico Huber (Code Review) gerrit at coreboot.org
Sat Feb 10 14:48:40 CET 2018


Nico Huber has posted comments on this change. ( https://review.coreboot.org/23687 )

Change subject: libpayload/drivers/usb/uhci: Fix infinite loop
......................................................................


Patch Set 1:

Not your fault, but I don't like this at all. The original assumption
really was that we always enumerate present devices and keep the pro-
gram state in sync with the hardware (i.e. an unused device has an
address assigned the state of the USB stack should know that). If we
assign addresses to devices on the bus and then ignore the device plus
remove that information that the address is assigned, we may end up
with multiple devices on the bus with the same address.

I guess, we didn't observe this yet, because a) xHCI doesn't care (the
controller assigns the addresses) and b) all other controllers have
127 addresses available before it wraps around.

Ideas how to cope with it: 1) Make sure (still present) slave devices
are reset when usb_detach_device() is called, store a hint that we
don't want to reenumerate the port unless it was detached in between.
2) Revert the offending changes that added usb_detach_device() calls
for present devices without intention to re-enumerate the port.

I'd really prefer 2). Along with going through the hub drivers to
make sure they re-enumerate when necessary.


-- 
To view, visit https://review.coreboot.org/23687
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic652311e995e7addd807d2dda8e1c8f385a0d45c
Gerrit-Change-Number: 23687
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: Julius Werner <jwerner at chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-Comment-Date: Sat, 10 Feb 2018 13:48:40 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180210/8df69f6a/attachment.html>


More information about the coreboot-gerrit mailing list