From caeded58103f7625fb1b32bf7ad72ff2e7c23569 Mon Sep 17 00:00:00 2001 From: vintagepc <53943260+vintagepc@users.noreply.github.com> Date: Sat, 24 Feb 2024 15:15:05 -0500 Subject: [PATCH] Fix bug with larger USB packets being discarded --- hw/arm/prusa/stm32f407/stm32f4xx_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/prusa/stm32f407/stm32f4xx_usb.c b/hw/arm/prusa/stm32f407/stm32f4xx_usb.c index 8c7c9f5378..832ab28318 100644 --- a/hw/arm/prusa/stm32f407/stm32f4xx_usb.c +++ b/hw/arm/prusa/stm32f407/stm32f4xx_usb.c @@ -1669,7 +1669,7 @@ static void STM32F4xx_handle_packet(STM32F4xxUSBState *s, uint32_t devadr, USBDe } if (p->packet.status == USB_RET_SUCCESS) { - if (actual > tlen) { + if (actual > tlen*hctsiz->PKTCNT) { p->packet.status = USB_RET_BABBLE; goto babble; }