From: Marek Vasut <marex@denx.de>
To: Hector Martin <marcan@marcan.st>, Bin Meng <bmeng.cn@gmail.com>
Cc: Mark Kettenis <kettenis@openbsd.org>, Neal Gompa <neal@gompa.dev>,
u-boot@lists.denx.de, asahi@lists.linux.dev
Subject: Re: [PATCH] usb: Ignore endpoints in non-zero altsettings
Date: Sun, 29 Oct 2023 18:34:05 +0100 [thread overview]
Message-ID: <5d791e0a-bcd3-44f9-bf39-a47390ec012e@denx.de> (raw)
In-Reply-To: <c3f6d8de-dff7-f0e1-4c87-9eb56e0c6eb8@marcan.st>
On 10/29/23 16:50, Hector Martin wrote:
> On 29/10/2023 21.04, Marek Vasut wrote:
>> On 10/29/23 08:24, Hector Martin wrote:
>>> We currently do not really handle altsettings properly, and no driver
>>> uses them. Ignore the respective endpoint descriptors for secondary
>>> altsettings, to avoid creating duplicate endpoint records in the
>>> interface.
>>>
>>> This will have to be revisited if/when we have a driver that needs
>>> altsettings to work properly.
>>>
>>> Signed-off-by: Hector Martin <marcan@marcan.st>
>>> ---
>>> common/usb.c | 9 +++++++++
>>> 1 file changed, 9 insertions(+)
>>>
>>> diff --git a/common/usb.c b/common/usb.c
>>> index aad13fd9c557..90f72fda00bc 100644
>>> --- a/common/usb.c
>>> +++ b/common/usb.c
>>> @@ -463,6 +463,15 @@ static int usb_parse_config(struct usb_device *dev,
>>> puts("Endpoint descriptor out of order!\n");
>>> break;
>>> }
>>> + if (if_desc->num_altsetting > 1) {
>>> + /*
>>> + * Ignore altsettings, which can trigger duplicate
>>> + * endpoint errors below. Revisit this when some
>>> + * driver actually needs altsettings with differing
>>> + * endpoint setups.
>>> + */
>>
>> How do you trigger this error ?
>>
>
> Plug in a device with altsettings, like most sound cards or UVC devices.
Please add that to the commit message.
next prev parent reply other threads:[~2023-10-29 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-29 7:24 [PATCH] usb: Ignore endpoints in non-zero altsettings Hector Martin
2023-10-29 12:04 ` Marek Vasut
2023-10-29 15:50 ` Hector Martin
2023-10-29 17:34 ` Marek Vasut [this message]
2023-10-29 14:37 ` Neal Gompa
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=5d791e0a-bcd3-44f9-bf39-a47390ec012e@denx.de \
--to=marex@denx.de \
--cc=asahi@lists.linux.dev \
--cc=bmeng.cn@gmail.com \
--cc=kettenis@openbsd.org \
--cc=marcan@marcan.st \
--cc=neal@gompa.dev \
--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).