From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Michal Pecio <michal.pecio@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] usb: xhci: Don't change the status of stalled TDs on failed Stop EP
Date: Mon, 10 Mar 2025 15:54:14 +0200 [thread overview]
Message-ID: <2e3372fb-5eed-4259-841e-4af5ceeebf76@linux.intel.com> (raw)
In-Reply-To: <20250310094037.52625e24@foxbook>
On 10.3.2025 10.40, Michal Pecio wrote:
> When the device stalls an endpoint, current TD is assigned -EPIPE
> status and Reset Endpoint is queued. If a Stop Endpoint is pending
> at the time, it will run before Reset Endpoint and fail due to the
> stall. Its handler will change TD's status to -EPROTO before Reset
> Endpoint handler runs and initiates giveback.
>
> Check if the stall has already been handled and don't try to do it
> again. Since xhci_handle_halted_endpoint() performs this check too,
> not overwriting td->status is the only difference.
>
> I haven't seen this case yet, but I have seen a related one where
> the xHC has already executed Reset Endpoint, EP Context state is
> now Stopped and EP_HALTED is set. If the xHC took a bit longer to
> execute Reset Endpoint, said case would become this one.
>
> Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
Makes sense, nice improvement
Thanks
Mathias
next prev parent reply other threads:[~2025-03-10 13:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 8:36 [PATCH 0/6] xHCI: endpoint state maintainability and small fixes Michal Pecio
2025-03-10 8:36 ` [PATCH 1/6] usb: xhci: Document endpoint state management Michal Pecio
2025-03-10 9:25 ` Mathias Nyman
2025-03-10 8:37 ` [PATCH 2/6] usb: xhci: Deduplicate some endpoint state flag lists Michal Pecio
2025-03-10 9:51 ` Mathias Nyman
2025-03-11 0:13 ` Michał Pecio
2025-03-10 8:38 ` [PATCH 3/6] usb: xhci: Only set EP_HARD_CLEAR_TOGGLE after queuing Reset Endpoint Michal Pecio
2025-03-10 8:39 ` usb: xhci: Don't change the status of stalled TDs on failed Stop EP Michal Pecio
2025-03-10 8:43 ` Michal Pecio
2025-03-10 8:40 ` [PATCH 4/6] " Michal Pecio
2025-03-10 13:54 ` Mathias Nyman [this message]
2025-03-10 8:41 ` [PATCH 5/6] usb: xhci: Avoid Stop Endpoint retry loop if the endpoint seems Running Michal Pecio
2025-03-10 8:42 ` [PATCH 6/6] usb: xhci: Update comments about Stop Endpoint races Michal Pecio
2025-03-11 15:41 ` [PATCH 0/6] xHCI: endpoint state maintainability and small fixes Mathias Nyman
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=2e3372fb-5eed-4259-841e-4af5ceeebf76@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=michal.pecio@gmail.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.