diff options
Diffstat (limited to 'firmware/usb.c')
-rw-r--r-- | firmware/usb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index 56f6fb7230..6823851e08 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -659,6 +659,11 @@ void usb_acknowledge(long id) | |||
659 | 659 | ||
660 | void usb_init(void) | 660 | void usb_init(void) |
661 | { | 661 | { |
662 | /* Do required hardware inits first. For software USB the driver has | ||
663 | * to make sure this won't trigger a transfer completion before the | ||
664 | * queue and thread are created. */ | ||
665 | usb_init_device(); | ||
666 | |||
662 | #ifdef USB_FULL_INIT | 667 | #ifdef USB_FULL_INIT |
663 | usb_enable(false); | 668 | usb_enable(false); |
664 | 669 | ||
@@ -672,8 +677,6 @@ void usb_init(void) | |||
672 | tick_add_task(usb_tick); | 677 | tick_add_task(usb_tick); |
673 | #endif | 678 | #endif |
674 | #endif /* USB_FULL_INIT */ | 679 | #endif /* USB_FULL_INIT */ |
675 | |||
676 | usb_init_device(); | ||
677 | } | 680 | } |
678 | 681 | ||
679 | void usb_wait_for_disconnect(struct event_queue *q) | 682 | void usb_wait_for_disconnect(struct event_queue *q) |