All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Carlo Caione" <ccaione@baylibre.com>
To: "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 v3] usb: mtu3: wait for TX FIFO to drain before disconnect
Date: Sat, 01 Aug 2026 08:42:49 +0200	[thread overview]
Message-ID: <DKDEITT18XJS.18WZM0Q9PGROO@baylibre.com> (raw)
In-Reply-To: <20260720-ccaione-upstream-mtu3-tx-fifo-drain-v3-1-45c0e072b64a@baylibre.com>

On Mon Jul 20, 2026 at 10:03 AM CEST, Carlo Caione wrote:
> Fastboot unregisters the USB gadget from the completion callback of
> its final OKAY response. MTU3 QMU can report that request complete
> while bytes remain in the endpoint TX FIFO. Disabling the USB function
> immediately can therefore disconnect the host before it receives the
> response.
>
> Before selecting the high-speed or SuperSpeed disconnect operation, poll
> the FIFO state of enabled IN endpoints that have no pending requests.
> Bound the wait to 1 ms. If a FIFO does not drain, reset its endpoint,
> force the disconnect, and propagate -ETIMEDOUT through the gadget pullup
> operation. Endpoints with pending requests are skipped so an ordinary
> disconnect does not wait for an active transfer.

[...]

Hi Marek,
can you PTAL? Thanks,

--
Carlo Caione

  reply	other threads:[~2026-08-01  6:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  8:03 [PATCH v3] usb: mtu3: wait for TX FIFO to drain before disconnect Carlo Caione
2026-08-01  6:42 ` Carlo Caione [this message]
2026-08-01  9:52   ` Marek Vasut via U-Boot
2026-08-02  6:57     ` Carlo Caione
2026-08-02 15:06       ` David Lechner
2026-08-02 17:34         ` Marek Vasut via U-Boot
2026-08-03 12:59           ` David Lechner
2026-08-03 17:05             ` Marek Vasut via U-Boot
2026-08-03 21:04               ` David Lechner
2026-08-04  0:51                 ` Marek Vasut via U-Boot
2026-08-02 17:30       ` Marek Vasut via U-Boot
2026-08-01 14:28 ` Marek Vasut via U-Boot

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=DKDEITT18XJS.18WZM0Q9PGROO@baylibre.com \
    --to=ccaione@baylibre.com \
    --cc=GSS_MTK_Uboot_upstream@mediatek.com \
    --cc=bmeng.cn@gmail.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=dlechner@baylibre.com \
    --cc=igor.belwon@mentallysanemainliners.org \
    --cc=jstephan@baylibre.com \
    --cc=lukma@denx.de \
    --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.