From: Michael Chan Date: Mon, 25 Apr 2005 22:14:03 +0000 (-0700) Subject: [TG3]: Fix bug in tg3_rx() X-Git-Tag: v2.6.12-rc4~214^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=483ba50bd41d14d5325d6cd9935de86a982d08a2;p=pandora-kernel.git [TG3]: Fix bug in tg3_rx() This patch fixes a bug that causes tg3_has_work() to always return 1. rx work is determined by comparing tp->rx_rcb_ptr with the current hw producer index. The hw producer index is modulo the ring size, but tp- >rx_rcb_ptr is a free running counter that goes up beyond the ring size. After the ring wraps around once, tg3_has_work() will always return 1. The fix is to always do modulo arithmetic on tp->rx_rcb_ptr. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- Reading git-diff-tree failed