asahi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Janne Grunau <j@jannau.net>, Bin Meng <bmeng.cn@gmail.com>,
	Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, asahi@lists.linux.dev
Subject: Re: [PATCH 2/6] usb: xhci: Set up endpoints for the first 2 interfaces
Date: Tue, 27 Feb 2024 13:02:31 +0100	[thread overview]
Message-ID: <71ab8e0f-eda5-42e1-b0f9-1bd958b68397@denx.de> (raw)
In-Reply-To: <0ec5ded2-f3f7-4e79-afbd-f6f560ab0627@app.fastmail.com>

On 2/27/24 8:38 AM, Janne Grunau wrote:
> 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.

All right

Reviewed-by: Marek Vasut <marex@denx.de>

  reply	other threads:[~2024-02-27 13:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  7:25 [PATCH 0/6] USB keyboard improvements for asahi / desktop systems Janne Grunau via B4 Relay
2024-02-21  7:25 ` [PATCH 1/6] usb: xhci: refactor xhci_set_configuration Janne Grunau via B4 Relay
2024-02-21 12:28   ` Marek Vasut
2024-02-21  7:25 ` [PATCH 2/6] usb: xhci: Set up endpoints for the first 2 interfaces Janne Grunau via B4 Relay
2024-02-21 12:39   ` Marek Vasut
2024-02-25 15:28     ` Janne Grunau
2024-02-25 21:47       ` Marek Vasut
2024-02-26 20:42         ` Mark Kettenis
2024-02-27  7:38         ` Janne Grunau
2024-02-27 12:02           ` Marek Vasut [this message]
2024-02-21  7:25 ` [PATCH 3/6] usb: xhci: Abort transfers with unallocated rings Janne Grunau via B4 Relay
2024-02-21 12:40   ` Marek Vasut
2024-02-25 15:30     ` Janne Grunau
2024-02-21  7:25 ` [PATCH 4/6] usb: kbd: Ignore Yubikeys Janne Grunau via B4 Relay
2024-02-21 12:41   ` Marek Vasut
2024-02-25 16:07     ` Janne Grunau
2024-02-25 21:57       ` Marek Vasut
2024-02-26 20:47         ` Mark Kettenis
2024-02-27  1:20           ` Marek Vasut
2024-02-27  7:13           ` Janne Grunau
2024-02-27 12:01             ` Marek Vasut
2024-02-21  7:25 ` [PATCH 5/6] usb: kbd: support Apple Magic Keyboards (2021) Janne Grunau via B4 Relay
2024-02-21  7:25 ` [PATCH 6/6] usb: kbd: Add probe quirk for Apple and Keychron keyboards Janne Grunau via B4 Relay
2024-02-21 12:44   ` Marek Vasut

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=71ab8e0f-eda5-42e1-b0f9-1bd958b68397@denx.de \
    --to=marex@denx.de \
    --cc=asahi@lists.linux.dev \
    --cc=bmeng.cn@gmail.com \
    --cc=j@jannau.net \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).