<p style="white-space: pre-wrap; word-wrap: break-word;">Not your fault, but I don't like this at all. The original assumption<br>really was that we always enumerate present devices and keep the pro-<br>gram state in sync with the hardware (i.e. an unused device has an<br>address assigned the state of the USB stack should know that). If we<br>assign addresses to devices on the bus and then ignore the device plus<br>remove that information that the address is assigned, we may end up<br>with multiple devices on the bus with the same address.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I guess, we didn't observe this yet, because a) xHCI doesn't care (the<br>controller assigns the addresses) and b) all other controllers have<br>127 addresses available before it wraps around.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Ideas how to cope with it: 1) Make sure (still present) slave devices<br>are reset when usb_detach_device() is called, store a hint that we<br>don't want to reenumerate the port unless it was detached in between.<br>2) Revert the offending changes that added usb_detach_device() calls<br>for present devices without intention to re-enumerate the port.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I'd really prefer 2). Along with going through the hub drivers to<br>make sure they re-enumerate when necessary.</p><p><a href="https://review.coreboot.org/23687">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://review.coreboot.org/23687">change 23687</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/23687"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ic652311e995e7addd807d2dda8e1c8f385a0d45c </div>
<div style="display:none"> Gerrit-Change-Number: 23687 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>
<div style="display:none"> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> </div>
<div style="display:none"> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> </div>
<div style="display:none"> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> </div>
<div style="display:none"> Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 10 Feb 2018 13:48:40 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>