usb: dwc3: gadget: Clear DEP flags after stop transfers in ep disable
authorWesley Cheng <wcheng@codeaurora.org>
Wed, 24 Mar 2021 18:31:04 +0000 (11:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Mar 2021 13:50:00 +0000 (14:50 +0100)
commit5aef629704ad4d983ecf5c8a25840f16e45b6d59
treeaf564d2650f796df7ca55610bbfa370efefe408b
parent1cc5ed25bdade86de2650a82b2730108a76de20c
usb: dwc3: gadget: Clear DEP flags after stop transfers in ep disable

Ensure that dep->flags are cleared until after stop active transfers
is completed.  Otherwise, the ENDXFER command will not be executed
during ep disable.

Fixes: f09ddcfcb8c5 ("usb: dwc3: gadget: Prevent EP queuing while stopping transfers")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Wesley Cheng <wcheng@codeaurora.org>
Link: https://lore.kernel.org/r/1616610664-16495-1-git-send-email-wcheng@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c