Hi Thinh,

Thank you for the patch.

On Thu, Jul 09, 2026 at 18:19, Thinh Nguyen <[email protected]> wrote:

> From: Dan Tran <[email protected]>
>
> Populate ss_descriptors to support SuperSpeed connections. DFU is
> control-only so no separate SS descriptor set is needed; reuse the
> same descriptors across all speeds.
>
> Signed-off-by: Dan Tran <[email protected]>
> Signed-off-by: Thinh Nguyen <[email protected]>
> ---
>  Changes in v2:
>  - Removed internal Reviewed-by tags
>
>  drivers/usb/gadget/f_dfu.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
> index ca8b36e077bc..68d2ec7ebbe8 100644
> --- a/drivers/usb/gadget/f_dfu.c
> +++ b/drivers/usb/gadget/f_dfu.c
> @@ -227,6 +227,7 @@ static inline void to_dfu_mode(struct f_dfu *f_dfu)
>       f_dfu->usb_function.strings = dfu_strings;
>       f_dfu->usb_function.hs_descriptors = f_dfu->function;
>       f_dfu->usb_function.descriptors = f_dfu->function;
> +     f_dfu->usb_function.ss_descriptors = f_dfu->function;
>       f_dfu->dfu_state = DFU_STATE_dfuIDLE;
>  }
>  
> @@ -235,6 +236,7 @@ static inline void to_runtime_mode(struct f_dfu *f_dfu)
>       f_dfu->usb_function.strings = NULL;
>       f_dfu->usb_function.hs_descriptors = dfu_runtime_descs;
>       f_dfu->usb_function.descriptors = dfu_runtime_descs;
> +     f_dfu->usb_function.ss_descriptors = dfu_runtime_descs;
>  }
>  
>  static int handle_upload(struct usb_request *req, u16 len)
> @@ -752,6 +754,9 @@ static int dfu_bind(struct usb_configuration *c, struct 
> usb_function *f)
>       if (s)
>               g_dnl_set_serialnumber((char *)s);
>  
> +     if (gadget_is_superspeed(cdev->gadget))
> +             f_dfu->usb_function.ss_descriptors = f_dfu->function;
> +

Can you explain why this conditional is needed? I don't see something
similar for high speed so this is confusing me.

>  error:
>       return rv;
>  }
> @@ -826,6 +831,7 @@ static int dfu_bind_config(struct usb_configuration *c)
>       f_dfu->usb_function.name = "dfu";
>       f_dfu->usb_function.hs_descriptors = dfu_runtime_descs;
>       f_dfu->usb_function.descriptors = dfu_runtime_descs;
> +     f_dfu->usb_function.ss_descriptors = dfu_runtime_descs;
>       f_dfu->usb_function.bind = dfu_bind;
>       f_dfu->usb_function.unbind = dfu_unbind;
>       f_dfu->usb_function.set_alt = dfu_set_alt;
> -- 
> 2.53.0

Reply via email to