From: Carlo Caione via U-Boot <u-boot@lists.u-boot-project.org>
To: "Marek Vasut" <marek.vasut@mailbox.org>,
"Carlo Caione" <ccaione@baylibre.com>,
"GSS_MTK_Uboot_upstream" <GSS_MTK_Uboot_upstream@mediatek.com>,
"Bin Meng" <bmeng.cn@gmail.com>,
"Chunfeng Yun" <chunfeng.yun@mediatek.com>,
<u-boot@lists.denx.de>
Cc: "Ryder Lee" <ryder.lee@mediatek.com>,
"Weijie Gao" <weijie.gao@mediatek.com>,
"Igor Belwon" <igor.belwon@mentallysanemainliners.org>,
"David Lechner" <dlechner@baylibre.com>,
"Julien Stephan" <jstephan@baylibre.com>,
"Marek Vasut" <marex@denx.de>, "Tom Rini" <trini@konsulko.com>,
"Lukasz Majewski" <lukma@denx.de>,
"Mattijs Korpershoek" <mkorpershoek@kernel.org>,
"Vitor Sato Eschholz" <vsatoes@baylibre.com>
Subject: Re: [PATCH v2] usb: mtu3: wait for TX FIFO to drain before disconnect
Date: Tue, 21 Jul 2026 07:54:00 +0200 [thread overview]
Message-ID: <DK40LGRTA1WW.28B2WO5LFV69Z@baylibre.com> (raw)
In-Reply-To: <3acd7279-8baa-47b5-b384-425bde8a9d1f@mailbox.org>
On Mon Jul 20, 2026 at 2:20 PM CEST, Marek Vasut wrote:
> On 7/20/26 9:32 AM, Carlo Caione wrote:
>
> Hello Carlo,
>
>>>> @@ -261,8 +290,14 @@ void mtu3_ep_stall_set(struct mtu3_ep *mep, bool set)
>>>> set ? "SEND STALL" : "CLEAR STALL, with EP RESET");
>>>> }
>>>>
>>>> -void mtu3_dev_on_off(struct mtu3 *mtu, int is_on)
>>>> +int mtu3_dev_on_off(struct mtu3 *mtu, int is_on)
>>>> {
>>>> + int ret = 0;
>>>> +
>>>> + /* QMU completion may precede transmission from the TX FIFO. */
>>>> + if (!is_on)
>>>> + ret = mtu3_wait_for_tx_fifo_empty(mtu);
>>>
>>> Shouldn't this bail early on ret != 0 ?
>>
>> No, disconnect must still be forced after resetting a timed-out endpoint
>> (we still want to disconnect it, even forcefully)
> Can you please include a code comment that clarifies this ?
Done in V3 already: https://lore.kernel.org/all/20260720-ccaione-upstream-mtu3-tx-fifo-drain-v3-1-45c0e072b64a@baylibre.com/
thanks,
--
Carlo Caione
prev parent reply other threads:[~2026-07-21 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-18 10:37 [PATCH v2] usb: mtu3: wait for TX FIFO to drain before disconnect Carlo Caione
2026-07-18 20:17 ` Marek Vasut
2026-07-20 7:32 ` Carlo Caione
[not found] ` <3acd7279-8baa-47b5-b384-425bde8a9d1f@mailbox.org>
2026-07-21 5:54 ` Carlo Caione via U-Boot [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=DK40LGRTA1WW.28B2WO5LFV69Z@baylibre.com \
--to=u-boot@lists.u-boot-project.org \
--cc=GSS_MTK_Uboot_upstream@mediatek.com \
--cc=bmeng.cn@gmail.com \
--cc=ccaione@baylibre.com \
--cc=chunfeng.yun@mediatek.com \
--cc=dlechner@baylibre.com \
--cc=igor.belwon@mentallysanemainliners.org \
--cc=jstephan@baylibre.com \
--cc=lukma@denx.de \
--cc=marek.vasut@mailbox.org \
--cc=marex@denx.de \
--cc=mkorpershoek@kernel.org \
--cc=ryder.lee@mediatek.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vsatoes@baylibre.com \
--cc=weijie.gao@mediatek.com \
/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.