Commit b885aab3 authored by Michael Trimarchi's avatar Michael Trimarchi Committed by Paolo Abeni

net: fec: Avoid allocating rx buffer using ATOMIC in ndo_open

Make ndo_open less sensitive to memory pressure.
Signed-off-by: default avatarMichael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: default avatarJakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20220518062007.10056-1-michael@amarulasolutions.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent d935053a
...@@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue) ...@@ -3076,7 +3076,7 @@ fec_enet_alloc_rxq_buffers(struct net_device *ndev, unsigned int queue)
rxq = fep->rx_queue[queue]; rxq = fep->rx_queue[queue];
bdp = rxq->bd.base; bdp = rxq->bd.base;
for (i = 0; i < rxq->bd.ring_size; i++) { for (i = 0; i < rxq->bd.ring_size; i++) {
skb = netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE); skb = __netdev_alloc_skb(ndev, FEC_ENET_RX_FRSIZE, GFP_KERNEL);
if (!skb) if (!skb)
goto err_alloc; goto err_alloc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment