]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/cpsw: don't continue if we miss to allocate rx skbs
authorSebastian Siewior <bigeasy@linutronix.de>
Tue, 23 Apr 2013 07:31:36 +0000 (07:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Apr 2013 08:11:49 +0000 (04:11 -0400)
commitaacebbf8026ecdae1b55db3912e65c6b1308f5ed
treef9b54c50ec8822b253feefd1b41ded0e20e681d7
parent817f6d1a13754b043e1a6c1cb713763022860689
net/cpsw: don't continue if we miss to allocate rx skbs

if during "ifconfig up" we run out of mem we continue regardless how
many skbs we got. In worst case we have zero RX skbs and can't ever
receive further packets since the RX skbs are never reallocated. If
cpdma_chan_submit() fails we even leak the skb.
This patch changes the behavior here:
If we fail to allocate an skb during bring up we don't continue and
report that error. Same goes for errors from cpdma_chan_submit().
While here I changed to __netdev_alloc_skb_ip_align() so GFP_KERNEL can
be used.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c