Re: [PATCH 1/4] usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket

Alan Stern <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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 <[email protected]>
> ---

Acked-by: Alan Stern <[email protected]>

>  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
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.