summaryrefslogtreecommitdiff
path: root/drivers/net/lance.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2005-04-25 15:14:03 -0700
committerDavid S. Miller <davem@davemloft.net>2005-04-25 15:14:03 -0700
commit483ba50bd41d14d5325d6cd9935de86a982d08a2 (patch)
tree885f84a0fe56ed5e3d793a5414c8ec5bb6c8a633 /drivers/net/lance.c
parentcbdbf00aaf0addd391259f94aaa8e7dc1bfc9081 (diff)
downloadlinux-3.10-483ba50bd41d14d5325d6cd9935de86a982d08a2.tar.gz
linux-3.10-483ba50bd41d14d5325d6cd9935de86a982d08a2.tar.bz2
linux-3.10-483ba50bd41d14d5325d6cd9935de86a982d08a2.zip
[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 <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/lance.c')
0 files changed, 0 insertions, 0 deletions