From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: "Petr Benes" <petr.benes@ysoft.com>,
"Mattijs Korpershoek" <mkorpershoek@kernel.org>,
"Michal Vokáč" <michal.vokac@ysoft.com>,
"Marek Vasut" <marex@denx.de>, "Tom Rini" <trini@konsulko.com>
Cc: Lukasz Majewski <lukma@denx.de>, u-boot@lists.denx.de
Subject: Re: [PATCH 1/2] usb: ci_udc: Check ci_ep->desc before use
Date: Mon, 01 Dec 2025 10:15:15 +0100 [thread overview]
Message-ID: <87ms42sgv0.fsf@kernel.org> (raw)
In-Reply-To: <45eb3702-466e-4e22-b27d-6710ac765dcb@ysoft.com>
On Mon, Dec 01, 2025 at 09:20, Petr Benes <petr.benes@ysoft.com> wrote:
>>>
>>> Which are held in (struct ci_drv).ep[] and the problematic code is
>>> ci_udc specific.
>>
>> Ok.
>>
>> I have compared the changes with the linux driver
>> (drivers/usb/chipidea/udc.c) and see a couple of differences in error
>> handling
>>
>> For example, in linux, in ep_disable(), we return -EBUSY instead of 0.
>>
>> 0 seems to tell the caller that we sucesfully disabled an ep but we did
>> not do anything since it was already disabled.
>
> Fair.>
>> Can we do the same error handling as in the linux driver ?
>
> Sure. -EBUSY seems to used mainly by *_register_driver(), I'll test it
> and return with the updated patch.>
Thank you. Please also make sure to look at ep_enable() in linux as a
similar pattern is found in this U-Boot patch.
(we return 0 instead of a negative error code)
>>>
>>>>
>>>>>
>>>>> Moreover, the patch gets rid of possible outstanding requests if the
>>>>> endpoint's state changes to disabled.
>>>>>
>>>>> Signed-off-by: Petr Beneš <petr.benes@ysoft.com>
>>>>> Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
>>>>> ---
prev parent reply other threads:[~2025-12-01 9:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 8:58 [PATCH 1/2] usb: ci_udc: Check ci_ep->desc before use Michal Vokáč
2025-11-25 8:58 ` [PATCH 2/2] usb: ci_udc: cosmetics: EP and requests debug info Michal Vokáč
2025-11-27 10:16 ` Mattijs Korpershoek
2025-11-25 12:26 ` [PATCH 1/2] usb: ci_udc: Check ci_ep->desc before use Marek Vasut
2025-11-25 13:13 ` Petr Benes
2025-11-27 10:12 ` Mattijs Korpershoek
2025-11-27 13:44 ` Petr Benes
2025-11-28 8:42 ` Mattijs Korpershoek
2025-12-01 8:20 ` Petr Benes
2025-12-01 9:15 ` Mattijs Korpershoek [this message]
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=87ms42sgv0.fsf@kernel.org \
--to=mkorpershoek@kernel.org \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=michal.vokac@ysoft.com \
--cc=petr.benes@ysoft.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.