Hej, On Sun, Feb 25, 2024, at 22:47, Marek Vasut wrote: > On 2/25/24 4:28 PM, Janne Grunau wrote: >> >> >> On Wed, Feb 21, 2024, at 13:39, Marek Vasut wrote: >>> On 2/21/24 08:25, Janne Grunau via B4 Relay wrote: >>>> From: Janne Grunau <j...@jannau.net> >>>> >>>> Apple USB keyboards carry the HID keyboard boot protocol on the second >>>> interface. Using the second interface in the USB keyboard driver does >>>> not work since the xhci has not allocated a transfer ring. >>> >>> So, what does this patch do ? That is not clear from the commit message. >> >> rewritten for v2: >> | usb: xhci: Set up endpoints for the first 2 interfaces >> | >> | The xhci driver currently only does the necessary initialization for >> | endpoints found in the first interface descriptor. Apple USB keyboards >> | (released 2021) use the second interface descriptor for the HID keyboard >> | boot protocol. To allow USB drivers to use endpoints from other >> | interface descriptors the xhci driver needs to ensure these endpoints >> | are initialized as well. >> | Use USB_MAX_ACTIVE_INTERFACES to control how many interface descriptors >> | are initialized and useable. Currently defined to 2 as that is enough to >> | make the Apple keyboard usable. > > Would it make sense to make this a tunable Kconfig option ?
I thought about that but I don't think it's worth it. We would have to default it to 2 (at least when the USB keyboard driver is enabled) since we can't predict which devices will be connected. Why would anyone chose a different value than the fixed value? I can't think of convincing reasons. Janne