Commit 4d586bb7 authored by Mathias Nyman's avatar Mathias Nyman Committed by Wen Zhiwei
Browse files

xhci: Turn NEC specific quirk for handling Stop Endpoint errors generic

stable inclusion
from stable-v6.6.70
commit 6cd8e621a689b0b3f25b384702c2574f06ad1edb
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBOHV1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6cd8e621a689b0b3f25b384702c2574f06ad1edb



--------------------------------

[ Upstream commit e21ebe51af688eb98fd6269240212a3c7300deea ]

xHC hosts from several vendors have the same issue where endpoints start
so slowly that a later queued 'Stop Endpoint' command may complete before
endpoint is up and running.

The 'Stop Endpoint' command fails with context state error as the endpoint
still appears as  stopped.

See commit 42b758137601 ("usb: xhci: Limit Stop Endpoint retries") for
details

CC: stable@vger.kernel.org
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20241217102122.2316814-2-mathias.nyman@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent e1508c35
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1203,8 +1203,6 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
			 * Keep retrying until the EP starts and stops again, on
			 * chips where this is known to help. Wait for 100ms.
			 */
			if (!(xhci->quirks & XHCI_NEC_HOST))
				break;
			if (time_is_before_jiffies(ep->stop_time + msecs_to_jiffies(100)))
				break;
			fallthrough;