···659659660660void usb_init(void)
661661{
662662+ /* Do required hardware inits first. For software USB the driver has
663663+ * to make sure this won't trigger a transfer completion before the
664664+ * queue and thread are created. */
665665+ usb_init_device();
666666+662667#ifdef USB_FULL_INIT
663668 usb_enable(false);
664669···672677 tick_add_task(usb_tick);
673678#endif
674679#endif /* USB_FULL_INIT */
675675-676676- usb_init_device();
677680}
678681679682void usb_wait_for_disconnect(struct event_queue *q)