Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge patch series "eUSB2 Double Isochronous IN Bandwidth support"

Sakari Ailus <sakari.ailus@linux.intel.com> says:

This series enables support for eUSB2 Double Isochronous IN Bandwidth UVC
devices specified in 'USB 2.0 Double Isochronous IN Bandwidth' ECN. In
short, it adds support for new integrated USB2 webcams that can send twice
the data compared to conventional USB2 webcams.

These devices are identified by the device descriptor bcdUSB 0x0220 value.
They have an additional eUSB2 Isochronous Endpoint Companion Descriptor,
and a zero max packet size in regular isoc endpoint descriptor. Support
for parsing that new descriptor was added in commit

c749f058b437 ("USB: core: Add eUSB2 descriptor and parsing in USB core")

This series adds support to UVC, USB core, and xHCI to identify eUSB2
double isoc devices, and allow and set proper max packet, iso frame desc
sizes, bytes per interval, and other values in URBs and xHCI endpoint
contexts needed to support the double data rates for eUSB2 double isoc
devices.

since v4:
https://lore.kernel.org/linux-usb/20250812132445.3185026-1-sakari.ailus@linux.intel.com
- New patch: use le16_to_cpu() to access endpoint descriptor's
wMaxPacketSize field, which is an __le16. This isn't a bugfix as the
value was compared to 0.
- New patch: add USB device speed check for eUSB2 isochronous endpoint
companion parsing. The check is then removed from sites checking the
existence of the companion (through companion's bDescriptorType field,
which is non-zero for valid descriptors).
- New patch: do not parse eUSB2 isoc double BW companion descriptor on
interrupt or OUT endpoints. It is not supposed to be found there,
according to the ECN.
- Rename usb_endpoint_max_isoc_bpi() as
usb_endpoint_max_periodic_payload() and move it right after
usb_maxpacket().
- Fixed @ep reference in kernel-doc documentation for
usb_endpoint_max_periodic_payload().
- In usb_endpoint_max_periodic_payload(), call struct usb_device pointer
argument "udev" instead of "dev", to align with naming elsewhere.
- Add support for interrupt endpoints in
usb_endpoint_max_periodic_payload(); eUSB2 double isoc BW is still
limited to isochronous endpoints though.
- In usb_endpoint_max_periodic_payload(), remove the separate case for
USB_SPEED_HIGH as the check is already done in parsing the eUSB isoc
double BW companion, which is checked for.
- New patch: use usb_endpoint_max_periodic_payload() in xHCI driver,
replacing xhci_get_max_esit_payload().
- Check non-zero bDescriptorType field of ep->eusb2_isoc_ep_comp instead
of dwBytesPerInterval value exceeding 3072, where
xhci_eusb2_is_isoc_bw_double() was used. This aligns the checks of eUSB2
isochronous double bandwidth support for an endpoint.
- New patch: introduce usb_endpoint_is_hs_isoc_double() to figure out
whether an endpoint uses isochronous double bandwidth and use the
function in the xHCI driver and the usb core.
xhci_eusb2_is_isoc_bw_double() is dropped, as well as the
MAX_ISOC_XFER_SIZE_HS macro. usb_endpoint_is_hs_isoc_double() also
includes check for bcdUSB == 0x220, to anticipate adding support for
eUSB2V2.
- Merge condition for checking eUSB2 isoc double bw support for
xHCI/endpoint in xhci_get_endpoint_mult().
- Improve comment regarding maximum packet size bits 12:11 in
xhci_get_endpoint_max_burst().
- Aligned subject prefixes with the recent patches to the same files.

since v3:
https://lore.kernel.org/linux-usb/20250807055355.1257029-1-sakari.ailus@linux.intel.com/
- Use spaces in aligning macro body for HCC2_EUSB2_DIC() (1st patch).
- Move usb_endpoint_max_isoc_bpi() to drivers/usb/core/usb.c (3rd patch).

since v2:
https://lore.kernel.org/linux-usb/20250711083413.1552423-1-sakari.ailus@linux.intel.com
- Use ep->eusb2_isoc_ep_comp.bDescriptorType to determined whether the
eUSB2 isochronous endpoint companion descriptor exists.
- Clean up eUSB2 double isoc bw maxp calculation.
- Drop le16_to_cpu(udev->descriptor.bcdUSB) == 0x220 check from
xhci_eusb2_is_isoc_bw_double() -- it's redundant as
ep->eusb2_isoc_ep_comp.dwBytesPerInterval will be zero otherwise.
- Add kernel-doc documentation for usb_endpoint_max_isoc_bpi().
- Check the endpoint has IN direction in usb_endpoint_max_isoc_bpi() and
usb_submit_urb() as a condition for eUSB2 isoc double bw.

since v1:
https://lore.kernel.org/linux-usb/20250616093730.2569328-2-mathias.nyman@linux.intel.com
- Introduce uvc_endpoint_max_isoc_bpi() to obtain maximum bytes per
interval value for an endpoint, in a new patch (3rd). This code has been
slightly reworked from the instance in the UVC driver, including support
for SuperSpeedPlus Isochronous Endpoint Companion.
- Use usb_endpoint_max_isoc_bpi() in the UVC driver instead of open-coding
eUSB2 support there, also drop now-redundant uvc_endpoint_max_bpi().
- Use u32 for maximum bpi and related information in the UVC driver -- the
value could be larger than a 16-bit type can hold.
- Assume max in usb_submit_urb() is a natural number as
usb_endpoint_maxp() returns only natural numbers (2nd patch).

Link: https://lore.kernel.org/r/20250820143824.551777-1-sakari.ailus@linux.intel.com
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+137 -80
+2 -2
drivers/media/usb/uvc/uvc_driver.c
··· 539 539 unsigned int nformats = 0, nframes = 0, nintervals = 0; 540 540 unsigned int size, i, n, p; 541 541 u32 *interval; 542 - u16 psize; 542 + u32 psize; 543 543 int ret = -EINVAL; 544 544 545 545 if (intf->cur_altsetting->desc.bInterfaceSubClass ··· 775 775 streaming->header.bEndpointAddress); 776 776 if (ep == NULL) 777 777 continue; 778 - psize = uvc_endpoint_max_bpi(dev->udev, ep); 778 + psize = usb_endpoint_max_periodic_payload(dev->udev, ep); 779 779 if (psize > streaming->maxpsize) 780 780 streaming->maxpsize = psize; 781 781 }
+3 -21
drivers/media/usb/uvc/uvc_video.c
··· 1870 1870 } 1871 1871 1872 1872 /* 1873 - * Compute the maximum number of bytes per interval for an endpoint. 1874 - */ 1875 - u16 uvc_endpoint_max_bpi(struct usb_device *dev, struct usb_host_endpoint *ep) 1876 - { 1877 - u16 psize; 1878 - 1879 - switch (dev->speed) { 1880 - case USB_SPEED_SUPER: 1881 - case USB_SPEED_SUPER_PLUS: 1882 - return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); 1883 - default: 1884 - psize = usb_endpoint_maxp(&ep->desc); 1885 - psize *= usb_endpoint_maxp_mult(&ep->desc); 1886 - return psize; 1887 - } 1888 - } 1889 - 1890 - /* 1891 1873 * Initialize isochronous URBs and allocate transfer buffers. The packet size 1892 1874 * is given by the endpoint. 1893 1875 */ ··· 1879 1897 struct urb *urb; 1880 1898 struct uvc_urb *uvc_urb; 1881 1899 unsigned int npackets, i; 1882 - u16 psize; 1900 + u32 psize; 1883 1901 u32 size; 1884 1902 1885 - psize = uvc_endpoint_max_bpi(stream->dev->udev, ep); 1903 + psize = usb_endpoint_max_periodic_payload(stream->dev->udev, ep); 1886 1904 size = stream->ctrl.dwMaxVideoFrameSize; 1887 1905 1888 1906 npackets = uvc_alloc_urb_buffers(stream, size, psize, gfp_flags); ··· 2025 2043 continue; 2026 2044 2027 2045 /* Check if the bandwidth is high enough. */ 2028 - psize = uvc_endpoint_max_bpi(stream->dev->udev, ep); 2046 + psize = usb_endpoint_max_periodic_payload(stream->dev->udev, ep); 2029 2047 if (psize >= bandwidth && psize < best_psize) { 2030 2048 altsetting = alts->desc.bAlternateSetting; 2031 2049 best_psize = psize;
+1 -3
drivers/media/usb/uvc/uvcvideo.h
··· 456 456 457 457 struct usb_interface *intf; 458 458 int intfnum; 459 - u16 maxpsize; 459 + u32 maxpsize; 460 460 461 461 struct uvc_streaming_header header; 462 462 enum v4l2_buf_type type; ··· 798 798 /* Utility functions */ 799 799 struct usb_host_endpoint *uvc_find_endpoint(struct usb_host_interface *alts, 800 800 u8 epaddr); 801 - u16 uvc_endpoint_max_bpi(struct usb_device *dev, struct usb_host_endpoint *ep); 802 - 803 801 /* Quirks support */ 804 802 void uvc_video_decode_isight(struct uvc_urb *uvc_urb, 805 803 struct uvc_buffer *buf,
+2 -2
drivers/usb/core/config.c
··· 507 507 } 508 508 509 509 /* Parse a possible eUSB2 periodic endpoint companion descriptor */ 510 - if (bcdUSB == 0x0220 && d->wMaxPacketSize == 0 && 511 - (usb_endpoint_xfer_isoc(d) || usb_endpoint_xfer_int(d))) 510 + if (udev->speed == USB_SPEED_HIGH && bcdUSB == 0x0220 && 511 + !le16_to_cpu(d->wMaxPacketSize) && usb_endpoint_is_isoc_in(d)) 512 512 usb_parse_eusb2_isoc_endpoint_companion(ddev, cfgno, inum, asnum, 513 513 endpoint, buffer, size); 514 514
+10 -4
drivers/usb/core/urb.c
··· 372 372 struct usb_host_endpoint *ep; 373 373 int is_out; 374 374 unsigned int allowed; 375 + bool is_eusb2_isoch_double; 375 376 376 377 if (!urb || !urb->complete) 377 378 return -EINVAL; ··· 435 434 return -ENODEV; 436 435 437 436 max = usb_endpoint_maxp(&ep->desc); 438 - if (max <= 0) { 437 + is_eusb2_isoch_double = usb_endpoint_is_hs_isoc_double(dev, ep); 438 + if (!max && !is_eusb2_isoch_double) { 439 439 dev_dbg(&dev->dev, 440 440 "bogus endpoint ep%d%s in %s (bad maxpacket %d)\n", 441 441 usb_endpoint_num(&ep->desc), is_out ? "out" : "in", ··· 469 467 max = le32_to_cpu(isoc_ep_comp->dwBytesPerInterval); 470 468 } 471 469 472 - /* "high bandwidth" mode, 1-3 packets/uframe? */ 473 - if (dev->speed == USB_SPEED_HIGH) 474 - max *= usb_endpoint_maxp_mult(&ep->desc); 470 + /* High speed, 1-3 packets/uframe, max 6 for eUSB2 double bw */ 471 + if (dev->speed == USB_SPEED_HIGH) { 472 + if (is_eusb2_isoch_double) 473 + max = le32_to_cpu(ep->eusb2_isoc_ep_comp.dwBytesPerInterval); 474 + else 475 + max *= usb_endpoint_maxp_mult(&ep->desc); 476 + } 475 477 476 478 if (urb->number_of_packets <= 0) 477 479 return -EINVAL;
+50
drivers/usb/core/usb.c
··· 1110 1110 } 1111 1111 EXPORT_SYMBOL_GPL(usb_free_noncoherent); 1112 1112 1113 + /** 1114 + * usb_endpoint_max_periodic_payload - Get maximum payload bytes per service 1115 + * interval 1116 + * @udev: The USB device 1117 + * @ep: The endpoint 1118 + * 1119 + * Returns: the maximum number of bytes isochronous or interrupt endpoint @ep 1120 + * can transfer during a service interval, or 0 for other endpoints. 1121 + */ 1122 + u32 usb_endpoint_max_periodic_payload(struct usb_device *udev, 1123 + const struct usb_host_endpoint *ep) 1124 + { 1125 + if (!usb_endpoint_xfer_isoc(&ep->desc) && 1126 + !usb_endpoint_xfer_int(&ep->desc)) 1127 + return 0; 1128 + 1129 + switch (udev->speed) { 1130 + case USB_SPEED_SUPER_PLUS: 1131 + if (USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) 1132 + return le32_to_cpu(ep->ssp_isoc_ep_comp.dwBytesPerInterval); 1133 + fallthrough; 1134 + case USB_SPEED_SUPER: 1135 + return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); 1136 + default: 1137 + if (usb_endpoint_is_hs_isoc_double(udev, ep)) 1138 + return le32_to_cpu(ep->eusb2_isoc_ep_comp.dwBytesPerInterval); 1139 + return usb_endpoint_maxp(&ep->desc) * usb_endpoint_maxp_mult(&ep->desc); 1140 + } 1141 + } 1142 + EXPORT_SYMBOL_GPL(usb_endpoint_max_periodic_payload); 1143 + 1144 + /** 1145 + * usb_endpoint_is_hs_isoc_double - Tell whether an endpoint uses USB 2 1146 + * Isochronous Double IN Bandwidth 1147 + * @udev: The USB device 1148 + * @ep: The endpoint 1149 + * 1150 + * Returns: true if an endpoint @ep conforms to USB 2 Isochronous Double IN 1151 + * Bandwidth ECN, false otherwise. 1152 + */ 1153 + bool usb_endpoint_is_hs_isoc_double(struct usb_device *udev, 1154 + const struct usb_host_endpoint *ep) 1155 + { 1156 + return ep->eusb2_isoc_ep_comp.bDescriptorType && 1157 + le16_to_cpu(udev->descriptor.bcdUSB) == 0x220 && 1158 + usb_endpoint_is_isoc_in(&ep->desc) && 1159 + !le16_to_cpu(ep->desc.wMaxPacketSize); 1160 + } 1161 + EXPORT_SYMBOL_GPL(usb_endpoint_is_hs_isoc_double); 1162 + 1113 1163 /* 1114 1164 * Notifications of device and interface registration 1115 1165 */
+2
drivers/usb/host/xhci-caps.h
··· 89 89 #define HCC2_GSC(p) ((p) & (1 << 8)) 90 90 /* true: HC support Virtualization Based Trusted I/O Capability */ 91 91 #define HCC2_VTC(p) ((p) & (1 << 9)) 92 + /* true: HC support Double BW on a eUSB2 HS ISOC EP */ 93 + #define HCC2_EUSB2_DIC(p) ((p) & (1 << 11))
+41 -44
drivers/usb/host/xhci-mem.c
··· 1330 1330 return interval; 1331 1331 } 1332 1332 1333 - /* The "Mult" field in the endpoint context is only set for SuperSpeed isoc eps. 1333 + /* 1334 + * xHCs without LEC use the "Mult" field in the endpoint context for SuperSpeed 1335 + * isoc eps, and High speed isoc eps that support bandwidth doubling. Standard 1334 1336 * High speed endpoint descriptors can define "the number of additional 1335 1337 * transaction opportunities per microframe", but that goes in the Max Burst 1336 1338 * endpoint context field. 1337 1339 */ 1338 - static u32 xhci_get_endpoint_mult(struct usb_device *udev, 1339 - struct usb_host_endpoint *ep) 1340 + static u32 xhci_get_endpoint_mult(struct xhci_hcd *xhci, 1341 + struct usb_device *udev, 1342 + struct usb_host_endpoint *ep) 1340 1343 { 1341 - if (udev->speed < USB_SPEED_SUPER || 1342 - !usb_endpoint_xfer_isoc(&ep->desc)) 1343 - return 0; 1344 - return ep->ss_ep_comp.bmAttributes; 1344 + bool lec; 1345 + 1346 + /* xHCI 1.1 with LEC set does not use mult field, except intel eUSB2 */ 1347 + lec = xhci->hci_version > 0x100 && HCC2_LEC(xhci->hcc_params2); 1348 + 1349 + /* eUSB2 double isoc bw devices are the only USB2 devices using mult */ 1350 + if (usb_endpoint_is_hs_isoc_double(udev, ep) && 1351 + (!lec || xhci->quirks & XHCI_INTEL_HOST)) 1352 + return 1; 1353 + 1354 + /* SuperSpeed isoc transfers on hosts without LEC uses mult field */ 1355 + if (udev->speed >= USB_SPEED_SUPER && 1356 + usb_endpoint_xfer_isoc(&ep->desc) && !lec) 1357 + return ep->ss_ep_comp.bmAttributes; 1358 + 1359 + return 0; 1345 1360 } 1346 1361 1347 1362 static u32 xhci_get_endpoint_max_burst(struct usb_device *udev, ··· 1368 1353 1369 1354 if (udev->speed == USB_SPEED_HIGH && 1370 1355 (usb_endpoint_xfer_isoc(&ep->desc) || 1371 - usb_endpoint_xfer_int(&ep->desc))) 1356 + usb_endpoint_xfer_int(&ep->desc))) { 1357 + /* 1358 + * USB 2 Isochronous Double IN Bandwidth ECN uses fixed burst 1359 + * size and max packets bits 12:11 are invalid. 1360 + */ 1361 + if (usb_endpoint_is_hs_isoc_double(udev, ep)) 1362 + return 2; 1363 + 1372 1364 return usb_endpoint_maxp_mult(&ep->desc) - 1; 1365 + } 1373 1366 1374 1367 return 0; 1375 1368 } ··· 1399 1376 return in ? INT_IN_EP : INT_OUT_EP; 1400 1377 } 1401 1378 return 0; 1402 - } 1403 - 1404 - /* Return the maximum endpoint service interval time (ESIT) payload. 1405 - * Basically, this is the maxpacket size, multiplied by the burst size 1406 - * and mult size. 1407 - */ 1408 - static u32 xhci_get_max_esit_payload(struct usb_device *udev, 1409 - struct usb_host_endpoint *ep) 1410 - { 1411 - int max_burst; 1412 - int max_packet; 1413 - 1414 - /* Only applies for interrupt or isochronous endpoints */ 1415 - if (usb_endpoint_xfer_control(&ep->desc) || 1416 - usb_endpoint_xfer_bulk(&ep->desc)) 1417 - return 0; 1418 - 1419 - /* SuperSpeedPlus Isoc ep sending over 48k per esit */ 1420 - if ((udev->speed >= USB_SPEED_SUPER_PLUS) && 1421 - USB_SS_SSP_ISOC_COMP(ep->ss_ep_comp.bmAttributes)) 1422 - return le32_to_cpu(ep->ssp_isoc_ep_comp.dwBytesPerInterval); 1423 - 1424 - /* SuperSpeed or SuperSpeedPlus Isoc ep with less than 48k per esit */ 1425 - if (udev->speed >= USB_SPEED_SUPER) 1426 - return le16_to_cpu(ep->ss_ep_comp.wBytesPerInterval); 1427 - 1428 - max_packet = usb_endpoint_maxp(&ep->desc); 1429 - max_burst = usb_endpoint_maxp_mult(&ep->desc); 1430 - /* A 0 in max burst means 1 transfer per ESIT */ 1431 - return max_packet * max_burst; 1432 1379 } 1433 1380 1434 1381 /* Set up an endpoint with one ring segment. Do not allocate stream rings. ··· 1432 1439 1433 1440 ring_type = usb_endpoint_type(&ep->desc); 1434 1441 1442 + /* Ensure host supports double isoc bandwidth for eUSB2 devices */ 1443 + if (usb_endpoint_is_hs_isoc_double(udev, ep) && 1444 + !HCC2_EUSB2_DIC(xhci->hcc_params2)) { 1445 + dev_dbg(&udev->dev, "Double Isoc Bandwidth not supported by xhci\n"); 1446 + return -EINVAL; 1447 + } 1448 + 1435 1449 /* 1436 1450 * Get values to fill the endpoint context, mostly from ep descriptor. 1437 1451 * The average TRB buffer lengt for bulk endpoints is unclear as we 1438 1452 * have no clue on scatter gather list entry size. For Isoc and Int, 1439 1453 * set it to max available. See xHCI 1.1 spec 4.14.1.1 for details. 1440 1454 */ 1441 - max_esit_payload = xhci_get_max_esit_payload(udev, ep); 1455 + max_esit_payload = usb_endpoint_max_periodic_payload(udev, ep); 1442 1456 interval = xhci_get_endpoint_interval(udev, ep); 1443 1457 1444 1458 /* Periodic endpoint bInterval limit quirk */ ··· 1462 1462 } 1463 1463 } 1464 1464 1465 - mult = xhci_get_endpoint_mult(udev, ep); 1466 - max_packet = usb_endpoint_maxp(&ep->desc); 1465 + mult = xhci_get_endpoint_mult(xhci, udev, ep); 1466 + max_packet = xhci_usb_endpoint_maxp(udev, ep); 1467 1467 max_burst = xhci_get_endpoint_max_burst(udev, ep); 1468 1468 avg_trb_len = max_esit_payload; 1469 1469 ··· 1484 1484 /* xHCI 1.0 and 1.1 indicates that ctrl ep avg TRB Length should be 8 */ 1485 1485 if (usb_endpoint_xfer_control(&ep->desc) && xhci->hci_version >= 0x100) 1486 1486 avg_trb_len = 8; 1487 - /* xhci 1.1 with LEC support doesn't use mult field, use RsvdZ */ 1488 - if ((xhci->hci_version > 0x100) && HCC2_LEC(xhci->hcc_params2)) 1489 - mult = 0; 1490 1487 1491 1488 /* Set up the endpoint ring */ 1492 1489 virt_dev->eps[ep_index].new_ring =
+3 -3
drivers/usb/host/xhci-ring.c
··· 3550 3550 if ((xhci->quirks & XHCI_MTK_HOST) && (xhci->hci_version < 0x100)) 3551 3551 trb_buff_len = 0; 3552 3552 3553 - maxp = usb_endpoint_maxp(&urb->ep->desc); 3553 + maxp = xhci_usb_endpoint_maxp(urb->dev, urb->ep); 3554 3554 total_packet_count = DIV_ROUND_UP(td_total_len, maxp); 3555 3555 3556 3556 /* Queueing functions don't count the current TRB into transferred */ ··· 3567 3567 u32 new_buff_len; 3568 3568 size_t len; 3569 3569 3570 - max_pkt = usb_endpoint_maxp(&urb->ep->desc); 3570 + max_pkt = xhci_usb_endpoint_maxp(urb->dev, urb->ep); 3571 3571 unalign = (enqd_len + *trb_buff_len) % max_pkt; 3572 3572 3573 3573 /* we got lucky, last normal TRB data on segment is packet aligned */ ··· 4138 4138 addr = start_addr + urb->iso_frame_desc[i].offset; 4139 4139 td_len = urb->iso_frame_desc[i].length; 4140 4140 td_remain_len = td_len; 4141 - max_pkt = usb_endpoint_maxp(&urb->ep->desc); 4141 + max_pkt = xhci_usb_endpoint_maxp(urb->dev, urb->ep); 4142 4142 total_pkt_count = DIV_ROUND_UP(td_len, max_pkt); 4143 4143 4144 4144 /* A zero-length transfer still involves at least one packet. */
+15 -1
drivers/usb/host/xhci.c
··· 1336 1336 struct scatterlist *tail_sg; 1337 1337 1338 1338 tail_sg = urb->sg; 1339 - max_pkt = usb_endpoint_maxp(&urb->ep->desc); 1339 + max_pkt = xhci_usb_endpoint_maxp(urb->dev, urb->ep); 1340 1340 1341 1341 if (!urb->num_sgs) 1342 1342 return ret; ··· 2923 2923 return ret; 2924 2924 } 2925 2925 EXPORT_SYMBOL_GPL(xhci_stop_endpoint_sync); 2926 + 2927 + /* 2928 + * xhci_usb_endpoint_maxp - get endpoint max packet size 2929 + * @host_ep: USB host endpoint to be checked 2930 + * 2931 + * Returns max packet from the correct descriptor 2932 + */ 2933 + int xhci_usb_endpoint_maxp(struct usb_device *udev, 2934 + struct usb_host_endpoint *host_ep) 2935 + { 2936 + if (usb_endpoint_is_hs_isoc_double(udev, host_ep)) 2937 + return le16_to_cpu(host_ep->eusb2_isoc_ep_comp.wMaxPacketSize); 2938 + return usb_endpoint_maxp(&host_ep->desc); 2939 + } 2926 2940 2927 2941 /* Issue a configure endpoint command or evaluate context command 2928 2942 * and wait for it to finish.
+2
drivers/usb/host/xhci.h
··· 1958 1958 struct xhci_interrupter *ir, 1959 1959 bool clear_ehb); 1960 1960 void xhci_add_interrupter(struct xhci_hcd *xhci, unsigned int intr_num); 1961 + int xhci_usb_endpoint_maxp(struct usb_device *udev, 1962 + struct usb_host_endpoint *host_ep); 1961 1963 1962 1964 /* xHCI roothub code */ 1963 1965 void xhci_set_link_state(struct xhci_hcd *xhci, struct xhci_port *port,
+6
include/linux/usb.h
··· 2039 2039 return usb_endpoint_maxp(&ep->desc); 2040 2040 } 2041 2041 2042 + u32 usb_endpoint_max_periodic_payload(struct usb_device *udev, 2043 + const struct usb_host_endpoint *ep); 2044 + 2045 + bool usb_endpoint_is_hs_isoc_double(struct usb_device *udev, 2046 + const struct usb_host_endpoint *ep); 2047 + 2042 2048 /* translate USB error codes to codes user space understands */ 2043 2049 static inline int usb_translate_errors(int error_code) 2044 2050 {