Re: [PATCH] usb: gadget: f_uac2: fix superspeed transfer

From: Greg KH
Date: Mon Feb 14 2022 - 06:07:45 EST


On Mon, Feb 14, 2022 at 11:26:06AM +0800, 3090101217@xxxxxxxxxx wrote:
> From: Jing Leng <jleng@xxxxxxxxxxxxx>
>
> ss_ep_int_desc endpoint doesn't have 'SuperSpeed Endpoint
> Companion Descriptor', so we should add it.

This is not a "fix" but rather a new feature.

Why does this endpoint need this descriptor? We need a lot more
description here please.

>
> Signed-off-by: Jing Leng <jleng@xxxxxxxxxxxxx>
> ---
> drivers/usb/gadget/function/f_uac2.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
> index 097a709549d6..a6fc492f9148 100644
> --- a/drivers/usb/gadget/function/f_uac2.c
> +++ b/drivers/usb/gadget/function/f_uac2.c
> @@ -282,6 +282,14 @@ static struct usb_endpoint_descriptor ss_ep_int_desc = {
> .bInterval = 4,
> };
>
> +static struct usb_ss_ep_comp_descriptor ss_ep_int_desc_comp = {
> + .bLength = sizeof(ss_ep_int_desc_comp),
> + .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
> + .bMaxBurst = 0,
> + .bmAttributes = 0,

0 is the default value if it is not defined.

thanks,

greg k-h