Skip to content

Commit edb92ea

Browse files
Thinh Nguyengregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Thinh Nguyen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 85a09bf commit edb92ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/usb/core/urb.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,14 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
433433
max *= mult;
434434
}
435435

436+
if (dev->speed == USB_SPEED_SUPER_PLUS &&
437+
USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) {
438+
struct usb_ssp_isoc_ep_comp_descriptor *isoc_ep_comp;
439+
440+
isoc_ep_comp = &ep->ssp_isoc_ep_comp;
441+
max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval);
442+
}
443+
436444
/* "high bandwidth" mode, 1-3 packets/uframe? */
437445
if (dev->speed == USB_SPEED_HIGH)
438446
max *= usb_endpoint_maxp_mult(&ep->desc);

0 commit comments

Comments
 (0)