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: f09ddcfc ("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>
2 jobs for pureos/byzantium in 64 minutes and 39 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #339201
librem5
build:aarch64

00:34:19

passed #339202
librem5:arm64
build:deb

01:04:37