diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-24 14:33:27 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-25 10:36:24 +0300 |
commit | 23fd537c9508fb6e3b93ddf23982f51afc087781 (patch) | |
tree | 90fbfe01bd55649a16b5db841e81a97a0fb15ad4 | |
parent | 511a36d2f357724312bb3776d2f6eed3890928b2 (diff) | |
download | linux-23fd537c9508fb6e3b93ddf23982f51afc087781.tar.xz |
usb: gadget: udc: core: don't starve DMA resources
Always unmap all SG entries as required by DMA API
Fixes: a698908d3b3b ("usb: gadget: add generic map/unmap request utilities")
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
-rw-r--r-- | drivers/usb/gadget/udc/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 934f83881c30..40c04bb25f2f 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -827,7 +827,7 @@ void usb_gadget_unmap_request_by_dev(struct device *dev, return; if (req->num_mapped_sgs) { - dma_unmap_sg(dev, req->sg, req->num_mapped_sgs, + dma_unmap_sg(dev, req->sg, req->num_sgs, is_in ? DMA_TO_DEVICE : DMA_FROM_DEVICE); req->num_mapped_sgs = 0; |