Skip to content

Commit 0c299e6

Browse files
jfischer-nommahadevan108
authored andcommitted
drivers: udc_kinetis: reset control endpoint busy flags
Reset control endpoint busy flags if configured and enabled, otherwise it could mark the wrong buffer as busy after endpoint disable/enable. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
1 parent 6619d15 commit 0c299e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/udc/udc_kinetis.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,8 @@ static int usbfsotg_ep_enable(const struct device *dev,
882882
if (cfg->addr == USB_CONTROL_EP_OUT) {
883883
struct net_buf *buf;
884884

885+
priv->busy[0] = false;
886+
priv->busy[1] = false;
885887
buf = udc_ctrl_alloc(dev, USB_CONTROL_EP_OUT, USBFSOTG_EP0_SIZE);
886888
usbfsotg_bd_set_ctrl(bd_even, buf->size, buf->data, false);
887889
priv->out_buf[0] = buf;

0 commit comments

Comments
 (0)