diff options
| author | Baoquan He <hebaoquan@kylinos.cn> | 2026-09-03 19:18:30 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-14 17:20:12 -0700 |
| commit | 0cebdc5300831defd33987de5800a403db8ee30f (patch) | |
| tree | 254ae056ac79e982d2c8dd839e9ba0fa84d59895 | |
| parent | ed0bcc3717299245f77f5734de6f1728aad96683 (diff) | |
| download | linux-next-0cebdc5300831defd33987de5800a403db8ee30f.tar.gz linux-next-0cebdc5300831defd33987de5800a403db8ee30f.zip | |
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>
| -rw-r--r-- | drivers/usb/cdns3/cdns3-gadget.c | 2 |
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; |
