U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Dan Tran <Dan.Tran1@synopsys.com>, Marek Vasut <marex@denx.de>,
	Lukasz Majewski <lukma@denx.de>, Tom Rini <trini@konsulko.com>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: Tejas Narendra Joglekar <Tejas.Joglekar@synopsys.com>,
	"u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: Re: [PATCH v2 2/2] usb: gadget: dfu: add SuperSpeed descriptor support
Date: Thu, 23 Jul 2026 14:36:28 +0200	[thread overview]
Message-ID: <87ecgt992r.fsf@kernel.org> (raw)
In-Reply-To: <a6c2533e5d59c5bcb1199fc0b939e6a7a5ee2382.1783620779.git.Thinh.Nguyen@synopsys.com>

Hi Thinh,

Thank you for the patch.

On Thu, Jul 09, 2026 at 18:19, Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:

> From: Dan Tran <trandan@synopsys.com>
>
> 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 <trandan@synopsys.com>
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
> ---
>  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	other threads:[~2026-07-23 12:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 18:19 [PATCH v2 0/2] usb: gadget: add SuperSpeed descriptor support Thinh Nguyen
2026-07-09 18:19 ` [PATCH v2 1/2] usb: gadget: mass_storage: " Thinh Nguyen
2026-07-23 12:28   ` Mattijs Korpershoek
2026-07-23 20:40     ` Thinh Nguyen
2026-07-24 12:25       ` Mattijs Korpershoek
2026-07-09 18:19 ` [PATCH v2 2/2] usb: gadget: dfu: " Thinh Nguyen
2026-07-23 12:36   ` Mattijs Korpershoek [this message]
2026-07-23 20:43     ` Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ecgt992r.fsf@kernel.org \
    --to=mkorpershoek@kernel.org \
    --cc=Dan.Tran1@synopsys.com \
    --cc=Tejas.Joglekar@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox