All of lore.kernel.org
 help / color / mirror / Atom feed
* [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor
@ 2018-03-13  8:30 Felipe Balbi
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2018-03-13  8:30 UTC (permalink / raw)
  To: Thinh Nguyen; +Cc: John Youn

Hi,

Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> The maximum bytes per interval for USB SuperSpeed Plus can be set by
> isoc endpoint companion descriptor when it is above 48K. If the
> descriptor is provided, then use its value.
>
> USB 3.1 spec 9.6.8
>
> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>

you should have Cc:ed Greg for this one. FWIW:

"This descriptor shall be returned for each Isochronous endpoint that
requires more than 48K bytes per Service Interval."

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

> ---
>  drivers/usb/core/urb.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
> index 9fdf137c4865..0ab4b896e3f3 100644
> --- a/drivers/usb/core/urb.c
> +++ b/drivers/usb/core/urb.c
> @@ -433,6 +433,14 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
>  			max *= mult;
>  		}
>  
> +		if (dev->speed == USB_SPEED_SUPER_PLUS &&
> +		    USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
> +			struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
> +
> +			isoc_ep_comp = &ep->ssp_isoc_ep_comp;
> +			max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
> +		}
> +
>  		/* "high bandwidth" mode, 1-3 packets/uframe? */
>  		if (dev->speed == USB_SPEED_HIGH)
>  			max *= usb_endpoint_maxp_mult(&ep->desc);
> -- 
> 2.11.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor
@ 2018-03-14  1:02 Thinh Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thinh Nguyen @ 2018-03-14  1:02 UTC (permalink / raw)
  To: Felipe Balbi, Thinh Nguyen, linux-usb, Vamsi Krishna Samavedam,
	Gustavo A. R. Silva, Takashi Iwai, Greg Kroah-Hartman
  Cc: John Youn

Hi,

On 3/13/2018 1:31 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
>> The maximum bytes per interval for USB SuperSpeed Plus can be set by
>> isoc endpoint companion descriptor when it is above 48K. If the
>> descriptor is provided, then use its value.
>>
>> USB 3.1 spec 9.6.8
>>
>> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
> 
> you should have Cc:ed Greg for this one. FWIW:

Will do next time.

> 
> "This descriptor shall be returned for each Isochronous endpoint that
> requires more than 48K bytes per Service Interval."
> 
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> 
>> ---
>>   drivers/usb/core/urb.c | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
>> index 9fdf137c4865..0ab4b896e3f3 100644
>> --- a/drivers/usb/core/urb.c
>> +++ b/drivers/usb/core/urb.c
>> @@ -433,6 +433,14 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
>>   			max *= mult;
>>   		}
>>   
>> +		if (dev->speed == USB_SPEED_SUPER_PLUS &&
>> +		    USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
>> +			struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
>> +
>> +			isoc_ep_comp = &ep->ssp_isoc_ep_comp;
>> +			max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
>> +		}
>> +
>>   		/* "high bandwidth" mode, 1-3 packets/uframe? */
>>   		if (dev->speed == USB_SPEED_HIGH)
>>   			max *= usb_endpoint_maxp_mult(&ep->desc);
>> -- 
>> 2.11.0
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Thanks,
Thinh
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor
@ 2018-01-31 21:15 Thinh Nguyen
  0 siblings, 0 replies; 3+ messages in thread
From: Thinh Nguyen @ 2018-01-31 21:15 UTC (permalink / raw)
  To: Thinh Nguyen, linux-usb, Vamsi Krishna Samavedam,
	Gustavo A. R. Silva, Takashi Iwai
  Cc: John Youn

The maximum bytes per interval for USB SuperSpeed Plus can be set by
isoc endpoint companion descriptor when it is above 48K. If the
descriptor is provided, then use its value.

USB 3.1 spec 9.6.8

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
 drivers/usb/core/urb.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 9fdf137c4865..0ab4b896e3f3 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -433,6 +433,14 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
 			max *= mult;
 		}
 
+		if (dev->speed == USB_SPEED_SUPER_PLUS &&
+		    USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
+			struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
+
+			isoc_ep_comp = &ep->ssp_isoc_ep_comp;
+			max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
+		}
+
 		/* "high bandwidth" mode, 1-3 packets/uframe? */
 		if (dev->speed == USB_SPEED_HIGH)
 			max *= usb_endpoint_maxp_mult(&ep->desc);

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

end of thread, other threads:[~2018-03-14  1:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13  8:30 [v4,02/15] usb: core: urb: Check SSP isoc ep comp descriptor Felipe Balbi
  -- strict thread matches above, loose matches on Subject: below --
2018-03-14  1:02 Thinh Nguyen
2018-01-31 21:15 Thinh Nguyen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.