Skip to content

Commit 6c90673

Browse files
jfischer-nokartben
authored andcommitted
drivers: udc_rpi_pico: fix OUT transfer handling in ISR
Do not check if the tailroom is greater than or equal to MPS because the controller does not write directly to the buffer and therefore cannot write outside the buffer. Signed-off-by: Johann Fischer <[email protected]>
1 parent a2c5861 commit 6c90673

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/udc/udc_rpi_pico.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,7 @@ static void rpi_pico_handle_buff_status_out(const struct device *dev, const uint
628628
len = read_buf_ctrl_reg(dev, ep) & USB_BUF_CTRL_LEN_MASK;
629629
net_buf_add_mem(buf, ep_data->buf, MIN(len, net_buf_tailroom(buf)));
630630

631-
if (net_buf_tailroom(buf) >= udc_mps_ep_size(ep_cfg) &&
632-
len == udc_mps_ep_size(ep_cfg)) {
631+
if (net_buf_tailroom(buf) && len == udc_mps_ep_size(ep_cfg)) {
633632
__unused int err;
634633

635634
err = rpi_pico_prep_rx(dev, buf, ep_cfg);

0 commit comments

Comments
 (0)