usb: dwc3: gadget: Submit endxfer command if delayed during disconnect
authorWesley Cheng <quic_wcheng@quicinc.com>
Thu, 1 Sep 2022 19:36:25 +0000 (12:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Sep 2022 14:26:45 +0000 (16:26 +0200)
commit8422b769fa46bd429dc0f324012629a4691f0dd9
treeb77f495e42bff9ad6594376df1a31cdfb912e5f5
parentb353eb6dc285a0775a447f53e5b2a50bf3f9684f
usb: dwc3: gadget: Submit endxfer command if delayed during disconnect

During a cable disconnect sequence, if ep0state is not in the SETUP phase,
then nothing will trigger any pending end transfer commands.  Force
stopping of any pending SETUP transaction, and move back to the SETUP
phase.

Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Link: https://lore.kernel.org/r/20220901193625.8727-6-quic_wcheng@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c