U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Mattijs Korpershoek <mkorpershoek@kernel.org>
Cc: 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>,
	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 20:43:15 +0000	[thread overview]
Message-ID: <amJ8tfCL1mPkDrH5@vbox> (raw)
In-Reply-To: <87ecgt992r.fsf@kernel.org>

On Thu, Jul 23, 2026, Mattijs Korpershoek wrote:
> 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.

You're right. It's not needed. We can remove it.

Thanks,
Thinh

      reply	other threads:[~2026-07-23 21:04 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
2026-07-23 20:43     ` Thinh Nguyen [this message]

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=amJ8tfCL1mPkDrH5@vbox \
    --to=thinh.nguyen@synopsys.com \
    --cc=Dan.Tran1@synopsys.com \
    --cc=Tejas.Joglekar@synopsys.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=mkorpershoek@kernel.org \
    --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