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 /drivers/usb/gadget/udc/core.c | |
parent | 511a36d2f357724312bb3776d2f6eed3890928b2 (diff) | |
download | op-kernel-dev-23fd537c9508fb6e3b93ddf23982f51afc087781.zip op-kernel-dev-23fd537c9508fb6e3b93ddf23982f51afc087781.tar.gz |
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>
Diffstat (limited to 'drivers/usb/gadget/udc/core.c')
-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 934f838..40c04bb 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; |