]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sky2: keep track of receive alloc failures
authorStephen Hemminger <shemminger@linux-foundation.org>
Mon, 14 May 2007 19:38:12 +0000 (12:38 -0700)
committerJeff Garzik <jeff@garzik.org>
Fri, 18 May 2007 00:43:13 +0000 (20:43 -0400)
When driver can't allocate receive buffer it drops incoming
packet. Keep a counter.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/sky2.c

index 887c1cea1b420dd9460fbf726b0a7eb83e46ed3b..bde28ad9797df50eba9fbac92e7f0d9092b52b24 100644 (file)
@@ -2141,8 +2141,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
                switch (le->opcode & ~HW_OWNER) {
                case OP_RXSTAT:
                        skb = sky2_receive(dev, length, status);
-                       if (!skb)
+                       if (unlikely(!skb)) {
+                               sky2->net_stats.rx_dropped++;
                                goto force_update;
+                       }
 
                        skb->protocol = eth_type_trans(skb, dev);
                        sky2->net_stats.rx_packets++;