Skip to content
Browse files

Revert "drivers: usb: usb_dc_nrfx: Set cfg.en to false on Reset"

This reverts commit 03ef375.

The cfg.en flag contains only the state of the endpoint as seen by the
shim. It is mainly used to enable the endpoints when the USB peripheral
becomes ready for operation (and the USB stack may want to enable some
endpoints earlier, especially the control ones, so the operation must
be sometimes deferred). In particular, setting this flag to false has
no effect on the actual state of the endpoint in the hardware.
Moreover, this flag was set to false for all the endpoints, including
the control ones which should not be disabled, so such operation
actually fooled the shim.

Signed-off-by: Andrzej Głąbek <>
  • Loading branch information...
anangl authored and carlescufi committed Jun 26, 2019
1 parent 0367913 commit 1b3514a07ed42c37a5b44c4013ec33248e365e47
Showing with 0 additions and 2 deletions.
  1. +0 −2 drivers/usb/device/usb_dc_nrfx.c
@@ -637,8 +637,6 @@ static void ep_ctx_reset(struct nrf_usbd_ep_ctx *ep_ctx)
ep_ctx->buf.curr = ep_ctx->;
ep_ctx->buf.len = 0U;

ep_ctx->cfg.en = false;

ep_ctx->read_complete = true;
ep_ctx->read_pending = false;
ep_ctx->write_in_progress = false;

0 comments on commit 1b3514a

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