OSDN Git Service

usb: dwc3: gadget: delay unmap of bounced requests
authorJanusz Dziedzic <januszx.dziedzic@intel.com>
Mon, 13 Mar 2017 12:11:32 +0000 (14:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Apr 2017 05:14:35 +0000 (07:14 +0200)
commit297f55bcb62ad0b6b290b01177d9395305d57020
tree8f5f61c83283321a7f804e52d53f9437b8215fc9
parent8cfaf0ae1f566ddfcda661bd81b625a71b16459a
usb: dwc3: gadget: delay unmap of bounced requests

commit de288e36fe33f7e06fa272bc8e2f85aa386d99aa upstream.

In the case of bounced ep0 requests, we must delay DMA operation until
after ->complete() otherwise we might overwrite contents of req->buf.

This caused problems with RNDIS gadget.

Signed-off-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/gadget.c