Skip to content

Commit

Permalink
[TULIP]: NAPI full quantum bug.
Browse files Browse the repository at this point in the history
This should fix the kernel warn/oops reported while routing.

The tulip driver has a fencepost bug with new NAPI in 2.6.24
It has an off by one bug if a full quantum is reached.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 9, 2008
1 parent edba2a1 commit c6a1b62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/tulip/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ int tulip_poll(struct napi_struct *napi, int budget)
if (tulip_debug > 5)
printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n",
dev->name, entry, status);
if (work_done++ >= budget)

if (++work_done >= budget)
goto not_done;

if ((status & 0x38008300) != 0x0300) {
Expand Down

0 comments on commit c6a1b62

Please sign in to comment.