mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
usb: cdns2: 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-14-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>
This commit is contained in:
parent
4d7507b166
commit
1528ed9f96
|
|
@ -2341,7 +2341,7 @@ static int cdns2_gadget_start(struct cdns2_device *pdev)
|
|||
|
||||
/* Allocate memory for setup packet buffer. */
|
||||
buf = dma_alloc_coherent(pdev->dev, 8, &pdev->ep0_preq.request.dma,
|
||||
GFP_DMA);
|
||||
GFP_KERNEL);
|
||||
pdev->ep0_preq.request.buf = buf;
|
||||
|
||||
if (!pdev->ep0_preq.request.buf) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user