summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-05-14 23:38:12 +0400
committerJeff Garzik <jeff@garzik.org>2007-05-18 04:43:13 +0400
commit3225b919036a3ec2e96bb36b7a4fd64c43fdbe84 (patch)
tree219aad5c4d9d541d6dc24bbdcddad8f993136fef
parent53419c68517ee296f737cdc0acaca6eb1ae23aeb (diff)
downloadlinux-3225b919036a3ec2e96bb36b7a4fd64c43fdbe84.tar.xz
sky2: keep track of receive alloc failures
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>
-rw-r--r--drivers/net/sky2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 887c1cea1b42..bde28ad9797d 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -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++;