From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-usb@vger.kernel.org
Cc: linux-media@vger.kernel.org, gregkh@linuxfoundation.org,
laurent.pinchart@ideasonboard.com, hdegoede@redhat.com,
Thinh.Nguyen@synopsys.com,
"Amardeep Rai" <amardeep.rai@intel.com>,
"Kannappan R" <r.kannappan@intel.com>,
"Mathias Nyman" <mathias.nyman@linux.intel.com>,
"Alan Stern" <stern@rowland.harvard.edu>,
"Michał Pecio" <michal.pecio@gmail.com>
Subject: [PATCH v5 0/9] eUSB2 Double Isochronous IN Bandwidth support
Date: Wed, 20 Aug 2025 17:38:15 +0300 [thread overview]
Message-ID: <20250820143824.551777-1-sakari.ailus@linux.intel.com> (raw)
Hi all,
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.
v1 can be found here
<URL:https://lore.kernel.org/linux-usb/20250616093730.2569328-2-mathias.nyman@linux.intel.com/>.
v2 can be found here
<URL:https://lore.kernel.org/linux-usb/20250711083413.1552423-1-sakari.ailus@linux.intel.com/>.
v3 can be found here
<URL:https://lore.kernel.org/linux-usb/20250807055355.1257029-1-sakari.ailus@linux.intel.com/>.
v4 can be found here
<URL:https://lore.kernel.org/linux-usb/20250812132445.3185026-1-sakari.ailus@linux.intel.com/>.
since v4:
- 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:
- 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:
- 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:
- 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).
Rai, Amardeep (3):
usb: core: Add a function to get USB version independent periodic
payload
usb: xhci: Add host support for eUSB2 double isochronous bandwidth
devices
usb: core: support eUSB2 double bandwidth large isoc URB frames
Sakari Ailus (5):
usb: core: Use le16_to_cpu() to read __le16 value in
usb_parse_endpoint()
usb: core: Parse eUSB2 companion descriptors for high speed devices
only
usb: core: eUSB2 companion descriptor is for isoc IN endpoints only
usb: xhci: Use usb_endpoint_max_periodic_payload()
usb: core: Introduce usb_endpoint_is_hs_isoc_double()
Tao Q Tao (1):
media: uvcvideo: eUSB2 double isochronous bandwidth support
drivers/media/usb/uvc/uvc_driver.c | 4 +-
drivers/media/usb/uvc/uvc_video.c | 24 ++-------
drivers/media/usb/uvc/uvcvideo.h | 4 +-
drivers/usb/core/config.c | 4 +-
drivers/usb/core/urb.c | 14 +++--
drivers/usb/core/usb.c | 50 ++++++++++++++++++
drivers/usb/host/xhci-caps.h | 2 +
drivers/usb/host/xhci-mem.c | 85 ++++++++++++++----------------
drivers/usb/host/xhci-ring.c | 6 +--
drivers/usb/host/xhci.c | 16 +++++-
drivers/usb/host/xhci.h | 2 +
include/linux/usb.h | 6 +++
12 files changed, 137 insertions(+), 80 deletions(-)
--
2.47.2
next reply other threads:[~2025-08-20 14:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 14:38 Sakari Ailus [this message]
2025-08-20 14:38 ` [PATCH v5 1/9] usb: core: Use le16_to_cpu() to read __le16 value in usb_parse_endpoint() Sakari Ailus
2025-08-26 12:50 ` Mathias Nyman
2025-08-20 14:38 ` [PATCH v5 2/9] usb: core: Parse eUSB2 companion descriptors for high speed devices only Sakari Ailus
2025-08-26 12:50 ` Mathias Nyman
2025-08-20 14:38 ` [PATCH v5 3/9] usb: core: eUSB2 companion descriptor is for isoc IN endpoints only Sakari Ailus
2025-08-26 12:52 ` Mathias Nyman
2025-08-20 14:38 ` [PATCH v5 4/9] usb: core: Add a function to get USB version independent periodic payload Sakari Ailus
2025-08-20 14:38 ` [PATCH v5 5/9] usb: xhci: Use usb_endpoint_max_periodic_payload() Sakari Ailus
2025-08-21 8:22 ` Mathias Nyman
2025-08-20 14:38 ` [PATCH v5 6/9] usb: core: Introduce usb_endpoint_is_hs_isoc_double() Sakari Ailus
2025-08-26 12:53 ` Mathias Nyman
2025-08-20 14:38 ` [PATCH v5 7/9] usb: xhci: Add host support for eUSB2 double isochronous bandwidth devices Sakari Ailus
2025-08-20 14:38 ` [PATCH v5 8/9] usb: core: support eUSB2 double bandwidth large isoc URB frames Sakari Ailus
2025-08-20 14:38 ` [PATCH v5 9/9] media: uvcvideo: eUSB2 double isochronous bandwidth support Sakari Ailus
2025-08-20 15:21 ` Ricardo Ribalda
2025-08-21 9:51 ` Sakari Ailus
2025-08-26 13:28 ` [PATCH v5 0/9] eUSB2 Double Isochronous IN Bandwidth support Mathias Nyman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250820143824.551777-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=amardeep.rai@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=michal.pecio@gmail.com \
--cc=r.kannappan@intel.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).