]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: dwc3: ep0: correct cache sync issue in case of ep0_bounced
authorPratyush Anand <pratyush.anand@st.com>
Fri, 10 Aug 2012 08:12:16 +0000 (13:42 +0530)
committerFelipe Balbi <balbi@ti.com>
Thu, 6 Sep 2012 16:52:24 +0000 (19:52 +0300)
commit0416e494ce7dc84e2719bc9fb7daecb330476074
treea91cce26bd581455018f7f3cf0ca432e4fd4f0bc
parentea0e627623e236e4cbec9f44b4a755bc4a4b852d
usb: dwc3: ep0: correct cache sync issue in case of ep0_bounced

In case of ep0 out, if length is not aligned to maxpacket size then we use
dwc->ep_bounce_addr for dma transfer and not request->dma. Since, we have
alreday done memcpy from dwc->ep0_bounce to request->buf, so we do not need to
issue cache sync function. In fact, cache sync function will bring wrong data
in request->buf from request->dma in this scenario.

So, cache sync function must not be executed in case of ep0 bounced.

Cc: <stable@vger.kernel.org> # v3.4 v3.5
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/ep0.c
drivers/usb/dwc3/gadget.c