summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/dwc3/core.c2
-rw-r--r--drivers/usb/dwc3/gadget.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 85cc96ac87..87b9c87edf 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -122,6 +122,8 @@ static struct dwc3_event_buffer *dwc3_alloc_one_event_buffer(struct dwc3 *dwc,
if (!evt->buf)
return ERR_PTR(-ENOMEM);
+ dwc3_flush_cache((uintptr_t)evt->buf, evt->length);
+
return evt;
}
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 8c53cc0b8a..e065c5aeb3 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2668,11 +2668,12 @@ void dwc3_gadget_uboot_handle_interrupt(struct dwc3 *dwc)
int i;
struct dwc3_event_buffer *evt;
+ dwc3_thread_interrupt(0, dwc);
+
+ /* Clean + Invalidate the buffers after touching them */
for (i = 0; i < dwc->num_event_buffers; i++) {
evt = dwc->ev_buffs[i];
dwc3_flush_cache((uintptr_t)evt->buf, evt->length);
}
-
- dwc3_thread_interrupt(0, dwc);
}
}