usb: dwc3: gadget: always unmap EP0 requests
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 20 Dec 2016 12:14:40 +0000 (14:14 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 2 Jan 2017 08:55:28 +0000 (10:55 +0200)
commitd62145929992f331fdde924d5963ab49588ccc7d
treebeec41f64190d917ffa0cbe4e495d0872c154253
parent19ec31230eb3084431bc2e565fd085f79f564274
usb: dwc3: gadget: always unmap EP0 requests

commit 0416e494ce7d ("usb: dwc3: ep0: correct cache
sync issue in case of ep0_bounced") introduced a bug
where we would leak DMA resources which would cause
us to starve the system of them resulting in failing
DMA transfers.

Fix the bug by making sure that we always unmap EP0
requests since those are *always* mapped.

Fixes: 0416e494ce7d ("usb: dwc3: ep0: correct cache
sync issue in case of ep0_bounced")
Cc: <stable@vger.kernel.org>
Tested-by: Tomasz Medrek <tomaszx.medrek@intel.com>
Reported-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c