aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/host/ohci.h
diff options
context:
space:
mode:
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>2019-05-29 13:28:40 +0300
committerChristoph Hellwig <hch@lst.de>2019-06-03 16:00:07 +0200
commitb0310c2f09bbe8aebefb97ed67949a3a7092aca6 (patch)
treea0c1be9e4cf413c4bafcd77e95a84830e0f21dcd /drivers/usb/host/ohci.h
parentlib/genalloc: add gen_pool_dma_zalloc() for zeroed DMA allocations (diff)
downloadwireguard-linux-b0310c2f09bbe8aebefb97ed67949a3a7092aca6.tar.xz
wireguard-linux-b0310c2f09bbe8aebefb97ed67949a3a7092aca6.zip
USB: use genalloc for USB HCs with local memory
For HCs that have local memory, replace the current DMA API usage with a genalloc generic allocator to manage the mappings for these devices. To help users, introduce a new HCD API, usb_hcd_setup_local_mem() that will setup up the genalloc backing up the device local memory. It will be used in subsequent patches. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. The current implementation was relying on a short circuit in the DMA API that in the end, was acting as an allocator for these type of devices. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Tested-by: Fredrik Noring <noring@nocrew.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/usb/host/ohci.h')
-rw-r--r--drivers/usb/host/ohci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index ef4813bfc5bf..b015b00774b2 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -385,6 +385,8 @@ struct ohci_hcd {
/*
* memory management for queue data structures
+ *
+ * @td_cache and @ed_cache are %NULL if &usb_hcd.localmem_pool is used.
*/
struct dma_pool *td_cache;
struct dma_pool *ed_cache;