linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers
@ 2025-07-04 11:40 Srikanth Chary Chennoju
  2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Srikanth Chary Chennoju @ 2025-07-04 11:40 UTC (permalink / raw)
  To: gregkh, Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai
  Cc: linux-usb, linux-kernel, punnaiah.choudary.kalluri,
	Srikanth Chary Chennoju

These patches include changes for 
1. Supporting SSP devices
2. Provide support for maxburst 
3. Support for SSP endpoint companion for Isochronous transfers

Srikanth Chary Chennoju (3):
  usb:gadget:zero: support for super speed plus
  usb: gadget: f_sourcesink support for maxburst for bulk transfers
  usb: gadget: f_sourcesink: Addition of SSP endpoint companion for
    Isochronous transfers

 drivers/usb/gadget/function/f_sourcesink.c | 37 ++++++++++++++++++++--
 drivers/usb/gadget/function/g_zero.h       |  2 ++
 drivers/usb/gadget/legacy/zero.c           |  2 +-
 3 files changed, 38 insertions(+), 3 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH 1/3] usb:gadget:zero: support for super speed plus
  2025-07-04 11:40 [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers Srikanth Chary Chennoju
@ 2025-07-04 11:40 ` Srikanth Chary Chennoju
  2025-07-04 12:04   ` Greg KH
  2025-07-04 11:40 ` [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers Srikanth Chary Chennoju
  2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
  2 siblings, 1 reply; 18+ messages in thread
From: Srikanth Chary Chennoju @ 2025-07-04 11:40 UTC (permalink / raw)
  To: gregkh, Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai
  Cc: linux-usb, linux-kernel, punnaiah.choudary.kalluri,
	Srikanth Chary Chennoju

This patch adds supports for devices which are capable of super speed plus.

Signed-off-by: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
---
 drivers/usb/gadget/legacy/zero.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/legacy/zero.c b/drivers/usb/gadget/legacy/zero.c
index a05785bdeb30..0cfb7dec22e2 100644
--- a/drivers/usb/gadget/legacy/zero.c
+++ b/drivers/usb/gadget/legacy/zero.c
@@ -415,7 +415,7 @@ static struct usb_composite_driver zero_driver = {
 	.name		= "zero",
 	.dev		= &device_desc,
 	.strings	= dev_strings,
-	.max_speed	= USB_SPEED_SUPER,
+	.max_speed	= USB_SPEED_SUPER_PLUS,
 	.bind		= zero_bind,
 	.unbind		= zero_unbind,
 	.suspend	= zero_suspend,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-04 11:40 [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers Srikanth Chary Chennoju
  2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
@ 2025-07-04 11:40 ` Srikanth Chary Chennoju
  2025-07-04 13:47   ` Alan Stern
  2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
  2 siblings, 1 reply; 18+ messages in thread
From: Srikanth Chary Chennoju @ 2025-07-04 11:40 UTC (permalink / raw)
  To: gregkh, Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai
  Cc: linux-usb, linux-kernel, punnaiah.choudary.kalluri,
	Srikanth Chary Chennoju

This patch supports bulk_maxburst. Without this change
we are not able to achieve performance for super speed plus device.
Without this fix, we confirmed through lecroy that it is sending
packets with NumP always equal to 1.

Signed-off-by: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
---
 drivers/usb/gadget/function/f_sourcesink.c | 14 ++++++++++++++
 drivers/usb/gadget/function/g_zero.h       |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index ec5fd25020fd..84f3b3bc7669 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -45,6 +45,7 @@ struct f_sourcesink {
 	unsigned isoc_maxpacket;
 	unsigned isoc_mult;
 	unsigned isoc_maxburst;
+	unsigned bulk_maxburst;
 	unsigned buflen;
 	unsigned bulk_qlen;
 	unsigned iso_qlen;
@@ -328,6 +329,10 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
 	source_sink_intf_alt0.bInterfaceNumber = id;
 	source_sink_intf_alt1.bInterfaceNumber = id;
 
+	/* sanity check the bulk module parameters */
+	if (ss->bulk_maxburst > 15)
+		ss->bulk_maxburst = 15;
+
 	/* allocate bulk endpoints */
 	ss->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc);
 	if (!ss->in_ep) {
@@ -341,6 +346,14 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
 	if (!ss->out_ep)
 		goto autoconf_fail;
 
+	/*
+	 * Fill in the SS bulk descriptors from the module parameters.
+	 * We assume that the user knows what they are doing and won't
+	 * give parameters that their UDC doesn't support.
+	 */
+	ss_source_comp_desc.bMaxBurst = ss->bulk_maxburst;
+	ss_sink_comp_desc.bMaxBurst = ss->bulk_maxburst;
+
 	/* sanity check the isoc module parameters */
 	if (ss->isoc_interval < 1)
 		ss->isoc_interval = 1;
@@ -852,6 +865,7 @@ static struct usb_function *source_sink_alloc_func(
 	ss->isoc_maxpacket = ss_opts->isoc_maxpacket;
 	ss->isoc_mult = ss_opts->isoc_mult;
 	ss->isoc_maxburst = ss_opts->isoc_maxburst;
+	ss->bulk_maxburst = ss_opts->bulk_maxburst;
 	ss->buflen = ss_opts->bulk_buflen;
 	ss->bulk_qlen = ss_opts->bulk_qlen;
 	ss->iso_qlen = ss_opts->iso_qlen;
diff --git a/drivers/usb/gadget/function/g_zero.h b/drivers/usb/gadget/function/g_zero.h
index 98b8462ad538..3f327e37f398 100644
--- a/drivers/usb/gadget/function/g_zero.h
+++ b/drivers/usb/gadget/function/g_zero.h
@@ -20,6 +20,7 @@ struct usb_zero_options {
 	unsigned isoc_maxpacket;
 	unsigned isoc_mult;
 	unsigned isoc_maxburst;
+	unsigned bulk_maxburst;
 	unsigned bulk_buflen;
 	unsigned qlen;
 	unsigned ss_bulk_qlen;
@@ -33,6 +34,7 @@ struct f_ss_opts {
 	unsigned isoc_maxpacket;
 	unsigned isoc_mult;
 	unsigned isoc_maxburst;
+	unsigned bulk_maxburst;
 	unsigned bulk_buflen;
 	unsigned bulk_qlen;
 	unsigned iso_qlen;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
  2025-07-04 11:40 [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers Srikanth Chary Chennoju
  2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
  2025-07-04 11:40 ` [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers Srikanth Chary Chennoju
@ 2025-07-04 11:40 ` Srikanth Chary Chennoju
  2025-07-04 12:03   ` Greg KH
  2025-07-05  3:02   ` kernel test robot
  2 siblings, 2 replies; 18+ messages in thread
From: Srikanth Chary Chennoju @ 2025-07-04 11:40 UTC (permalink / raw)
  To: gregkh, Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai
  Cc: linux-usb, linux-kernel, punnaiah.choudary.kalluri,
	Srikanth Chary Chennoju

This patch is created to support super speed plus endpoint for
Isochronous transfers. Now super speed endpoint companion is
accompanied by super speed plus endpoint companion.
With this change we could see the Isoc IN and OUT performance
reaching to ~749MB/sec which is 96K per uframe.
The performance numbers are confirmed through Lecroy trace.

Signed-off-by: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
---
 drivers/usb/gadget/function/f_sourcesink.c | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index 84f3b3bc7669..6499e95e0e9c 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -232,6 +232,12 @@ static struct usb_ss_ep_comp_descriptor ss_iso_source_comp_desc = {
 	.wBytesPerInterval =	cpu_to_le16(1024),
 };
 
+static struct usb_ssp_isoc_ep_comp_descriptor ssp_iso_source_comp_desc = {
+	.bLength =		USB_DT_SSP_ISOC_EP_COMP_SIZE,
+	.bDescriptorType =	USB_DT_SSP_ISOC_ENDPOINT_COMP,
+	.dwBytesPerInterval =	cpu_to_le32(1024),
+};
+
 static struct usb_endpoint_descriptor ss_iso_sink_desc = {
 	.bLength =		USB_DT_ENDPOINT_SIZE,
 	.bDescriptorType =	USB_DT_ENDPOINT,
@@ -250,6 +256,12 @@ static struct usb_ss_ep_comp_descriptor ss_iso_sink_comp_desc = {
 	.wBytesPerInterval =	cpu_to_le16(1024),
 };
 
+static struct usb_ssp_isoc_ep_comp_descriptor ssp_iso_sink_comp_desc = {
+	.bLength =		USB_DT_SSP_ISOC_EP_COMP_SIZE,
+	.bDescriptorType =	USB_DT_SSP_ISOC_ENDPOINT_COMP,
+	.dwBytesPerInterval =	cpu_to_le32(1024),
+};
+
 static struct usb_descriptor_header *ss_source_sink_descs[] = {
 	(struct usb_descriptor_header *) &source_sink_intf_alt0,
 	(struct usb_descriptor_header *) &ss_source_desc,
@@ -264,8 +276,10 @@ static struct usb_descriptor_header *ss_source_sink_descs[] = {
 	(struct usb_descriptor_header *) &ss_sink_comp_desc,
 	(struct usb_descriptor_header *) &ss_iso_source_desc,
 	(struct usb_descriptor_header *) &ss_iso_source_comp_desc,
+	(struct usb_descriptor_header *)&ssp_iso_source_comp_desc,
 	(struct usb_descriptor_header *) &ss_iso_sink_desc,
 	(struct usb_descriptor_header *) &ss_iso_sink_comp_desc,
+	(struct usb_descriptor_header *)&ssp_iso_sink_comp_desc,
 	NULL,
 };
 
@@ -428,7 +442,7 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
 	 */
 	ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
 	ss_iso_source_desc.bInterval = ss->isoc_interval;
-	ss_iso_source_comp_desc.bmAttributes = ss->isoc_mult;
+	ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
 	ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
 	ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
 		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
@@ -437,12 +451,17 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
 
 	ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
 	ss_iso_sink_desc.bInterval = ss->isoc_interval;
-	ss_iso_sink_comp_desc.bmAttributes = ss->isoc_mult;
+	ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
 	ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
 	ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
 		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
 	ss_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
 
+	ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
+		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
+	ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
+		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
+
 	ret = usb_assign_descriptors(f, fs_source_sink_descs,
 			hs_source_sink_descs, ss_source_sink_descs,
 			ss_source_sink_descs);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
  2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
@ 2025-07-04 12:03   ` Greg KH
  2025-07-07 10:38     ` Chary Chennoju, Srikanth
  2025-07-05  3:02   ` kernel test robot
  1 sibling, 1 reply; 18+ messages in thread
From: Greg KH @ 2025-07-04 12:03 UTC (permalink / raw)
  To: Srikanth Chary Chennoju
  Cc: Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai, linux-usb,
	linux-kernel, punnaiah.choudary.kalluri

On Fri, Jul 04, 2025 at 05:10:13PM +0530, Srikanth Chary Chennoju wrote:
> This patch is created to support super speed plus endpoint for
> Isochronous transfers. Now super speed endpoint companion is
> accompanied by super speed plus endpoint companion.
> With this change we could see the Isoc IN and OUT performance
> reaching to ~749MB/sec which is 96K per uframe.
> The performance numbers are confirmed through Lecroy trace.

You do have a full 72 characters wide, you can use it :)

> 
> Signed-off-by: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
> ---
>  drivers/usb/gadget/function/f_sourcesink.c | 23 ++++++++++++++++++++--
>  1 file changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
> index 84f3b3bc7669..6499e95e0e9c 100644
> --- a/drivers/usb/gadget/function/f_sourcesink.c
> +++ b/drivers/usb/gadget/function/f_sourcesink.c
> @@ -232,6 +232,12 @@ static struct usb_ss_ep_comp_descriptor ss_iso_source_comp_desc = {
>  	.wBytesPerInterval =	cpu_to_le16(1024),
>  };
>  
> +static struct usb_ssp_isoc_ep_comp_descriptor ssp_iso_source_comp_desc = {
> +	.bLength =		USB_DT_SSP_ISOC_EP_COMP_SIZE,
> +	.bDescriptorType =	USB_DT_SSP_ISOC_ENDPOINT_COMP,
> +	.dwBytesPerInterval =	cpu_to_le32(1024),
> +};
> +
>  static struct usb_endpoint_descriptor ss_iso_sink_desc = {
>  	.bLength =		USB_DT_ENDPOINT_SIZE,
>  	.bDescriptorType =	USB_DT_ENDPOINT,
> @@ -250,6 +256,12 @@ static struct usb_ss_ep_comp_descriptor ss_iso_sink_comp_desc = {
>  	.wBytesPerInterval =	cpu_to_le16(1024),
>  };
>  
> +static struct usb_ssp_isoc_ep_comp_descriptor ssp_iso_sink_comp_desc = {
> +	.bLength =		USB_DT_SSP_ISOC_EP_COMP_SIZE,
> +	.bDescriptorType =	USB_DT_SSP_ISOC_ENDPOINT_COMP,
> +	.dwBytesPerInterval =	cpu_to_le32(1024),
> +};
> +
>  static struct usb_descriptor_header *ss_source_sink_descs[] = {
>  	(struct usb_descriptor_header *) &source_sink_intf_alt0,
>  	(struct usb_descriptor_header *) &ss_source_desc,
> @@ -264,8 +276,10 @@ static struct usb_descriptor_header *ss_source_sink_descs[] = {
>  	(struct usb_descriptor_header *) &ss_sink_comp_desc,
>  	(struct usb_descriptor_header *) &ss_iso_source_desc,
>  	(struct usb_descriptor_header *) &ss_iso_source_comp_desc,
> +	(struct usb_descriptor_header *)&ssp_iso_source_comp_desc,
>  	(struct usb_descriptor_header *) &ss_iso_sink_desc,
>  	(struct usb_descriptor_header *) &ss_iso_sink_comp_desc,
> +	(struct usb_descriptor_header *)&ssp_iso_sink_comp_desc,

Odd spacing :(

Please follow the format that was previously there.


>  	NULL,
>  };
>  
> @@ -428,7 +442,7 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
>  	 */
>  	ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
>  	ss_iso_source_desc.bInterval = ss->isoc_interval;
> -	ss_iso_source_comp_desc.bmAttributes = ss->isoc_mult;
> +	ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;

What is 0x80 for?  Is that a #define somewhere?

>  	ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
>  	ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
>  		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
> @@ -437,12 +451,17 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
>  
>  	ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
>  	ss_iso_sink_desc.bInterval = ss->isoc_interval;
> -	ss_iso_sink_comp_desc.bmAttributes = ss->isoc_mult;
> +	ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;

Same here.

>  	ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
>  	ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
>  		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
>  	ss_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
>  
> +	ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
> +		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
> +	ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
> +		(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;

Why * 2?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/3] usb:gadget:zero: support for super speed plus
  2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
@ 2025-07-04 12:04   ` Greg KH
  2025-07-07 10:41     ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Greg KH @ 2025-07-04 12:04 UTC (permalink / raw)
  To: Srikanth Chary Chennoju
  Cc: Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai, linux-usb,
	linux-kernel, punnaiah.choudary.kalluri

On Fri, Jul 04, 2025 at 05:10:11PM +0530, Srikanth Chary Chennoju wrote:
> This patch adds supports for devices which are capable of super speed plus.

Nit, you need so ' ' in your subject line :)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-04 11:40 ` [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers Srikanth Chary Chennoju
@ 2025-07-04 13:47   ` Alan Stern
  2025-07-07 10:49     ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Stern @ 2025-07-04 13:47 UTC (permalink / raw)
  To: Srikanth Chary Chennoju
  Cc: gregkh, Thinh.Nguyen, m.grzeschik, Chris.Wulff, tiwai, linux-usb,
	linux-kernel, punnaiah.choudary.kalluri

On Fri, Jul 04, 2025 at 05:10:12PM +0530, Srikanth Chary Chennoju wrote:
> This patch supports bulk_maxburst. Without this change
> we are not able to achieve performance for super speed plus device.
> Without this fix, we confirmed through lecroy that it is sending
> packets with NumP always equal to 1.
> 
> Signed-off-by: Srikanth Chary Chennoju <srikanth.chary-chennoju@amd.com>
> ---
>  drivers/usb/gadget/function/f_sourcesink.c | 14 ++++++++++++++
>  drivers/usb/gadget/function/g_zero.h       |  2 ++
>  2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
> index ec5fd25020fd..84f3b3bc7669 100644
> --- a/drivers/usb/gadget/function/f_sourcesink.c
> +++ b/drivers/usb/gadget/function/f_sourcesink.c

> @@ -341,6 +346,14 @@ sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
>  	if (!ss->out_ep)
>  		goto autoconf_fail;
>  
> +	/*
> +	 * Fill in the SS bulk descriptors from the module parameters.
> +	 * We assume that the user knows what they are doing and won't
> +	 * give parameters that their UDC doesn't support.
> +	 */

That's not such a great assumption; people make mistakes like this quite 
a lot.  If checking and adjusting the parameters isn't terribly 
difficult, you should do it.

Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
  2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
  2025-07-04 12:03   ` Greg KH
@ 2025-07-05  3:02   ` kernel test robot
  1 sibling, 0 replies; 18+ messages in thread
From: kernel test robot @ 2025-07-05  3:02 UTC (permalink / raw)
  To: Srikanth Chary Chennoju, gregkh, Thinh.Nguyen, m.grzeschik,
	Chris.Wulff, tiwai
  Cc: oe-kbuild-all, linux-usb, linux-kernel, punnaiah.choudary.kalluri,
	Srikanth Chary Chennoju

Hi Srikanth,

kernel test robot noticed the following build warnings:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v6.16-rc4 next-20250704]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Srikanth-Chary-Chennoju/usb-gadget-zero-support-for-super-speed-plus/20250704-194150
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link:    https://lore.kernel.org/r/20250704114013.3396795-4-srikanth.chary-chennoju%40amd.com
patch subject: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
config: i386-randconfig-063-20250705 (https://download.01.org/0day-ci/archive/20250705/202507051018.998T0Yqk-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250705/202507051018.998T0Yqk-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507051018.998T0Yqk-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:382:43: sparse:     got unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:385:41: sparse:     got unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int isoc_maxpacket @@
   drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:421:43: sparse:     got unsigned int isoc_maxpacket
   drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse: sparse: invalid assignment: |=
   drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse:    left side has type restricted __le16
   drivers/usb/gadget/function/f_sourcesink.c:422:43: sparse:    right side has type unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int isoc_maxpacket @@
   drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:427:41: sparse:     got unsigned int isoc_maxpacket
   drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse: sparse: invalid assignment: |=
   drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse:    left side has type restricted __le16
   drivers/usb/gadget/function/f_sourcesink.c:428:41: sparse:    right side has type unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int isoc_maxpacket @@
   drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:443:43: sparse:     got unsigned int isoc_maxpacket
   drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse:     expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval
   drivers/usb/gadget/function/f_sourcesink.c:447:51: sparse:     got unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize @@     got unsigned int isoc_maxpacket @@
   drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse:     expected restricted __le16 static [addressable] [toplevel] [usertype] wMaxPacketSize
   drivers/usb/gadget/function/f_sourcesink.c:452:41: sparse:     got unsigned int isoc_maxpacket
   drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse:     expected restricted __le16 static [addressable] [assigned] [toplevel] [usertype] wBytesPerInterval
   drivers/usb/gadget/function/f_sourcesink.c:456:49: sparse:     got unsigned int
>> drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse:     expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval
   drivers/usb/gadget/function/f_sourcesink.c:460:53: sparse:     got unsigned int
   drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval @@     got unsigned int @@
   drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse:     expected restricted __le32 static [addressable] [toplevel] [usertype] dwBytesPerInterval
   drivers/usb/gadget/function/f_sourcesink.c:462:51: sparse:     got unsigned int

vim +460 drivers/usb/gadget/function/f_sourcesink.c

   330	
   331	static int
   332	sourcesink_bind(struct usb_configuration *c, struct usb_function *f)
   333	{
   334		struct usb_composite_dev *cdev = c->cdev;
   335		struct f_sourcesink	*ss = func_to_ss(f);
   336		int	id;
   337		int ret;
   338	
   339		/* allocate interface ID(s) */
   340		id = usb_interface_id(c, f);
   341		if (id < 0)
   342			return id;
   343		source_sink_intf_alt0.bInterfaceNumber = id;
   344		source_sink_intf_alt1.bInterfaceNumber = id;
   345	
   346		/* sanity check the bulk module parameters */
   347		if (ss->bulk_maxburst > 15)
   348			ss->bulk_maxburst = 15;
   349	
   350		/* allocate bulk endpoints */
   351		ss->in_ep = usb_ep_autoconfig(cdev->gadget, &fs_source_desc);
   352		if (!ss->in_ep) {
   353	autoconf_fail:
   354			ERROR(cdev, "%s: can't autoconfigure on %s\n",
   355				f->name, cdev->gadget->name);
   356			return -ENODEV;
   357		}
   358	
   359		ss->out_ep = usb_ep_autoconfig(cdev->gadget, &fs_sink_desc);
   360		if (!ss->out_ep)
   361			goto autoconf_fail;
   362	
   363		/*
   364		 * Fill in the SS bulk descriptors from the module parameters.
   365		 * We assume that the user knows what they are doing and won't
   366		 * give parameters that their UDC doesn't support.
   367		 */
   368		ss_source_comp_desc.bMaxBurst = ss->bulk_maxburst;
   369		ss_sink_comp_desc.bMaxBurst = ss->bulk_maxburst;
   370	
   371		/* sanity check the isoc module parameters */
   372		if (ss->isoc_interval < 1)
   373			ss->isoc_interval = 1;
   374		if (ss->isoc_interval > 16)
   375			ss->isoc_interval = 16;
   376		if (ss->isoc_mult > 2)
   377			ss->isoc_mult = 2;
   378		if (ss->isoc_maxburst > 15)
   379			ss->isoc_maxburst = 15;
   380	
   381		/* fill in the FS isoc descriptors from the module parameters */
   382		fs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ?
   383							1023 : ss->isoc_maxpacket;
   384		fs_iso_source_desc.bInterval = ss->isoc_interval;
   385		fs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket > 1023 ?
   386							1023 : ss->isoc_maxpacket;
   387		fs_iso_sink_desc.bInterval = ss->isoc_interval;
   388	
   389		/* allocate iso endpoints */
   390		ss->iso_in_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_source_desc);
   391		if (!ss->iso_in_ep)
   392			goto no_iso;
   393	
   394		ss->iso_out_ep = usb_ep_autoconfig(cdev->gadget, &fs_iso_sink_desc);
   395		if (!ss->iso_out_ep) {
   396			usb_ep_autoconfig_release(ss->iso_in_ep);
   397			ss->iso_in_ep = NULL;
   398	no_iso:
   399			/*
   400			 * We still want to work even if the UDC doesn't have isoc
   401			 * endpoints, so null out the alt interface that contains
   402			 * them and continue.
   403			 */
   404			fs_source_sink_descs[FS_ALT_IFC_1_OFFSET] = NULL;
   405			hs_source_sink_descs[HS_ALT_IFC_1_OFFSET] = NULL;
   406			ss_source_sink_descs[SS_ALT_IFC_1_OFFSET] = NULL;
   407		}
   408	
   409		if (ss->isoc_maxpacket > 1024)
   410			ss->isoc_maxpacket = 1024;
   411	
   412		/* support high speed hardware */
   413		hs_source_desc.bEndpointAddress = fs_source_desc.bEndpointAddress;
   414		hs_sink_desc.bEndpointAddress = fs_sink_desc.bEndpointAddress;
   415	
   416		/*
   417		 * Fill in the HS isoc descriptors from the module parameters.
   418		 * We assume that the user knows what they are doing and won't
   419		 * give parameters that their UDC doesn't support.
   420		 */
   421		hs_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
   422		hs_iso_source_desc.wMaxPacketSize |= ss->isoc_mult << 11;
   423		hs_iso_source_desc.bInterval = ss->isoc_interval;
   424		hs_iso_source_desc.bEndpointAddress =
   425			fs_iso_source_desc.bEndpointAddress;
   426	
   427		hs_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
   428		hs_iso_sink_desc.wMaxPacketSize |= ss->isoc_mult << 11;
   429		hs_iso_sink_desc.bInterval = ss->isoc_interval;
   430		hs_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
   431	
   432		/* support super speed hardware */
   433		ss_source_desc.bEndpointAddress =
   434			fs_source_desc.bEndpointAddress;
   435		ss_sink_desc.bEndpointAddress =
   436			fs_sink_desc.bEndpointAddress;
   437	
   438		/*
   439		 * Fill in the SS isoc descriptors from the module parameters.
   440		 * We assume that the user knows what they are doing and won't
   441		 * give parameters that their UDC doesn't support.
   442		 */
   443		ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
   444		ss_iso_source_desc.bInterval = ss->isoc_interval;
   445		ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
   446		ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
   447		ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
   448			(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
   449		ss_iso_source_desc.bEndpointAddress =
   450			fs_iso_source_desc.bEndpointAddress;
   451	
   452		ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
   453		ss_iso_sink_desc.bInterval = ss->isoc_interval;
   454		ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
   455		ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
   456		ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
   457			(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
   458		ss_iso_sink_desc.bEndpointAddress = fs_iso_sink_desc.bEndpointAddress;
   459	
 > 460		ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
   461			(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
   462		ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
   463			(ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
   464	
   465		ret = usb_assign_descriptors(f, fs_source_sink_descs,
   466				hs_source_sink_descs, ss_source_sink_descs,
   467				ss_source_sink_descs);
   468		if (ret)
   469			return ret;
   470	
   471		DBG(cdev, "%s: IN/%s, OUT/%s, ISO-IN/%s, ISO-OUT/%s\n",
   472				f->name, ss->in_ep->name, ss->out_ep->name,
   473				ss->iso_in_ep ? ss->iso_in_ep->name : "<none>",
   474				ss->iso_out_ep ? ss->iso_out_ep->name : "<none>");
   475		return 0;
   476	}
   477	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
  2025-07-04 12:03   ` Greg KH
@ 2025-07-07 10:38     ` Chary Chennoju, Srikanth
  2025-08-11 15:37       ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-07-07 10:38 UTC (permalink / raw)
  To: Greg KH
  Cc: Thinh.Nguyen@synopsys.com, m.grzeschik@pengutronix.de,
	Chris.Wulff@biamp.com, tiwai@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kalluri, Punnaiah Choudary

[-- Attachment #1: Type: text/plain, Size: 6302 bytes --]

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Greg,

Thank you for your comments. Please find the inline comments.

Regards,
Srikanth

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, July 4, 2025 5:34 PM
> To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> <punnaiah.choudary.kalluri@amd.com>
> Subject: Re: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint
> companion for Isochronous transfers
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> On Fri, Jul 04, 2025 at 05:10:13PM +0530, Srikanth Chary Chennoju wrote:
> > This patch is created to support super speed plus endpoint for
> > Isochronous transfers. Now super speed endpoint companion is
> > accompanied by super speed plus endpoint companion.
> > With this change we could see the Isoc IN and OUT performance reaching
> > to ~749MB/sec which is 96K per uframe.
> > The performance numbers are confirmed through Lecroy trace.
>
> You do have a full 72 characters wide, you can use it :)
>  [Srikanth] : I will use 72 characters for next version of patch.
> >
> > Signed-off-by: Srikanth Chary Chennoju
> > <srikanth.chary-chennoju@amd.com>
> > ---
> >  drivers/usb/gadget/function/f_sourcesink.c | 23
> > ++++++++++++++++++++--
> >  1 file changed, 21 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/usb/gadget/function/f_sourcesink.c
> > b/drivers/usb/gadget/function/f_sourcesink.c
> > index 84f3b3bc7669..6499e95e0e9c 100644
> > --- a/drivers/usb/gadget/function/f_sourcesink.c
> > +++ b/drivers/usb/gadget/function/f_sourcesink.c
> > @@ -232,6 +232,12 @@ static struct usb_ss_ep_comp_descriptor
> ss_iso_source_comp_desc = {
> >       .wBytesPerInterval =    cpu_to_le16(1024),
> >  };
> >
> > +static struct usb_ssp_isoc_ep_comp_descriptor
> ssp_iso_source_comp_desc = {
> > +     .bLength =              USB_DT_SSP_ISOC_EP_COMP_SIZE,
> > +     .bDescriptorType =      USB_DT_SSP_ISOC_ENDPOINT_COMP,
> > +     .dwBytesPerInterval =   cpu_to_le32(1024),
> > +};
> > +
> >  static struct usb_endpoint_descriptor ss_iso_sink_desc = {
> >       .bLength =              USB_DT_ENDPOINT_SIZE,
> >       .bDescriptorType =      USB_DT_ENDPOINT,
> > @@ -250,6 +256,12 @@ static struct usb_ss_ep_comp_descriptor
> ss_iso_sink_comp_desc = {
> >       .wBytesPerInterval =    cpu_to_le16(1024),
> >  };
> >
> > +static struct usb_ssp_isoc_ep_comp_descriptor ssp_iso_sink_comp_desc =
> {
> > +     .bLength =              USB_DT_SSP_ISOC_EP_COMP_SIZE,
> > +     .bDescriptorType =      USB_DT_SSP_ISOC_ENDPOINT_COMP,
> > +     .dwBytesPerInterval =   cpu_to_le32(1024),
> > +};
> > +
> >  static struct usb_descriptor_header *ss_source_sink_descs[] = {
> >       (struct usb_descriptor_header *) &source_sink_intf_alt0,
> >       (struct usb_descriptor_header *) &ss_source_desc, @@ -264,8
> > +276,10 @@ static struct usb_descriptor_header *ss_source_sink_descs[] =
> {
> >       (struct usb_descriptor_header *) &ss_sink_comp_desc,
> >       (struct usb_descriptor_header *) &ss_iso_source_desc,
> >       (struct usb_descriptor_header *) &ss_iso_source_comp_desc,
> > +     (struct usb_descriptor_header *)&ssp_iso_source_comp_desc,
> >       (struct usb_descriptor_header *) &ss_iso_sink_desc,
> >       (struct usb_descriptor_header *) &ss_iso_sink_comp_desc,
> > +     (struct usb_descriptor_header *)&ssp_iso_sink_comp_desc,
>
> Odd spacing :(
>
> Please follow the format that was previously there.
> [Srikanth] : When I ran checkpatch script with "strict" option, it throwed out two Checks. Please find the snippet below. Due to that I removed the space.
>  CHECK: No space is necessary after a cast
#53: FILE: drivers/usb/gadget/function/f_sourcesink.c:279:
+       (struct usb_descriptor_header *) &ssp_iso_source_comp_desc,

CHECK: No space is necessary after a cast
#56: FILE: drivers/usb/gadget/function/f_sourcesink.c:282:
+       (struct usb_descriptor_header *) &ssp_iso_sink_comp_desc,
> >       NULL,
> >  };
> >
> > @@ -428,7 +442,7 @@ sourcesink_bind(struct usb_configuration *c, struct
> usb_function *f)
> >        */
> >       ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
> >       ss_iso_source_desc.bInterval = ss->isoc_interval;
> > -     ss_iso_source_comp_desc.bmAttributes = ss->isoc_mult;
> > +     ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
>
> What is 0x80 for?  Is that a #define somewhere?
> [Srikanth] : There is no define. I can create for it.
> >       ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
> >       ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
> >               (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1); @@
> > -437,12 +451,17 @@ sourcesink_bind(struct usb_configuration *c, struct
> > usb_function *f)
> >
> >       ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
> >       ss_iso_sink_desc.bInterval = ss->isoc_interval;
> > -     ss_iso_sink_comp_desc.bmAttributes = ss->isoc_mult;
> > +     ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
>
> Same here.
>
> >       ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
> >       ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
> >               (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
> >       ss_iso_sink_desc.bEndpointAddress =
> > fs_iso_sink_desc.bEndpointAddress;
> >
> > +     ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
> > +             (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
> > +     ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
> > +             (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
>
> Why * 2?
> [Srikanth] : Please find the attached snippet. For Super Speed, it is 48K bytes per uFrame. For Super Speed plus, it is 96Kbytes per uFrame. As per your suggestion for the above case, I can create a define here as well.
> thanks,
>
> greg k-h

[-- Attachment #2: dwBytesPerInterval.jpg --]
[-- Type: image/jpeg, Size: 153281 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 1/3] usb:gadget:zero: support for super speed plus
  2025-07-04 12:04   ` Greg KH
@ 2025-07-07 10:41     ` Chary Chennoju, Srikanth
  2025-08-11 15:35       ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-07-07 10:41 UTC (permalink / raw)
  To: Greg KH
  Cc: Thinh.Nguyen@synopsys.com, m.grzeschik@pengutronix.de,
	Chris.Wulff@biamp.com, tiwai@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Greg,

Thanks for your comments. Will make sure to differentiate the subject and commit description.

Please let me know if there are any further comments for this patch.

Thanks & Regards,
Srikanth

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, July 4, 2025 5:35 PM
> To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> <punnaiah.choudary.kalluri@amd.com>
> Subject: Re: [PATCH 1/3] usb:gadget:zero: support for super speed plus
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Fri, Jul 04, 2025 at 05:10:11PM +0530, Srikanth Chary Chennoju wrote:
> > This patch adds supports for devices which are capable of super speed plus.
>
> Nit, you need so ' ' in your subject line :)
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-04 13:47   ` Alan Stern
@ 2025-07-07 10:49     ` Chary Chennoju, Srikanth
  2025-07-07 13:45       ` Alan Stern
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-07-07 10:49 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Stern,

Thanks for your comments. If you are mentioning to have a check for the value which user is providing, then there is a check which is carried out(#34 to #37 in the patch). It limits to max burst value if user exceeds the supported value.

Regards,
Srikanth

> -----Original Message-----
> From: Alan Stern <stern@rowland.harvard.edu>
> Sent: Friday, July 4, 2025 7:18 PM
> To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> Cc: gregkh@linuxfoundation.org; Thinh.Nguyen@synopsys.com;
> m.grzeschik@pengutronix.de; Chris.Wulff@biamp.com; tiwai@suse.de; linux-
> usb@vger.kernel.org; linux-kernel@vger.kernel.org; Kalluri, Punnaiah
> Choudary <punnaiah.choudary.kalluri@amd.com>
> Subject: Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for
> bulk transfers
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Fri, Jul 04, 2025 at 05:10:12PM +0530, Srikanth Chary Chennoju wrote:
> > This patch supports bulk_maxburst. Without this change we are not able
> > to achieve performance for super speed plus device.
> > Without this fix, we confirmed through lecroy that it is sending
> > packets with NumP always equal to 1.
> >
> > Signed-off-by: Srikanth Chary Chennoju
> > <srikanth.chary-chennoju@amd.com>
> > ---
> >  drivers/usb/gadget/function/f_sourcesink.c | 14 ++++++++++++++
> >  drivers/usb/gadget/function/g_zero.h       |  2 ++
> >  2 files changed, 16 insertions(+)
> >
> > diff --git a/drivers/usb/gadget/function/f_sourcesink.c
> > b/drivers/usb/gadget/function/f_sourcesink.c
> > index ec5fd25020fd..84f3b3bc7669 100644
> > --- a/drivers/usb/gadget/function/f_sourcesink.c
> > +++ b/drivers/usb/gadget/function/f_sourcesink.c
>
> > @@ -341,6 +346,14 @@ sourcesink_bind(struct usb_configuration *c,
> struct usb_function *f)
> >       if (!ss->out_ep)
> >               goto autoconf_fail;
> >
> > +     /*
> > +      * Fill in the SS bulk descriptors from the module parameters.
> > +      * We assume that the user knows what they are doing and won't
> > +      * give parameters that their UDC doesn't support.
> > +      */
>
> That's not such a great assumption; people make mistakes like this quite a lot.
> If checking and adjusting the parameters isn't terribly difficult, you should do
> it.
>
> Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-07 10:49     ` Chary Chennoju, Srikanth
@ 2025-07-07 13:45       ` Alan Stern
  2025-07-07 14:01         ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Alan Stern @ 2025-07-07 13:45 UTC (permalink / raw)
  To: Chary Chennoju, Srikanth
  Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalluri, Punnaiah Choudary

On Mon, Jul 07, 2025 at 10:49:26AM +0000, Chary Chennoju, Srikanth wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
> Hi Stern,
> 
> Thanks for your comments. If you are mentioning to have a check for the value which user is providing, then there is a check which is carried out(#34 to #37 in the patch). It limits to max burst value if user exceeds the supported value.

> > > +     /*
> > > +      * Fill in the SS bulk descriptors from the module parameters.
> > > +      * We assume that the user knows what they are doing and won't
> > > +      * give parameters that their UDC doesn't support.
> > > +      */

In that case this comment is wrong, isn't it?  You don't assume that the 
user knows what they are doing; you do check and limit the value to 
maxburst if the user's value is too big.

Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-07 13:45       ` Alan Stern
@ 2025-07-07 14:01         ` Chary Chennoju, Srikanth
  2025-08-11 15:36           ` Chary Chennoju, Srikanth
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-07-07 14:01 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Stern,

Agreed. I can remove the comment as I have added the check for the value based on user input.

Regards,
Srikanth

> -----Original Message-----
> From: Alan Stern <stern@rowland.harvard.edu>
> Sent: Monday, July 7, 2025 7:15 PM
> To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> Cc: gregkh@linuxfoundation.org; Thinh.Nguyen@synopsys.com;
> m.grzeschik@pengutronix.de; Chris.Wulff@biamp.com; tiwai@suse.de; linux-
> usb@vger.kernel.org; linux-kernel@vger.kernel.org; Kalluri, Punnaiah
> Choudary <punnaiah.choudary.kalluri@amd.com>
> Subject: Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for
> bulk transfers
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> On Mon, Jul 07, 2025 at 10:49:26AM +0000, Chary Chennoju, Srikanth wrote:
> > [AMD Official Use Only - AMD Internal Distribution Only]
> >
> > Hi Stern,
> >
> > Thanks for your comments. If you are mentioning to have a check for the
> value which user is providing, then there is a check which is carried out(#34
> to #37 in the patch). It limits to max burst value if user exceeds the supported
> value.
>
> > > > +     /*
> > > > +      * Fill in the SS bulk descriptors from the module parameters.
> > > > +      * We assume that the user knows what they are doing and won't
> > > > +      * give parameters that their UDC doesn't support.
> > > > +      */
>
> In that case this comment is wrong, isn't it?  You don't assume that the user
> knows what they are doing; you do check and limit the value to maxburst if
> the user's value is too big.
>
> Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 1/3] usb:gadget:zero: support for super speed plus
  2025-07-07 10:41     ` Chary Chennoju, Srikanth
@ 2025-08-11 15:35       ` Chary Chennoju, Srikanth
  2025-08-11 15:58         ` Greg KH
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-08-11 15:35 UTC (permalink / raw)
  To: Greg KH
  Cc: Thinh.Nguyen@synopsys.com, m.grzeschik@pengutronix.de,
	Chris.Wulff@biamp.com, tiwai@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Greg,

Please let me know if there are any comments for this patch.

Thanks & Regards,
Srikanth

> -----Original Message-----
> From: Chary Chennoju, Srikanth
> Sent: Monday, July 7, 2025 4:12 PM
> To: Greg KH <gregkh@linuxfoundation.org>
> Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> <punnaiah.choudary.kalluri@amd.com>
> Subject: RE: [PATCH 1/3] usb:gadget:zero: support for super speed plus
>
> Hi Greg,
>
> Thanks for your comments. Will make sure to differentiate the subject and
> commit description.
>
> Please let me know if there are any further comments for this patch.
>
> Thanks & Regards,
> Srikanth
>
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Friday, July 4, 2025 5:35 PM
> > To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> > Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> > Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org;
> > linux- kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> > <punnaiah.choudary.kalluri@amd.com>
> > Subject: Re: [PATCH 1/3] usb:gadget:zero: support for super speed plus
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > On Fri, Jul 04, 2025 at 05:10:11PM +0530, Srikanth Chary Chennoju wrote:
> > > This patch adds supports for devices which are capable of super speed
> plus.
> >
> > Nit, you need so ' ' in your subject line :)
> >
> > thanks,
> >
> > greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-07-07 14:01         ` Chary Chennoju, Srikanth
@ 2025-08-11 15:36           ` Chary Chennoju, Srikanth
  2025-08-11 16:10             ` Alan Stern
  0 siblings, 1 reply; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-08-11 15:36 UTC (permalink / raw)
  To: Alan Stern
  Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Stern,

Please let me know if there are any further comments for this patch.

Thanks & Regards,
Srikanth

> -----Original Message-----
> From: Chary Chennoju, Srikanth
> Sent: Monday, July 7, 2025 7:31 PM
> To: Alan Stern <stern@rowland.harvard.edu>
> Cc: gregkh@linuxfoundation.org; Thinh.Nguyen@synopsys.com;
> m.grzeschik@pengutronix.de; Chris.Wulff@biamp.com; tiwai@suse.de; linux-
> usb@vger.kernel.org; linux-kernel@vger.kernel.org; Kalluri, Punnaiah
> Choudary <punnaiah.choudary.kalluri@amd.com>
> Subject: RE: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for
> bulk transfers
>
> Hi Stern,
>
> Agreed. I can remove the comment as I have added the check for the value
> based on user input.
>
> Regards,
> Srikanth
>
> > -----Original Message-----
> > From: Alan Stern <stern@rowland.harvard.edu>
> > Sent: Monday, July 7, 2025 7:15 PM
> > To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> > Cc: gregkh@linuxfoundation.org; Thinh.Nguyen@synopsys.com;
> > m.grzeschik@pengutronix.de; Chris.Wulff@biamp.com; tiwai@suse.de;
> > linux- usb@vger.kernel.org; linux-kernel@vger.kernel.org; Kalluri,
> > Punnaiah Choudary <punnaiah.choudary.kalluri@amd.com>
> > Subject: Re: [PATCH 2/3] usb: gadget: f_sourcesink support for
> > maxburst for bulk transfers
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > On Mon, Jul 07, 2025 at 10:49:26AM +0000, Chary Chennoju, Srikanth
> wrote:
> > > [AMD Official Use Only - AMD Internal Distribution Only]
> > >
> > > Hi Stern,
> > >
> > > Thanks for your comments. If you are mentioning to have a check for
> > > the
> > value which user is providing, then there is a check which is carried
> > out(#34 to #37 in the patch). It limits to max burst value if user
> > exceeds the supported value.
> >
> > > > > +     /*
> > > > > +      * Fill in the SS bulk descriptors from the module parameters.
> > > > > +      * We assume that the user knows what they are doing and won't
> > > > > +      * give parameters that their UDC doesn't support.
> > > > > +      */
> >
> > In that case this comment is wrong, isn't it?  You don't assume that
> > the user knows what they are doing; you do check and limit the value
> > to maxburst if the user's value is too big.
> >
> > Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers
  2025-07-07 10:38     ` Chary Chennoju, Srikanth
@ 2025-08-11 15:37       ` Chary Chennoju, Srikanth
  0 siblings, 0 replies; 18+ messages in thread
From: Chary Chennoju, Srikanth @ 2025-08-11 15:37 UTC (permalink / raw)
  To: Greg KH
  Cc: Thinh.Nguyen@synopsys.com, m.grzeschik@pengutronix.de,
	Chris.Wulff@biamp.com, tiwai@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kalluri, Punnaiah Choudary

[AMD Official Use Only - AMD Internal Distribution Only]

Hi Greg,

Please let me know if there are any comments for this patch.

Thanks & Regards,
Srikanth

> -----Original Message-----
> From: Chary Chennoju, Srikanth
> Sent: Monday, July 7, 2025 4:09 PM
> To: Greg KH <gregkh@linuxfoundation.org>
> Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org; linux-
> kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> <punnaiah.choudary.kalluri@amd.com>
> Subject: RE: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint
> companion for Isochronous transfers
>
> Hi Greg,
>
> Thank you for your comments. Please find the inline comments.
>
> Regards,
> Srikanth
>
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Friday, July 4, 2025 5:34 PM
> > To: Chary Chennoju, Srikanth <srikanth.chary-chennoju@amd.com>
> > Cc: Thinh.Nguyen@synopsys.com; m.grzeschik@pengutronix.de;
> > Chris.Wulff@biamp.com; tiwai@suse.de; linux-usb@vger.kernel.org;
> > linux- kernel@vger.kernel.org; Kalluri, Punnaiah Choudary
> > <punnaiah.choudary.kalluri@amd.com>
> > Subject: Re: [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP
> > endpoint companion for Isochronous transfers
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > On Fri, Jul 04, 2025 at 05:10:13PM +0530, Srikanth Chary Chennoju wrote:
> > > This patch is created to support super speed plus endpoint for
> > > Isochronous transfers. Now super speed endpoint companion is
> > > accompanied by super speed plus endpoint companion.
> > > With this change we could see the Isoc IN and OUT performance
> > > reaching to ~749MB/sec which is 96K per uframe.
> > > The performance numbers are confirmed through Lecroy trace.
> >
> > You do have a full 72 characters wide, you can use it :)  [Srikanth] :
> > I will use 72 characters for next version of patch.
> > >
> > > Signed-off-by: Srikanth Chary Chennoju
> > > <srikanth.chary-chennoju@amd.com>
> > > ---
> > >  drivers/usb/gadget/function/f_sourcesink.c | 23
> > > ++++++++++++++++++++--
> > >  1 file changed, 21 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/usb/gadget/function/f_sourcesink.c
> > > b/drivers/usb/gadget/function/f_sourcesink.c
> > > index 84f3b3bc7669..6499e95e0e9c 100644
> > > --- a/drivers/usb/gadget/function/f_sourcesink.c
> > > +++ b/drivers/usb/gadget/function/f_sourcesink.c
> > > @@ -232,6 +232,12 @@ static struct usb_ss_ep_comp_descriptor
> > ss_iso_source_comp_desc = {
> > >       .wBytesPerInterval =    cpu_to_le16(1024),
> > >  };
> > >
> > > +static struct usb_ssp_isoc_ep_comp_descriptor
> > ssp_iso_source_comp_desc = {
> > > +     .bLength =              USB_DT_SSP_ISOC_EP_COMP_SIZE,
> > > +     .bDescriptorType =      USB_DT_SSP_ISOC_ENDPOINT_COMP,
> > > +     .dwBytesPerInterval =   cpu_to_le32(1024),
> > > +};
> > > +
> > >  static struct usb_endpoint_descriptor ss_iso_sink_desc = {
> > >       .bLength =              USB_DT_ENDPOINT_SIZE,
> > >       .bDescriptorType =      USB_DT_ENDPOINT,
> > > @@ -250,6 +256,12 @@ static struct usb_ss_ep_comp_descriptor
> > ss_iso_sink_comp_desc = {
> > >       .wBytesPerInterval =    cpu_to_le16(1024),
> > >  };
> > >
> > > +static struct usb_ssp_isoc_ep_comp_descriptor
> > > +ssp_iso_sink_comp_desc =
> > {
> > > +     .bLength =              USB_DT_SSP_ISOC_EP_COMP_SIZE,
> > > +     .bDescriptorType =      USB_DT_SSP_ISOC_ENDPOINT_COMP,
> > > +     .dwBytesPerInterval =   cpu_to_le32(1024),
> > > +};
> > > +
> > >  static struct usb_descriptor_header *ss_source_sink_descs[] = {
> > >       (struct usb_descriptor_header *) &source_sink_intf_alt0,
> > >       (struct usb_descriptor_header *) &ss_source_desc, @@ -264,8
> > > +276,10 @@ static struct usb_descriptor_header
> > > +*ss_source_sink_descs[] =
> > {
> > >       (struct usb_descriptor_header *) &ss_sink_comp_desc,
> > >       (struct usb_descriptor_header *) &ss_iso_source_desc,
> > >       (struct usb_descriptor_header *) &ss_iso_source_comp_desc,
> > > +     (struct usb_descriptor_header *)&ssp_iso_source_comp_desc,
> > >       (struct usb_descriptor_header *) &ss_iso_sink_desc,
> > >       (struct usb_descriptor_header *) &ss_iso_sink_comp_desc,
> > > +     (struct usb_descriptor_header *)&ssp_iso_sink_comp_desc,
> >
> > Odd spacing :(
> >
> > Please follow the format that was previously there.
> > [Srikanth] : When I ran checkpatch script with "strict" option, it throwed out
> two Checks. Please find the snippet below. Due to that I removed the space.
> >  CHECK: No space is necessary after a cast
> #53: FILE: drivers/usb/gadget/function/f_sourcesink.c:279:
> +     (struct usb_descriptor_header *) &ssp_iso_source_comp_desc,
>
> CHECK: No space is necessary after a cast
> #56: FILE: drivers/usb/gadget/function/f_sourcesink.c:282:
> +     (struct usb_descriptor_header *) &ssp_iso_sink_comp_desc,
> > >       NULL,
> > >  };
> > >
> > > @@ -428,7 +442,7 @@ sourcesink_bind(struct usb_configuration *c,
> > > struct
> > usb_function *f)
> > >        */
> > >       ss_iso_source_desc.wMaxPacketSize = ss->isoc_maxpacket;
> > >       ss_iso_source_desc.bInterval = ss->isoc_interval;
> > > -     ss_iso_source_comp_desc.bmAttributes = ss->isoc_mult;
> > > +     ss_iso_source_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
> >
> > What is 0x80 for?  Is that a #define somewhere?
> > [Srikanth] : There is no define. I can create for it.
> > >       ss_iso_source_comp_desc.bMaxBurst = ss->isoc_maxburst;
> > >       ss_iso_source_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
> > >               (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1); @@
> > > -437,12 +451,17 @@ sourcesink_bind(struct usb_configuration *c,
> > > struct usb_function *f)
> > >
> > >       ss_iso_sink_desc.wMaxPacketSize = ss->isoc_maxpacket;
> > >       ss_iso_sink_desc.bInterval = ss->isoc_interval;
> > > -     ss_iso_sink_comp_desc.bmAttributes = ss->isoc_mult;
> > > +     ss_iso_sink_comp_desc.bmAttributes = 0x80 | ss->isoc_mult;
> >
> > Same here.
> >
> > >       ss_iso_sink_comp_desc.bMaxBurst = ss->isoc_maxburst;
> > >       ss_iso_sink_comp_desc.wBytesPerInterval = ss->isoc_maxpacket *
> > >               (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1);
> > >       ss_iso_sink_desc.bEndpointAddress =
> > > fs_iso_sink_desc.bEndpointAddress;
> > >
> > > +     ssp_iso_source_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket
> *
> > > +             (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
> > > +     ssp_iso_sink_comp_desc.dwBytesPerInterval = ss->isoc_maxpacket *
> > > +             (ss->isoc_mult + 1) * (ss->isoc_maxburst + 1) * 2;
> >
> > Why * 2?
> > [Srikanth] : Please find the attached snippet. For Super Speed, it is 48K bytes
> per uFrame. For Super Speed plus, it is 96Kbytes per uFrame. As per your
> suggestion for the above case, I can create a define here as well.
> > thanks,
> >
> > greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 1/3] usb:gadget:zero: support for super speed plus
  2025-08-11 15:35       ` Chary Chennoju, Srikanth
@ 2025-08-11 15:58         ` Greg KH
  0 siblings, 0 replies; 18+ messages in thread
From: Greg KH @ 2025-08-11 15:58 UTC (permalink / raw)
  To: Chary Chennoju, Srikanth
  Cc: Thinh.Nguyen@synopsys.com, m.grzeschik@pengutronix.de,
	Chris.Wulff@biamp.com, tiwai@suse.de, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, Kalluri, Punnaiah Choudary

On Mon, Aug 11, 2025 at 03:35:38PM +0000, Chary Chennoju, Srikanth wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
> 
> Hi Greg,
> 
> Please let me know if there are any comments for this patch.

I have no context at all, sorry.  If it was not accepted, and you got
comments, please fix it up and submit a new version.

Remember, some of us get 1000+ emails a day to review and process,
patches from well over a month ago are long forgotten...

greg k-h

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers
  2025-08-11 15:36           ` Chary Chennoju, Srikanth
@ 2025-08-11 16:10             ` Alan Stern
  0 siblings, 0 replies; 18+ messages in thread
From: Alan Stern @ 2025-08-11 16:10 UTC (permalink / raw)
  To: Chary Chennoju, Srikanth
  Cc: gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com,
	m.grzeschik@pengutronix.de, Chris.Wulff@biamp.com, tiwai@suse.de,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kalluri, Punnaiah Choudary

On Mon, Aug 11, 2025 at 03:36:28PM +0000, Chary Chennoju, Srikanth wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]

If this message really is for AMD Internal Distribution Only then you 
should not have sent it to a public mailing list.  Or to me.

> Hi Stern,
> 
> Please let me know if there are any further comments for this patch.

No further comments at the moment.  I'm waiting for you to submit a new 
version of the patch taking the earlier comments into account.

Alan Stern

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-08-11 16:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04 11:40 [PATCH 0/3] Add support for Superspeed plus EndPoint for Bulk and Isochronous transfers Srikanth Chary Chennoju
2025-07-04 11:40 ` [PATCH 1/3] usb:gadget:zero: support for super speed plus Srikanth Chary Chennoju
2025-07-04 12:04   ` Greg KH
2025-07-07 10:41     ` Chary Chennoju, Srikanth
2025-08-11 15:35       ` Chary Chennoju, Srikanth
2025-08-11 15:58         ` Greg KH
2025-07-04 11:40 ` [PATCH 2/3] usb: gadget: f_sourcesink support for maxburst for bulk transfers Srikanth Chary Chennoju
2025-07-04 13:47   ` Alan Stern
2025-07-07 10:49     ` Chary Chennoju, Srikanth
2025-07-07 13:45       ` Alan Stern
2025-07-07 14:01         ` Chary Chennoju, Srikanth
2025-08-11 15:36           ` Chary Chennoju, Srikanth
2025-08-11 16:10             ` Alan Stern
2025-07-04 11:40 ` [PATCH 3/3] usb: gadget: f_sourcesink: Addition of SSP endpoint companion for Isochronous transfers Srikanth Chary Chennoju
2025-07-04 12:03   ` Greg KH
2025-07-07 10:38     ` Chary Chennoju, Srikanth
2025-08-11 15:37       ` Chary Chennoju, Srikanth
2025-07-05  3:02   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).