Skip to content

Commit

Permalink
[PATCH] sky2: receive error handling fix
Browse files Browse the repository at this point in the history
If sky2 detects out of memory, or gets a bad frame, it reuses the same receive
buffer, but forgets to poke the hardware. This could lead to the receiver
getting stuck if there were lots of errors.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Dec 2, 2006
1 parent 7581409 commit 5df7911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
case OP_RXSTAT:
skb = sky2_receive(dev, length, status);
if (!skb)
break;
goto force_update;

skb->protocol = eth_type_trans(skb, dev);
dev->last_rx = jiffies;
Expand All @@ -2081,8 +2081,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)

/* Update receiver after 16 frames */
if (++buf_write[le->link] == RX_BUF_WRITE) {
sky2_put_idx(hw, rxqaddr[le->link],
sky2->rx_put);
force_update:
sky2_put_idx(hw, rxqaddr[le->link], sky2->rx_put);
buf_write[le->link] = 0;
}

Expand Down

0 comments on commit 5df7911

Please sign in to comment.