This is a workaround needed at least by Renesas controllers. I didn't
find any documentation about this issue and I guess other open source
xHCI implementations do not see this race because they do much more work
upon resume.
Thanks to Remi Locherer for reporting this issue on bugs@.
-/* $OpenBSD: xhci.c,v 1.51 2015/01/04 20:10:08 mpi Exp $ */
+/* $OpenBSD: xhci.c,v 1.52 2015/01/05 12:38:16 mpi Exp $ */
/*
* Copyright (c) 2014 Martin Pieuchot
xhci_reset(sc);
xhci_ring_reset(sc, &sc->sc_cmd_ring);
xhci_ring_reset(sc, &sc->sc_evt_ring);
+
+ /* Renesas controllers, at least, need more time to resume. */
+ usb_delay_ms(&sc->sc_bus, USB_RESUME_WAIT);
+
xhci_config(sc);
sc->sc_bus.use_polling--;