diff options
author | Thinh Nguyen <Thinh.Nguyen@synopsys.com> | 2018-03-17 01:36:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 12:13:30 +0300 |
commit | edb92eaf1d478ac52e7d258af35739c76c03efea (patch) | |
tree | b0004150501cd977026fcd827ea78dea8c9dc1dc /drivers/usb/core | |
parent | 85a09bf492333300ca0a09199bce4cf1a5bdd5cb (diff) | |
download | linux-edb92eaf1d478ac52e7d258af35739c76c03efea.tar.xz |
usb: core: urb: Check SSP isoc ep comp descriptor
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
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/urb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c index 796c9b149728..f51750bcd152 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); |