Re: [PATCH v5 2/9] usb: core: Parse eUSB2 companion descriptors for high speed devices only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20.8.2025 17.38, Sakari Ailus wrote:
Check that a device is a high-speed one before proceeding to parse the
eUSB2 isochronous endpoint companion descriptors.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
  drivers/usb/core/config.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index cda595b4014f..29fcbd6de482 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -507,7 +507,8 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno,
  	}
/* Parse a possible eUSB2 periodic endpoint companion descriptor */
-	if (bcdUSB == 0x0220 && !le16_to_cpu(d->wMaxPacketSize) &&
+	if (udev->speed == USB_SPEED_HIGH && bcdUSB == 0x0220 &&
+	    !le16_to_cpu(d->wMaxPacketSize) &&
  	    (usb_endpoint_xfer_isoc(d) || usb_endpoint_xfer_int(d)))
  		usb_parse_eusb2_isoc_endpoint_companion(ddev, cfgno, inum, asnum,
  							endpoint, buffer, size);

Acked-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux