Skip to content
Browse files

drivers: usb: nxp: Fix board freeze with various USB classes

Prevent to reschedule a transfer if one is already ongoing (occupied).
This happens with USB class drivers scheduling transfer once interface
is enabled (netusb, ACM...) and cause freeze due to infinite loop in
low level driver.

Signed-off-by: Loic Poulain <>
  • Loading branch information...
Loic Poulain authored and nashif committed Jun 11, 2019
1 parent d47df7f commit 7428f9c0707636357413a4279e8466eca586f042
Showing with 5 additions and 0 deletions.
  1. +5 −0 drivers/usb/device/usb_dc_mcux_ehci.c
@@ -377,6 +377,11 @@ int usb_dc_ep_read_continue(u8_t ep)
/* select the index of the next endpoint buffer */
u8_t ep_abs_idx = EP_ABS_IDX(ep);

if (s_Device.eps[ep_abs_idx].ep_occupied) {
LOG_WRN("endpoint 0x%x already occupied", ep);
return -EBUSY;

if (s_Device.setupDataStage == SETUP_DATA_STAGE_DONE) {
return 0;

0 comments on commit 7428f9c

Please sign in to comment.
You can’t perform that action at this time.