commit d94e90a23b5f20d4aadf592d049a6de3c3260f07
Author: David S. Miller <[EMAIL PROTECTED]>
Date: Sun Apr 6 23:37:08 2008 -0700
SUNGEM: Fix NAPI assertion failure.
Upstream commit: da990a2402aeaee84837f29054c4628eb02f7493
As reported by Johannes Berg:
I started getting this warning with recent kernels:
[ 773.908927] ------------[ cut here ]------------
[ 773.908954] Badness at net/core/dev.c:2204
...
If we loop more than once in gem_poll(), we'll
use more than the real budget in our gem_rx()
calls, thus eventually trigger the caller's
assertions in net_rx_action().
Subtract "work_done" from "budget" for the second
arg to gem_rx() to fix the bug.
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
Signed-off-by: Chris Wright <[EMAIL PROTECTED]>
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 6887214..6fac216 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -910,7 +910,7 @@ static int gem_poll(struct napi_struct *napi, int budget)
* rx ring - must call napi_disable(), which
* schedule_timeout()'s if polling is already disabled.
*/
- work_done += gem_rx(gp, budget);
+ work_done += gem_rx(gp, budget - work_done);
if (work_done >= budget)
return work_done;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs