usb: gadget: Support already-mapped DMA SGs
authorPaul Cercueil <paul@crapouillou.net>
Tue, 30 Jan 2024 12:23:37 +0000 (13:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Feb 2024 16:00:09 +0000 (17:00 +0100)
commit99f638dd49ca80538addec6b3733ddb5784c9373
treee121218bc1317ae33cd00ef896bfda2e2aaff720
parent7ad818eef647fa5d4614a335107ce28cbf1c13c3
usb: gadget: Support already-mapped DMA SGs

Add a new 'sg_was_mapped' field to the struct usb_request. This field
can be used to indicate that the scatterlist associated to the USB
transfer has already been mapped into the DMA space, and it does not
have to be done internally.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20240130122340.54813-2-paul@crapouillou.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/core.c
include/linux/usb/gadget.h