XHCI: Add missing set-address delay.

The USB < 3.0 init code has this, and the XHCI spec indicates that
software is responsible for dealing with this still, indeed.

Noticed by rudolfc when testing some USB audio devices in #1045.
This commit is contained in:
Augustin Cavalier 2022-01-07 21:45:22 -05:00
parent a5404eb57f
commit d66430ec52

View File

@ -1532,6 +1532,9 @@ XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,
ENDPOINT_0_STATE_GET(_ReadContext(
&device->device_ctx->endpoints[0].dwendpoint0)));
// Wait a bit for the device to complete addressing
snooze(USB_DELAY_SET_ADDRESS);
// Create a temporary pipe with the new address
ControlPipe pipe(parent);
pipe.SetControllerCookie(endpoint0);