[patch 07/23] sky2: NAPI bug

From: Greg KH
Date: Fri Aug 04 2006 - 01:42:15 EST


-stable review patch. If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@xxxxxxxx>

If the sky2 driver decides to defer processing because it's NAPI
packet quota is done, then it won't correctly handle the rest
when it is rescheduled.

Signed-off-by: Stephen Hemminger <sch@xxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/net/sky2.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

--- linux-2.6.17.7.orig/drivers/net/sky2.c
+++ linux-2.6.17.7/drivers/net/sky2.c
@@ -2187,9 +2187,6 @@ static int sky2_poll(struct net_device *
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);

- if (!~status)
- goto out;
-
if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);

@@ -2226,7 +2223,7 @@ static int sky2_poll(struct net_device *

if (sky2_more_work(hw))
return 1;
-out:
+
netif_rx_complete(dev0);

sky2_read32(hw, B0_Y2_SP_LISR);

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/