projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53419c6
)
sky2: keep track of receive alloc failures
author
Stephen Hemminger
<shemminger@linux-foundation.org>
Mon, 14 May 2007 19:38:12 +0000
(12:38 -0700)
committer
Jeff 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
patch
|
blob
|
history
diff --git
a/drivers/net/sky2.c
b/drivers/net/sky2.c
index
887c1ce
..
bde28ad
100644
(file)
--- 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++;