From e68f245bcb1f863aeb8eab617bd06878c078029a Mon Sep 17 00:00:00 2001 From: Igor Skalkin Date: Wed, 12 Aug 2026 10:19:09 +0200 Subject: [PATCH] usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket For USB_SPEED_SUPER, dummy_hcd sets ep0 maxpacket to 9. That is incorrect for SuperSpeed ep0 and breaks short packet handling in control transfer tests. Set ep0 maxpacket to 512 for SuperSpeed. Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support") Acked-by: Alan Stern Signed-off-by: Igor Skalkin Link: https://patch.msgid.link/20260812081910.6821-2-igor.skalkin@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/udc/dummy_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 0d30dd67b9ca..d3076a429b40 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c @@ -918,7 +918,7 @@ static int dummy_set_selfpowered(struct usb_gadget *_gadget, int value) static void dummy_udc_update_ep0(struct dummy *dum) { if (dum->gadget.speed == USB_SPEED_SUPER) - dum->ep[0].ep.maxpacket = 9; + dum->ep[0].ep.maxpacket = 512; else dum->ep[0].ep.maxpacket = 64; }