]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
authorWayne Chang <waynec@nvidia.com>
Fri, 18 Apr 2025 08:12:28 +0000 (16:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:24:08 +0000 (08:24 +0200)
commit0b32d03e79c1f02b32cde41a9838a6e21d2e8e60
treef9c1ab1ad2240d0ca1c2d701e6422a52e4da1796
parentdffa51cf2d3f5bcbc5cf4471b9f4dfbf2ef3c810
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: 49db427232fe ("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>
drivers/usb/gadget/udc/tegra-xudc.c