summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorBaoquan He <hebaoquan@kylinos.cn>2026-09-03 19:18:30 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-24 01:55:59 -0700
commit4facd31d97d9fcdbf3a71f97463ca3894fb035a2 (patch)
treefcc3fd36e0f8db64d74b81bb8c7fd3649702760a /drivers/usb
parentfd3d2126e737c9c95d78d30904916ff84ebd2940 (diff)
usb: cdns3: don't use GFP_DMA when calling dma_alloc_coherent()
dma_alloc_coherent() allocates the DMA buffer with the device's addressing limitation in mind; the DMA core picks the zone from the device's coherent DMA mask and ignores GFP_DMA passed by the caller. Use GFP_KERNEL instead so the allocation may reclaim as usual for probe-time allocations. Link: https://lore.kernel.org/20260903111836.1777265-8-hebaoquan@kylinos.cn Signed-off-by: Baoquan He <hebaoquan@kylinos.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Harry Yoo <harry@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/cdns3/cdns3-gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index 42311c1bfada..484d3128cf08 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -3376,7 +3376,7 @@ static int cdns3_gadget_start(struct cdns *cdns)
/* allocate memory for setup packet buffer */
priv_dev->setup_buf = dma_alloc_coherent(priv_dev->sysdev, 8,
- &priv_dev->setup_dma, GFP_DMA);
+ &priv_dev->setup_dma, GFP_KERNEL);
if (!priv_dev->setup_buf) {
ret = -ENOMEM;
goto err2;