Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3225b919036a3ec2e96bb36b7a4fd64c43fdbe84
Commit:     3225b919036a3ec2e96bb36b7a4fd64c43fdbe84
Parent:     53419c68517ee296f737cdc0acaca6eb1ae23aeb
Author:     Stephen Hemminger <[EMAIL PROTECTED]>
AuthorDate: Mon May 14 12:38:12 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu May 17 20:43:13 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/sky2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 887c1ce..bde28ad 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++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to