From: Stephen Hemminger Date: Fri, 1 Dec 2006 22:29:33 +0000 (-0800) Subject: [PATCH] sky2: receive error handling fix X-Git-Tag: v2.6.20-rc1~34^2~40^2~463^2~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5df791117afedf7fdc67dc0842dab4859e3edf69;p=linux-2.6 [PATCH] sky2: receive error handling fix 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 16616f5440..0c8a5354f9 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -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; @@ -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; }