Skip to content

Commit 8401fe8

Browse files
Thangaraj-Samynathangregkh
authored andcommitted
net: lan743x: Allocate rings outside ZONE_DMA
commit 8a8f3f4 upstream. The driver allocates ring elements using GFP_DMA flags. There is no dependency from LAN743x hardware on memory allocation should be in DMA_ZONE. Hence modifying the flags to use only GFP_ATOMIC. This is consistent with other callers of lan743x_rx_init_ring_element(). Reported-by: Zhang, Liyin(CN) <Liyin.Zhang.CN@windriver.com> Signed-off-by: Thangaraj Samynathan <thangaraj.s@microchip.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250415044509.6695-1-thangaraj.s@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 429bf3f commit 8401fe8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/net/ethernet/microchip/lan743x_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,8 +2494,7 @@ static int lan743x_rx_process_buffer(struct lan743x_rx *rx)
24942494

24952495
/* save existing skb, allocate new skb and map to dma */
24962496
skb = buffer_info->skb;
2497-
if (lan743x_rx_init_ring_element(rx, rx->last_head,
2498-
GFP_ATOMIC | GFP_DMA)) {
2497+
if (lan743x_rx_init_ring_element(rx, rx->last_head, GFP_ATOMIC)) {
24992498
/* failed to allocate next skb.
25002499
* Memory is very low.
25012500
* Drop this packet and reuse buffer.

0 commit comments

Comments
 (0)