Re: [PATCH 1/4] usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket
From: Alan Stern
Date: Fri Aug 07 2026 - 17:15:26 EST
On Fri, Aug 07, 2026 at 09:54:35AM +0200, Igor Skalkin wrote:
> 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")
> Signed-off-by: Igor Skalkin <igor.skalkin@xxxxxxxxxxxxxxxx>
> ---
Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> 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 f47903461ed5..29f671c7b319 100644
> --- a/drivers/usb/gadget/udc/dummy_hcd.c
> +++ b/drivers/usb/gadget/udc/dummy_hcd.c
> @@ -896,7 +896,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;
> }
> --
> 2.49.0
>