diff options
author | John Youn <johnyoun@synopsys.com> | 2016-11-15 12:54:15 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:42 +0200 |
commit | d9fa4c63f7662c2e0aa8096250072f244f7737f2 (patch) | |
tree | 93a3fbc7aedf66d5a6379d8de98bd7ce8aad9bad /drivers/usb/dwc3/core.c | |
parent | a0fe0415e0b2a1d87b54db1a0451e05f59675f0c (diff) | |
download | linux-d9fa4c63f7662c2e0aa8096250072f244f7737f2.tar.gz linux-d9fa4c63f7662c2e0aa8096250072f244f7737f2.tar.bz2 linux-d9fa4c63f7662c2e0aa8096250072f244f7737f2.zip |
usb: dwc3: core: add a event buffer cache
This extra buffer will be used so we can copy
triggered events from our event buffer to this cache
and process all of them later in bottom half
handler.
We need this in order to implement a workaround for
a known erratum in recent DWC3 release.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/core.c')
-rw-r--r-- | drivers/usb/dwc3/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index d024d47c86d1..87d0cfb7b29e 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -224,6 +224,10 @@ static struct dwc3_event_buffer *dwc3_alloc_one_event_buffer(struct dwc3 *dwc, evt->dwc = dwc; evt->length = length; + evt->cache = devm_kzalloc(dwc->dev, length, GFP_KERNEL); + if (!evt->cache) + return ERR_PTR(-ENOMEM); + evt->buf = dma_alloc_coherent(dwc->dev, length, &evt->dma, GFP_KERNEL); if (!evt->buf) |