mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
commit 59820fde001500c167342257650541280c622b73 upstream.
We identified a bug where the ST_RC bit in the status register was not
being acknowledged after clearing the CTRL_RUN bit in the control
register. This could lead to unexpected behavior in the USB gadget
drivers.
This patch resolves the issue by adding the necessary code to explicitly
acknowledge ST_RC after clearing CTRL_RUN based on the programming
sequence, ensuring proper state transition.
Fixes: 49db427232 ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
Cc: stable <stable@kernel.org>
Signed-off-by: Wayne Chang <waynec@nvidia.com>
Link: https://lore.kernel.org/r/20250418081228.1194779-1-waynec@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee51a5d322
commit
6fe2677bcf
@@ -1743,6 +1743,10 @@ static int __tegra_xudc_ep_disable(struct tegra_xudc_ep *ep)
|
||||
val = xudc_readl(xudc, CTRL);
|
||||
val &= ~CTRL_RUN;
|
||||
xudc_writel(xudc, val, CTRL);
|
||||
|
||||
val = xudc_readl(xudc, ST);
|
||||
if (val & ST_RC)
|
||||
xudc_writel(xudc, ST_RC, ST);
|
||||
}
|
||||
|
||||
dev_info(xudc->dev, "ep %u disabled\n", ep->index);
|
||||
|
||||
Reference in New Issue
Block a user