]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit4c1a9d1f44be3aa542ba0154164cdce27a3569e8
treed2c8e35c19f7cac7a1d3e5a7bc55d76835d2a7e0
parent89234e83a7d47803a634fc881e4d1a2bb4502056
[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