summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/core.h
diff options
context:
space:
mode:
authorMian Yousaf Kaukab <yousaf.kaukab@intel.com>2015-01-09 13:38:44 +0100
committerFelipe Balbi <balbi@ti.com>2015-01-12 15:32:44 -0600
commit3f95001db7998c350422708a437694dda07bc04e (patch)
treee8cabc0e6f5dfb919df5f761807cfc9eeaa0bcfe /drivers/usb/dwc2/core.h
parentb787d75503fb6f68aea5220ca23bb0c02d14ae74 (diff)
downloadop-kernel-dev-3f95001db7998c350422708a437694dda07bc04e.zip
op-kernel-dev-3f95001db7998c350422708a437694dda07bc04e.tar.gz
usb: dwc2: gadget: don't embed ep0 buffers
When using DMA, data of the previous setup packet can be read back from cache because ep0 and ctrl buffers are embedded in struct s3c_hsotg. Allocate buffers instead of embedding them. Tested-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@intel.com> Reviewed-by: Robert Baldyga <r.baldyga@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r--drivers/usb/dwc2/core.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
index 0d2ee29..7db83d0 100644
--- a/drivers/usb/dwc2/core.h
+++ b/drivers/usb/dwc2/core.h
@@ -434,6 +434,9 @@ struct dwc2_hw_params {
u32 snpsid;
};
+/* Size of control and EP0 buffers */
+#define DWC2_CTRL_BUFF_SIZE 8
+
/**
* struct dwc2_hsotg - Holds the state of the driver, including the non-periodic
* and periodic schedules
@@ -684,8 +687,8 @@ struct dwc2_hsotg {
struct usb_request *ep0_reply;
struct usb_request *ctrl_req;
- u8 ep0_buff[8];
- u8 ctrl_buff[8];
+ void *ep0_buff;
+ void *ctrl_buff;
struct usb_gadget gadget;
unsigned int enabled:1;
OpenPOWER on IntegriCloud