Commit 2c825d45 authored by Felipe Balbi's avatar Felipe Balbi Committed by Ben Hutchings

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

commit 23fd537c upstream.

Always unmap all SG entries as required by DMA API

Fixes: a698908d ("usb: gadget: add generic map/unmap request utilities")
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
[bwh: Backported to 3.16: adjust filename, context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 858ccdfd
......@@ -91,7 +91,7 @@ void usb_gadget_unmap_request(struct usb_gadget *gadget,
return;
if (req->num_mapped_sgs) {
dma_unmap_sg(&gadget->dev, req->sg, req->num_mapped_sgs,
dma_unmap_sg(&gadget->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