]> bbs.cooldavid.org Git - net-next-2.6.git/commit - drivers/net/tg3.c
[TG3]: Fix tg3_restart_ints()
authorMichael Chan <mchan@broadcom.com>
Mon, 25 Apr 2005 22:17:17 +0000 (15:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2005 22:17:17 +0000 (15:17 -0700)
commit04237dddd14375fce1df4bfb1be92a35aa1c247f
treed2c8e35c19f7cac7a1d3e5a7bc55d76835d2a7e0
parent52f6d697dc0f2c039e8413e780b0f45ddf8161fc
[TG3]: Fix tg3_restart_ints()

tg3_restart_ints() is called to re-enable interrupts after tg3_poll()
has finished all the work. It calls tg3_cond_int() to force an interrupt
if the status block updated bit is set. The updated bit will be set if
there is a new status block update sometime during tg3_poll() and it can
be very often. The worst part is that even if all the work has been
processed, the updated bit remains set and an interrupt will be forced
unnecessarily.

The fix is to call tg3_has_work() instead to determine if new work is
posted before forcing an interrupt. The way to force an interrupt is
also changed to use "coalesce_now" instead of "SETINT". The former is
generally a safer way to force the interrupt.

Also deleted the first parameter to tg3_has_work() which is unused.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c