net: calxedaxgmac: fix rx ring handling when OOM
authorRob Herring <rob.herring@calxeda.com>
Thu, 28 Mar 2013 11:32:44 +0000 (11:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Mar 2013 19:29:35 +0000 (15:29 -0400)
commitdc574f1d52d893f516f3786ff7635450bac00eef
treea2080c00ac85c6d76a5573e6d5b9385bebb3888c
parenta561cf7edf9863198bfccecfc5cfe26d951ebd20
net: calxedaxgmac: fix rx ring handling when OOM

If skb allocation for the rx ring fails repeatedly, we can reach a point
were the ring is empty. In this condition, the driver is out of sync with
the h/w. While this has always been possible, the removal of the skb
recycling seems to have made triggering this problem easier.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/calxeda/xgmac.c