提交 a79abdc6 编写于 作者: S Stephen Hemminger 提交者: Jeff Garzik

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: NStephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: NJeff Garzik <jeff@garzik.org>
上级 81906791
...@@ -2056,9 +2056,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev, ...@@ -2056,9 +2056,6 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
if (!(status & GMR_FS_RX_OK)) if (!(status & GMR_FS_RX_OK))
goto resubmit; goto resubmit;
if (length > dev->mtu + ETH_HLEN)
goto oversize;
if (length < copybreak) if (length < copybreak)
skb = receive_copy(sky2, re, length); skb = receive_copy(sky2, re, length);
else else
...@@ -2068,14 +2065,10 @@ static struct sk_buff *sky2_receive(struct net_device *dev, ...@@ -2068,14 +2065,10 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
return skb; return skb;
oversize:
++sky2->net_stats.rx_over_errors;
goto resubmit;
error: error:
++sky2->net_stats.rx_errors; ++sky2->net_stats.rx_errors;
if (status & GMR_FS_RX_FF_OV) { if (status & GMR_FS_RX_FF_OV) {
sky2->net_stats.rx_fifo_errors++; sky2->net_stats.rx_over_errors++;
goto resubmit; goto resubmit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册