|
@@ -2976,9 +2976,13 @@ static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
|
|
if (ints & DXEPINT_STSPHSERCVD) {
|
|
if (ints & DXEPINT_STSPHSERCVD) {
|
|
dev_dbg(hsotg->dev, "%s: StsPhseRcvd\n", __func__);
|
|
dev_dbg(hsotg->dev, "%s: StsPhseRcvd\n", __func__);
|
|
|
|
|
|
- /* Move to STATUS IN for DDMA */
|
|
|
|
- if (using_desc_dma(hsotg))
|
|
|
|
- dwc2_hsotg_ep0_zlp(hsotg, true);
|
|
|
|
|
|
+ /* Safety check EP0 state when STSPHSERCVD asserted */
|
|
|
|
+ if (hsotg->ep0_state == DWC2_EP0_DATA_OUT) {
|
|
|
|
+ /* Move to STATUS IN for DDMA */
|
|
|
|
+ if (using_desc_dma(hsotg))
|
|
|
|
+ dwc2_hsotg_ep0_zlp(hsotg, true);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
if (ints & DXEPINT_BACK2BACKSETUP)
|
|
if (ints & DXEPINT_BACK2BACKSETUP)
|