USB: Explore ports when something is connected without a status change.

It seems that many controllers do not report status changes following
the hand-off from the BIOS, so we were never probing those ports
and reporting the devices attached to them.

The BSDs do something similar (although it seems to only do this
on the first explore, not always.)

This fixes booting off of USB3 ports from most Intel controllers,
as well as a variety of others with similar behavior.

Fixes #15000.
This commit is contained in:
Augustin Cavalier 2020-02-08 16:32:38 -05:00
parent 0e280da525
commit f62329b34d

View File

@ -212,7 +212,9 @@ Hub::Explore(change_item **changeList)
}
#endif
if (fPortStatus[i].change & PORT_STATUS_CONNECTION) {
if ((fPortStatus[i].change & PORT_STATUS_CONNECTION)
|| ((fPortStatus[i].status & PORT_STATUS_CONNECTION)
&& fChildren[i] == NULL)) {
// clear status change
DefaultPipe()->SendRequest(USB_REQTYPE_CLASS | USB_REQTYPE_OTHER_OUT,
USB_REQUEST_CLEAR_FEATURE, C_PORT_CONNECTION, i + 1,