From: Ding Hui stmmac_init_rx_buffers() accepts allocation flags but stopped using them when RX buffers were converted to page_pool. As a result, callers passing GFP_KERNEL still allocate with GFP_ATOMIC | __GFP_NOWARN and cannot use reclaim to satisfy an allocation. Use the supplied flags while retaining GFP_DMA32 for hardware without 64-bit DMA addressing. This also allows the resume path to allocate missing RX pages with GFP_KERNEL. Fixes: 2af6106ae949 ("net: stmmac: Introducing support for Page Pool") Signed-off-by: Ding Hui --- Changes in v5: - Split this fix from the resume fix as requested. - Add a Fixes tag for the page_pool conversion. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index b20e5038eead..f5ae12208e85 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1688,7 +1688,7 @@ static int stmmac_init_rx_buffers(struct stmmac_priv *priv, { struct stmmac_rx_queue *rx_q = &dma_conf->rx_queue[queue]; struct stmmac_rx_buffer *buf = &rx_q->buf_pool[i]; - gfp_t gfp = (GFP_ATOMIC | __GFP_NOWARN); + gfp_t gfp = flags; if (priv->dma_cap.host_dma_width <= 32) gfp |= GFP_DMA32; -- 2.34.1