Skip to contentSkip to conversation

usb: core: urb: Check SSP isoc ep comp descriptor

PATCH New Felipe Balbi 1 participant 1 message Mar 13, 2018 USB

lore
Share & tools
lore
#0 lore raw

PATCH v4 2/15 usb: core: urb: Check SSP isoc ep comp descriptor

Hi,

Quoted 7 lines · Thinh Nguyen

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

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."

Quoted 30 lines
---
 drivers/usb/core/urb.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/usb/core/urb.c +8 -0
index 9fdf137c4865..0ab4b896e3f3 100644
@@ -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);
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html