mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jhon Wilker Rodrigues Aquino <jhonwilker0112@gmail.com>
Cc: Bin Liu <b-liu@ti.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jhon Wilker Rodrigues Aquino <jhon.aquino@autotrac.com.br>
Subject: Re: [PATCH] usb: musb: host: clear stale TT buffers after aborted transfers
Date: Fri, 20 Nov 2026 15:05:59 +0100	[thread overview]
Message-ID: <2026112019-tripping-catnip-a738@gregkh> (raw)
In-Reply-To: <20261103190333.87207-1-jhonwilker0112@gmail.com>

On Tue, Nov 03, 2026 at 04:03:33PM -0300, Jhon Wilker Rodrigues Aquino wrote:
> From: Jhon Wilker Rodrigues Aquino <jhon.aquino@autotrac.com.br>
> 
> On AM335x with MUSB and a Microchip USB2514 hub, disconnecting a
> full-speed CDC ACM device during bulk traffic can leave its TT unable
> to enumerate full-speed devices. High-speed devices still work, and
> Reset_TT restores operation.
> 
> Queue Clear-TT-Buffer for failed or unlinked control and bulk URBs
> behind an external TT. Park the affected endpoint queue until the
> asynchronous clear completes, so new URBs cannot use a buffer being
> cleared. Keep the parked queue alive until the callback finishes,
> including during endpoint disable.
> 
> Signed-off-by: Jhon Wilker Rodrigues Aquino <jhonwilker0112@gmail.com>
> ---
>  drivers/usb/musb/musb_host.c | 166 +++++++++++++++++++++++++++++++----
>  drivers/usb/musb/musb_host.h |   2 +
>  2 files changed, 152 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> index 31b0612489911..6e8cf462676ec 100644
> --- a/drivers/usb/musb/musb_host.c
> +++ b/drivers/usb/musb/musb_host.c
> @@ -22,6 +22,11 @@
>  #include "musb_host.h"
>  #include "musb_trace.h"
>  
> +static bool tt_clear = true;
> +module_param(tt_clear, bool, 0644);
> +MODULE_PARM_DESC(tt_clear,
> +		 "Clear hub TT buffers after failed or unlinked control/bulk transfers (default Y; set N only for A/B comparison or if a hub mishandles CLEAR_TT_BUFFER; affects new requests only)");
> +

No, this isn't the 1990's, we should not add new module parameters as
they will not work well over time.

Do this automatically please, a user should never have to know how to
pick this.

thanks,

greg k-h

      reply	other threads:[~2026-11-20 14:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 19:03 Jhon Wilker Rodrigues Aquino
2026-11-20 14:05 ` Greg Kroah-Hartman [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=2026112019-tripping-catnip-a738@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=b-liu@ti.com \
    --cc=jhon.aquino@autotrac.com.br \
    --cc=jhonwilker0112@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®