From e422044e672c3f65c1981bcd7f4a3f0b1a6d0fb3 Mon Sep 17 00:00:00 2001 From: haotienh Date: Wed, 9 Apr 2025 02:49:58 +0000 Subject: [PATCH] NVIDIA: SAUCE: usb: gadget: xudc: Avoid skipping clear feature We skip ClearFeature(ENDPOINT_HALT) for endpoints which are not halted in previous codes. That will cause sequence number mismatching. According to 9.4.5 in USB3.2 Revision 1.1 specification, we should always reinitialize data sequence and set stream state machine to disabled. http://nvbugs/5104500 Signed-off-by: haotienh Reviewed-by: Henry Lin Reviewed-by: EJ Hsu Reviewed-by: WK Tsai Reviewed-by: Wayne Chang Signed-off-by: Vishwaroop A Acked-by: Noah Wager Acked-by: Jacob Martin Signed-off-by: Noah Wager --- drivers/usb/gadget/udc/tegra-xudc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index cd1d8b4672d1..89b5bcdf507d 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -2,7 +2,7 @@ /* * NVIDIA Tegra XUSB device mode controller * - * SPDX-FileCopyrightText: Copyright (c) 2013-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + * SPDX-FileCopyrightText: Copyright (c) 2013-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * Copyright (c) 2015, Google Inc. */ @@ -1568,12 +1568,6 @@ static int __tegra_xudc_ep_set_halt(struct tegra_xudc_ep *ep, bool halt) return 0; } - if (!!(xudc_readl(xudc, EP_HALT) & BIT(ep->index)) == halt) { - dev_dbg(xudc->dev, "EP %u already %s\n", ep->index, - halt ? "halted" : "not halted"); - return 0; - } - if (halt) { ep_halt(xudc, ep->index); } else {