Skip to content

Commit

Permalink
sky2: Flow control frames recorded as dropped packets
Browse files Browse the repository at this point in the history
Thanks for your patch.  A more general solution would be to move the
rx_dropped up into sky2_receive.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Feb 4, 2010
1 parent 3fbd918 commit 90c3033
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2404,6 +2404,9 @@ static struct sk_buff *sky2_receive(struct net_device *dev,
skb = receive_copy(sky2, re, length);
else
skb = receive_new(sky2, re, length);

dev->stats.rx_dropped += (skb == NULL);

resubmit:
sky2_rx_submit(sky2, re);

Expand Down Expand Up @@ -2515,11 +2518,10 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do, u16 idx)
case OP_RXSTAT:
total_packets[port]++;
total_bytes[port] += length;

skb = sky2_receive(dev, length, status);
if (unlikely(!skb)) {
dev->stats.rx_dropped++;
if (!skb)
break;
}

/* This chip reports checksum status differently */
if (hw->flags & SKY2_HW_NEW_LE) {
Expand Down

0 comments on commit 90c3033

Please sign in to comment.