]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tg3: Eliminate timer race with reset_task
authorMatt Carlson <mcarlson@broadcom.com>
Fri, 4 Nov 2011 09:15:04 +0000 (09:15 +0000)
committerJoe Jin <joe.jin@oracle.com>
Wed, 16 May 2012 02:33:30 +0000 (10:33 +0800)
commit80034b8d88a3c09bb11976fbdc92a16e7c72faa3
treec87ed4e8827fe8481fe5515c85d6a3650a5cf605
parentca72480ec90a05178ea608670fe7adce95278dcb
tg3: Eliminate timer race with reset_task

During shutdown, it is impossible to reliably disable the timer and
reset_task threads.  Each thread can schedule the other, which leads to
shutdown code that chases its tail.

To fix the problem, this patch removes the ability of tg3_reset_task to
schedule a new timer thread.  To support this change, tg3_timer no
longer terminates itself, but rather goes into a polling mode.

(cherry picked from commit 5b1906241905d9bd1abe920854b3d43c2b9c85e1)
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/tg3.c
drivers/net/tg3.h