aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-02-15 19:40:34 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:30:47 -0500
commita79abdc6eeca745b2af04fc03f9a04da0d294094 (patch)
treeb3615973c6f8e39c8e8b669c8baac24c973d8541 /drivers/net/sky2.c
parent819067916d785cac0369b8d6e187b4a83fd17785 (diff)
sky2: receive error handling improvements
Don't drop oversize frame it might be a VLAN (untagged). Use different counter for fifo overrun vs fifo error. Print error on fifo overrrun. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index fafa4021bb8a..c058117d2a63 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2056,9 +2056,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
2056 if (!(status & GMR_FS_RX_OK)) 2056 if (!(status & GMR_FS_RX_OK))
2057 goto resubmit; 2057 goto resubmit;
2058 2058
2059 if (length > dev->mtu + ETH_HLEN)
2060 goto oversize;
2061
2062 if (length < copybreak) 2059 if (length < copybreak)
2063 skb = receive_copy(sky2, re, length); 2060 skb = receive_copy(sky2, re, length);
2064 else 2061 else
@@ -2068,14 +2065,10 @@ resubmit:
2068 2065
2069 return skb; 2066 return skb;
2070 2067
2071oversize:
2072 ++sky2->net_stats.rx_over_errors;
2073 goto resubmit;
2074
2075error: 2068error:
2076 ++sky2->net_stats.rx_errors; 2069 ++sky2->net_stats.rx_errors;
2077 if (status & GMR_FS_RX_FF_OV) { 2070 if (status & GMR_FS_RX_FF_OV) {
2078 sky2->net_stats.rx_fifo_errors++; 2071 sky2->net_stats.rx_over_errors++;
2079 goto resubmit; 2072 goto resubmit;
2080 } 2073 }
2081 2074