Files
linux/drivers
Jack Pham 6e3683ebef usb: gadget: core: unmap request from DMA only if previously mapped
commit 31fe084ffa upstream.

In the SG case this is already handled since a non-zero
request->num_mapped_sgs is a clear indicator that dma_map_sg()
had been called. While it would be nice to do the same for the
singly mapped case by simply checking for non-zero request->dma,
it's conceivable that 0 is a valid dma_addr_t handle. Hence add
a flag 'dma_mapped' to struct usb_request and use this to
determine the need to call dma_unmap_single(). Otherwise, if a
request is not DMA mapped then the result of calling
usb_request_unmap_request() would safely be a no-op.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-16 10:29:37 +01:00
..
2019-10-05 12:30:36 +02:00
2018-12-21 14:11:37 +01:00
2019-05-14 19:19:34 +02:00
2019-10-07 18:53:16 +02:00
2019-11-12 19:15:40 +01:00
2018-12-21 14:11:36 +01:00
2019-09-16 08:19:34 +02:00
2019-05-31 06:48:15 -07:00
2019-10-17 13:42:10 -07:00