Skip to content

Commit

Permalink
[nrf fromtree] drivers: udc_dwc2: Stop OUT transfers on ZLP
Browse files Browse the repository at this point in the history
The transfer is finished after ZLP is transmitted. Do not re-enable the
endpoint waiting for more data.

Signed-off-by: Tomasz Moń <[email protected]>
(cherry picked from commit ea72b27f3dbeabd9f07254b077ba9a8baf3c0b73)
  • Loading branch information
tmon-nordic committed Feb 10, 2025
1 parent 5ee4d80 commit a82f2fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/udc/udc_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2540,7 +2540,7 @@ static inline void dwc2_handle_out_xfercompl(const struct device *dev,
net_buf_add(buf, bcnt);
}

if (!is_iso && (bcnt % udc_mps_ep_size(ep_cfg)) == 0 &&
if (!is_iso && bcnt && (bcnt % udc_mps_ep_size(ep_cfg)) == 0 &&
net_buf_tailroom(buf)) {
dwc2_prep_rx(dev, buf, ep_cfg);
} else {
Expand Down

0 comments on commit a82f2fc

Please sign in to comment.