Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd3ecf17 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman
Browse files

usb: don't create dma pools for HCDs with a localmem_pool



If the HCD provides a localmem pool we will never use the DMA pools, so
don't create them.

Fixes: b0310c2f ("USB: use genalloc for USB HCs with local memory")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20190811080520.21712-2-hch@lst.de


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 141822aa
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -66,9 +66,9 @@ int hcd_buffer_create(struct usb_hcd *hcd)
	char		name[16];
	int		i, size;

	if (!IS_ENABLED(CONFIG_HAS_DMA) ||
	    (!is_device_dma_capable(hcd->self.sysdev) &&
	     !hcd->localmem_pool))
	if (hcd->localmem_pool ||
	    !IS_ENABLED(CONFIG_HAS_DMA) ||
	    !is_device_dma_capable(hcd->self.sysdev))
		return 0;

	for (i = 0; i < HCD_BUFFER_POOLS; i++) {