aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-12-01 17:29:33 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:22:29 -0500
commit5df791117afedf7fdc67dc0842dab4859e3edf69 (patch)
tree683f2bf8ea785f88054230d468d8ee8f2056657c /drivers/net/sky2.c
parent758140900a82e3ed3bb2be1d4705dd352fe44825 (diff)
[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 <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 16616f5440d0..0c8a5354f99c 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)
2065 case OP_RXSTAT: 2065 case OP_RXSTAT:
2066 skb = sky2_receive(dev, length, status); 2066 skb = sky2_receive(dev, length, status);
2067 if (!skb) 2067 if (!skb)
2068 break; 2068 goto force_update;
2069 2069
2070 skb->protocol = eth_type_trans(skb, dev); 2070 skb->protocol = eth_type_trans(skb, dev);
2071 dev->last_rx = jiffies; 2071 dev->last_rx = jiffies;
@@ -2081,8 +2081,8 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do)
2081 2081
2082 /* Update receiver after 16 frames */ 2082 /* Update receiver after 16 frames */
2083 if (++buf_write[le->link] == RX_BUF_WRITE) { 2083 if (++buf_write[le->link] == RX_BUF_WRITE) {
2084 sky2_put_idx(hw, rxqaddr[le->link], 2084force_update:
2085 sky2->rx_put); 2085 sky2_put_idx(hw, rxqaddr[le->link], sky2->rx_put);
2086 buf_write[le->link] = 0; 2086 buf_write[le->link] = 0;
2087 } 2087 }
2088 2088