projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
201ec56
)
usb: dwc2: Add safety check for STSPHSERCVD intr
author
Minas Harutyunyan
<
[email protected]
>
Tue, 16 Jan 2018 12:03:58 +0000
(16:03 +0400)
committer
Felipe Balbi
<
[email protected]
>
Mon, 12 Feb 2018 08:59:19 +0000
(10:59 +0200)
STSPHSERCVD (status phase received) interrupt should be
handled when EP0 is in DWC2_EP0_DATA_OUT state.
Sometimes STSPHSERCVD interrupt asserted , when EP0
is not in DATA_OUT state. Spurios interrupt.
Acked-by: John Youn <
[email protected]
>
Signed-off-by: Minas Harutyunyan <
[email protected]
>
Signed-off-by: Grigor Tovmasyan <
[email protected]
>
Signed-off-by: Felipe Balbi <
[email protected]
>
drivers/usb/dwc2/gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc2/gadget.c
b/drivers/usb/dwc2/gadget.c
index 57c7400057fa65ac2e3f7c589c666891344b5d5c..d6222e9464639f5f8634b135fd96415a2aa1975b 100644
(file)
--- a/
drivers/usb/dwc2/gadget.c
+++ b/
drivers/usb/dwc2/gadget.c
@@
-2976,9
+2976,13
@@
static void dwc2_hsotg_epint(struct dwc2_hsotg *hsotg, unsigned int idx,
if (ints & DXEPINT_STSPHSERCVD) {
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)