Commit 23fd537c authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: udc: core: don't starve DMA resources

Always unmap all SG entries as required by DMA API

Fixes: a698908d ("usb: gadget: add generic map/unmap request utilities")
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 511a36d2
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment