* [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support
@ 2026-09-04 2:29 Thinh Nguyen
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Thinh Nguyen @ 2026-09-04 2:29 UTC (permalink / raw)
To: Thinh Nguyen, Dan Tran, Lukasz Majewski, Tom Rini,
Mattijs Korpershoek, Marek Vasut
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard
This series adds SuperSpeed descriptor support for the mass_storage and DFU
gadget functions so they can operate correctly at SuperSpeed.
Dan Tran (2):
usb: gadget: mass_storage: add SuperSpeed descriptor support
usb: gadget: dfu: add SuperSpeed descriptor support
drivers/usb/gadget/f_dfu.c | 3 ++
drivers/usb/gadget/f_mass_storage.c | 28 ++++++++++++++--
drivers/usb/gadget/storage_common.c | 52 ++++++++++++++++++++++++++++-
3 files changed, 80 insertions(+), 3 deletions(-)
base-commit: cc557af4553382f6f50e3ed62b9577054e7bc54f
--
2.53.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-04 2:29 [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support Thinh Nguyen
@ 2026-09-04 2:29 ` Thinh Nguyen
2026-09-04 2:43 ` Marek Vasut
2026-09-09 9:10 ` Mattijs Korpershoek
2026-09-04 2:29 ` [PATCH v3 2/2] usb: gadget: dfu: " Thinh Nguyen
2026-09-11 9:25 ` [PATCH v3 0/2] usb: gadget: " Mattijs Korpershoek
2 siblings, 2 replies; 11+ messages in thread
From: Thinh Nguyen @ 2026-09-04 2:29 UTC (permalink / raw)
To: Thinh Nguyen, Dan Tran, Lukasz Majewski, Tom Rini,
Mattijs Korpershoek, Marek Vasut
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard
From: Dan Tran <trandan@synopsys.com>
Add SS bulk endpoint descriptors (1024-byte MPS, bMaxBurst=15) to
storage_common.c to support SuperSpeed connections. Extend fsg_ep_desc()
to select them when operating at SuperSpeed, and wire up ss_descriptors
in fsg_bind(). Free ss_descriptors in fsg_unbind() to match.
Signed-off-by: Dan Tran <trandan@synopsys.com>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
---
Changes in v3:
- Document and split the bMaxBurst calculation.
- Require superspeed capability when selecting the SuperSpeed descriptor.
Changes in v2:
- Removed internal Reviewed-by tags
drivers/usb/gadget/f_mass_storage.c | 28 ++++++++++++++--
drivers/usb/gadget/storage_common.c | 52 ++++++++++++++++++++++++++++-
2 files changed, 77 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index 7eb667c130d2..baadb0d73785 100644
--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2226,14 +2226,16 @@ reset:
/* Enable the endpoints */
d = fsg_ep_desc(common->gadget,
- &fsg_fs_bulk_in_desc, &fsg_hs_bulk_in_desc);
+ &fsg_fs_bulk_in_desc, &fsg_hs_bulk_in_desc,
+ &fsg_ss_bulk_in_desc);
rc = enable_endpoint(common, fsg->bulk_in, d);
if (rc)
goto reset;
fsg->bulk_in_enabled = 1;
d = fsg_ep_desc(common->gadget,
- &fsg_fs_bulk_out_desc, &fsg_hs_bulk_out_desc);
+ &fsg_fs_bulk_out_desc, &fsg_hs_bulk_out_desc,
+ &fsg_ss_bulk_out_desc);
rc = enable_endpoint(common, fsg->bulk_out, d);
if (rc)
goto reset;
@@ -2654,6 +2656,7 @@ static void fsg_unbind(struct usb_configuration *c, struct usb_function *f)
fsg_common_release(fsg->common);
free(fsg->function.descriptors);
free(fsg->function.hs_descriptors);
+ free(fsg->function.ss_descriptors);
kfree(fsg);
}
@@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
return -ENOMEM;
}
}
+
+ if (gadget_is_superspeed(gadget)) {
+ unsigned int max_burst;
+
+ /* Calculate bMaxBurst, we know packet size is 1024 */
+ max_burst = min_t(unsigned int, FSG_BUFLEN / 1024, 15);
+
+ fsg_ss_bulk_in_desc.bEndpointAddress =
+ fsg_fs_bulk_in_desc.bEndpointAddress;
+ fsg_ss_bulk_in_comp_desc.bMaxBurst = max_burst;
+ fsg_ss_bulk_out_desc.bEndpointAddress =
+ fsg_fs_bulk_out_desc.bEndpointAddress;
+ fsg_ss_bulk_out_comp_desc.bMaxBurst = max_burst;
+ f->ss_descriptors = usb_copy_descriptors(fsg_ss_function);
+ if (unlikely(!f->ss_descriptors)) {
+ free(f->hs_descriptors);
+ free(f->descriptors);
+ return -ENOMEM;
+ }
+ }
+
return 0;
autoconf_fail:
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/storage_common.c
index 7e4b542f7ce5..75223fd9d518 100644
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@ -531,11 +531,61 @@ static struct usb_descriptor_header *fsg_hs_function[] = {
NULL,
};
+/*
+ * USB 3.0 requires SuperSpeed descriptors
+ */
+static struct usb_endpoint_descriptor
+fsg_ss_bulk_in_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ /* bEndpointAddress copied from fs_bulk_in_desc during fsg_bind() */
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = cpu_to_le16(1024),
+};
+
+static struct usb_ss_ep_comp_descriptor fsg_ss_bulk_in_comp_desc = {
+ .bLength = sizeof(fsg_ss_bulk_in_comp_desc),
+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
+ /* bMaxBurst set during fsg_bind() */
+};
+
+static struct usb_endpoint_descriptor
+fsg_ss_bulk_out_desc = {
+ .bLength = USB_DT_ENDPOINT_SIZE,
+ .bDescriptorType = USB_DT_ENDPOINT,
+
+ /* bEndpointAddress copied from fs_bulk_out_desc during fsg_bind() */
+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
+ .wMaxPacketSize = cpu_to_le16(1024),
+};
+
+static struct usb_ss_ep_comp_descriptor fsg_ss_bulk_out_comp_desc = {
+ .bLength = sizeof(fsg_ss_bulk_out_comp_desc),
+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
+ /* bMaxBurst set during fsg_bind() */
+};
+
+static struct usb_descriptor_header *fsg_ss_function[] = {
+#ifndef FSG_NO_OTG
+ (struct usb_descriptor_header *)&fsg_otg_desc,
+#endif
+ (struct usb_descriptor_header *)&fsg_intf_desc,
+ (struct usb_descriptor_header *)&fsg_ss_bulk_in_desc,
+ (struct usb_descriptor_header *)&fsg_ss_bulk_in_comp_desc,
+ (struct usb_descriptor_header *)&fsg_ss_bulk_out_desc,
+ (struct usb_descriptor_header *)&fsg_ss_bulk_out_comp_desc,
+ NULL,
+};
+
/* Maxpacket and other transfer characteristics vary by speed. */
static struct usb_endpoint_descriptor *
fsg_ep_desc(struct usb_gadget *g, struct usb_endpoint_descriptor *fs,
- struct usb_endpoint_descriptor *hs)
+ struct usb_endpoint_descriptor *hs,
+ struct usb_endpoint_descriptor *ss)
{
+ if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER)
+ return ss;
if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
return hs;
return fs;
--
2.53.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/2] usb: gadget: dfu: add SuperSpeed descriptor support
2026-09-04 2:29 [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support Thinh Nguyen
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
@ 2026-09-04 2:29 ` Thinh Nguyen
2026-09-09 9:10 ` Mattijs Korpershoek
2026-09-11 9:25 ` [PATCH v3 0/2] usb: gadget: " Mattijs Korpershoek
2 siblings, 1 reply; 11+ messages in thread
From: Thinh Nguyen @ 2026-09-04 2:29 UTC (permalink / raw)
To: Thinh Nguyen, Dan Tran, Lukasz Majewski, Tom Rini,
Mattijs Korpershoek, Marek Vasut
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org
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 v3:
- Remove the superspeed descriptor assignment from `dfu_bind`.
Changes in v2:
- Removed internal Reviewed-by tags
drivers/usb/gadget/f_dfu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
index ca8b36e077bc..b1bdb865d3d7 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)
@@ -826,6 +828,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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
@ 2026-09-04 2:43 ` Marek Vasut
2026-09-09 1:58 ` Thinh Nguyen
2026-09-09 9:10 ` Mattijs Korpershoek
1 sibling, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2026-09-04 2:43 UTC (permalink / raw)
To: Thinh Nguyen, Mattijs Korpershoek
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard, Tom Rini, Łukasz Majewski, Dan Tran
On 9/4/26 4:29 AM, Thinh Nguyen wrote:
Hello Thinh,
> @@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
> return -ENOMEM;
> }
> }
> +
> + if (gadget_is_superspeed(gadget)) {
Nitpick -- you could invert the conditional here and reduce indent:
if (!gadget_is_superspeed(gadget))
return 0;
...
> + unsigned int max_burst;
> +
> + /* Calculate bMaxBurst, we know packet size is 1024 */
> + max_burst = min_t(unsigned int, FSG_BUFLEN / 1024, 15);
> +
> + fsg_ss_bulk_in_desc.bEndpointAddress =
> + fsg_fs_bulk_in_desc.bEndpointAddress;
> + fsg_ss_bulk_in_comp_desc.bMaxBurst = max_burst;
> + fsg_ss_bulk_out_desc.bEndpointAddress =
> + fsg_fs_bulk_out_desc.bEndpointAddress;
> + fsg_ss_bulk_out_comp_desc.bMaxBurst = max_burst;
> + f->ss_descriptors = usb_copy_descriptors(fsg_ss_function);
> + if (unlikely(!f->ss_descriptors)) {
> + free(f->hs_descriptors);
> + free(f->descriptors);
> + return -ENOMEM;
> + }
> + }
> +
> return 0;
The series looks good to me otherwise, I'd like to give Mattijs a chance
to look at it and pick it.
Thank you !
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-04 2:43 ` Marek Vasut
@ 2026-09-09 1:58 ` Thinh Nguyen
2026-09-09 2:20 ` Marek Vasut
0 siblings, 1 reply; 11+ messages in thread
From: Thinh Nguyen @ 2026-09-09 1:58 UTC (permalink / raw)
To: Marek Vasut
Cc: Thinh Nguyen, Mattijs Korpershoek, Tejas Narendra Joglekar,
u-boot@lists.u-boot-project.org, Patrice Chotard, Tom Rini,
Łukasz Majewski, Dan Tran
On Fri, Sep 04, 2026, Marek Vasut wrote:
> On 9/4/26 4:29 AM, Thinh Nguyen wrote:
>
> Hello Thinh,
>
> > @@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
> > return -ENOMEM;
> > }
> > }
> > +
> > + if (gadget_is_superspeed(gadget)) {
>
> Nitpick -- you could invert the conditional here and reduce indent:
>
> if (!gadget_is_superspeed(gadget))
> return 0;
>
> ...
>
But wouldn't that deviate further from the original Linux
change? See:
4bb99b7c82ba ("usb: gadget: storage: add superspeed support")
BR,
Thinh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-09 1:58 ` Thinh Nguyen
@ 2026-09-09 2:20 ` Marek Vasut
2026-09-09 9:08 ` Mattijs Korpershoek
0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2026-09-09 2:20 UTC (permalink / raw)
To: Thinh Nguyen
Cc: Mattijs Korpershoek, Tejas Narendra Joglekar,
u-boot@lists.u-boot-project.org, Patrice Chotard, Tom Rini,
Łukasz Majewski, Dan Tran
Hello Thinh,
On 9/9/26 3:58 AM, Thinh Nguyen wrote:
> On Fri, Sep 04, 2026, Marek Vasut wrote:
>> On 9/4/26 4:29 AM, Thinh Nguyen wrote:
>>
>> Hello Thinh,
>>
>>> @@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
>>> return -ENOMEM;
>>> }
>>> }
>>> +
>>> + if (gadget_is_superspeed(gadget)) {
>>
>> Nitpick -- you could invert the conditional here and reduce indent:
>>
>> if (!gadget_is_superspeed(gadget))
>> return 0;
>>
>> ...
>>
>
> But wouldn't that deviate further from the original Linux
> change? See:
>
> 4bb99b7c82ba ("usb: gadget: storage: add superspeed support")
I think we are past that point and the U-Boot code did already diverge
quite a bit, but if this is pulled from some specific Linux commit and
you want to retain the code similarity, then please at least include the
aforementioned Linux commit reference in the commit message.
'From Linux 4bb99b7c82ba ("usb: gadget: storage: add superspeed
support").' or something along these lines.
Thank you !
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-09 2:20 ` Marek Vasut
@ 2026-09-09 9:08 ` Mattijs Korpershoek
2026-09-09 13:25 ` Marek Vasut
0 siblings, 1 reply; 11+ messages in thread
From: Mattijs Korpershoek @ 2026-09-09 9:08 UTC (permalink / raw)
To: Marek Vasut, Thinh Nguyen
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard, Tom Rini, Łukasz Majewski, Dan Tran
On Wed, Sep 09, 2026 at 04:20, Marek Vasut <marek.vasut@mailbox.org> wrote:
> Hello Thinh,
>
> On 9/9/26 3:58 AM, Thinh Nguyen wrote:
>> On Fri, Sep 04, 2026, Marek Vasut wrote:
>>> On 9/4/26 4:29 AM, Thinh Nguyen wrote:
>>>
>>> Hello Thinh,
>>>
>>>> @@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
>>>> return -ENOMEM;
>>>> }
>>>> }
>>>> +
>>>> + if (gadget_is_superspeed(gadget)) {
>>>
>>> Nitpick -- you could invert the conditional here and reduce indent:
>>>
>>> if (!gadget_is_superspeed(gadget))
>>> return 0;
>>>
>>> ...
>>>
>>
>> But wouldn't that deviate further from the original Linux
>> change? See:
>>
>> 4bb99b7c82ba ("usb: gadget: storage: add superspeed support")
>
> I think we are past that point and the U-Boot code did already diverge
> quite a bit, but if this is pulled from some specific Linux commit and
> you want to retain the code similarity, then please at least include the
> aforementioned Linux commit reference in the commit message.
I've been (over-)zealous with keeping the code similar to the Linux
commit.
Sorry if that was a problem.
To me it looks good this way.
>
> 'From Linux 4bb99b7c82ba ("usb: gadget: storage: add superspeed
> support").' or something along these lines.
I can add that to the commit message when applying.
>
> Thank you !
>
> --
> Best regards,
> Marek Vasut
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
2026-09-04 2:43 ` Marek Vasut
@ 2026-09-09 9:10 ` Mattijs Korpershoek
1 sibling, 0 replies; 11+ messages in thread
From: Mattijs Korpershoek @ 2026-09-09 9:10 UTC (permalink / raw)
To: Thinh Nguyen, Thinh Nguyen, Dan Tran, Lukasz Majewski, Tom Rini,
Marek Vasut
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard
Hi Thinh,
Thank you for the patch.
On Fri, Sep 04, 2026 at 02:29, Thinh Nguyen <Thinh.Nguyen@synopsys.com> wrote:
> From: Dan Tran <trandan@synopsys.com>
>
> Add SS bulk endpoint descriptors (1024-byte MPS, bMaxBurst=15) to
> storage_common.c to support SuperSpeed connections. Extend fsg_ep_desc()
> to select them when operating at SuperSpeed, and wire up ss_descriptors
> in fsg_bind(). Free ss_descriptors in fsg_unbind() to match.
>
> Signed-off-by: Dan Tran <trandan@synopsys.com>
> Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
> ---
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/2] usb: gadget: dfu: add SuperSpeed descriptor support
2026-09-04 2:29 ` [PATCH v3 2/2] usb: gadget: dfu: " Thinh Nguyen
@ 2026-09-09 9:10 ` Mattijs Korpershoek
0 siblings, 0 replies; 11+ messages in thread
From: Mattijs Korpershoek @ 2026-09-09 9:10 UTC (permalink / raw)
To: Thinh Nguyen, Thinh Nguyen, Dan Tran, Lukasz Majewski, Tom Rini,
Marek Vasut
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org
Hi Thinh,
Thank you for the patch.
On Fri, Sep 04, 2026 at 02:29, 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>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
> ---
> Changes in v3:
> - Remove the superspeed descriptor assignment from `dfu_bind`.
>
> Changes in v2:
> - Removed internal Reviewed-by tags
>
> drivers/usb/gadget/f_dfu.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c
> index ca8b36e077bc..b1bdb865d3d7 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)
> @@ -826,6 +828,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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
2026-09-09 9:08 ` Mattijs Korpershoek
@ 2026-09-09 13:25 ` Marek Vasut
0 siblings, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2026-09-09 13:25 UTC (permalink / raw)
To: Mattijs Korpershoek, Thinh Nguyen
Cc: Tejas Narendra Joglekar, u-boot@lists.u-boot-project.org,
Patrice Chotard, Tom Rini, Łukasz Majewski, Dan Tran
On 9/9/26 11:08 AM, Mattijs Korpershoek wrote:
> On Wed, Sep 09, 2026 at 04:20, Marek Vasut <marek.vasut@mailbox.org> wrote:
>
>> Hello Thinh,
>>
>> On 9/9/26 3:58 AM, Thinh Nguyen wrote:
>>> On Fri, Sep 04, 2026, Marek Vasut wrote:
>>>> On 9/4/26 4:29 AM, Thinh Nguyen wrote:
>>>>
>>>> Hello Thinh,
>>>>
>>>>> @@ -2709,6 +2712,27 @@ static int fsg_bind(struct usb_configuration *c, struct usb_function *f)
>>>>> return -ENOMEM;
>>>>> }
>>>>> }
>>>>> +
>>>>> + if (gadget_is_superspeed(gadget)) {
>>>>
>>>> Nitpick -- you could invert the conditional here and reduce indent:
>>>>
>>>> if (!gadget_is_superspeed(gadget))
>>>> return 0;
>>>>
>>>> ...
>>>>
>>>
>>> But wouldn't that deviate further from the original Linux
>>> change? See:
>>>
>>> 4bb99b7c82ba ("usb: gadget: storage: add superspeed support")
>>
>> I think we are past that point and the U-Boot code did already diverge
>> quite a bit, but if this is pulled from some specific Linux commit and
>> you want to retain the code similarity, then please at least include the
>> aforementioned Linux commit reference in the commit message.
>
> I've been (over-)zealous with keeping the code similar to the Linux
> commit.
>
> Sorry if that was a problem.
>
> To me it looks good this way.
>
>>
>> 'From Linux 4bb99b7c82ba ("usb: gadget: storage: add superspeed
>> support").' or something along these lines.
>
> I can add that to the commit message when applying.
Please do and apply, thanks !
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support
2026-09-04 2:29 [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support Thinh Nguyen
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
2026-09-04 2:29 ` [PATCH v3 2/2] usb: gadget: dfu: " Thinh Nguyen
@ 2026-09-11 9:25 ` Mattijs Korpershoek
2 siblings, 0 replies; 11+ messages in thread
From: Mattijs Korpershoek @ 2026-09-11 9:25 UTC (permalink / raw)
To: Dan Tran, Lukasz Majewski, Tom Rini, Marek Vasut, Thinh Nguyen
Cc: Tejas Narendra Joglekar, u-boot, Patrice Chotard
Hi,
On Fri, 04 Sep 2026 02:29:22 +0000, Thinh Nguyen wrote:
> This series adds SuperSpeed descriptor support for the mass_storage and DFU
> gadget functions so they can operate correctly at SuperSpeed.
>
>
> Dan Tran (2):
> usb: gadget: mass_storage: add SuperSpeed descriptor support
> usb: gadget: dfu: add SuperSpeed descriptor support
>
> [...]
Thanks, Applied to https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu (u-boot-dfu-next)
[1/2] usb: gadget: mass_storage: add SuperSpeed descriptor support
https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/bc6f3f4b3882fec3eb21457ccaed993b40743725
[2/2] usb: gadget: dfu: add SuperSpeed descriptor support
https://git.u-boot-project.org/u-boot/custodians/u-boot-dfu/-/commit/6e3f574e576585b0250ac387475d59e581bb5d9f
--
Mattijs
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-09-11 9:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 2:29 [PATCH v3 0/2] usb: gadget: add SuperSpeed descriptor support Thinh Nguyen
2026-09-04 2:29 ` [PATCH v3 1/2] usb: gadget: mass_storage: " Thinh Nguyen
2026-09-04 2:43 ` Marek Vasut
2026-09-09 1:58 ` Thinh Nguyen
2026-09-09 2:20 ` Marek Vasut
2026-09-09 9:08 ` Mattijs Korpershoek
2026-09-09 13:25 ` Marek Vasut
2026-09-09 9:10 ` Mattijs Korpershoek
2026-09-04 2:29 ` [PATCH v3 2/2] usb: gadget: dfu: " Thinh Nguyen
2026-09-09 9:10 ` Mattijs Korpershoek
2026-09-11 9:25 ` [PATCH v3 0/2] usb: gadget: " Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox