diff options
author | Michael Chan <mchan@broadcom.com> | 2006-02-02 17:29:28 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-02-02 17:29:28 -0800 |
commit | 7faa006f94fda56a587242b2a22fa19abf840222 (patch) | |
tree | b1354b391829bc3f1d83fd3121167318f8472147 /drivers/net/tg3.h | |
parent | 3f330317ab4973178423aba750d6d0ca5ce0024a (diff) | |
download | kernel-crypto-7faa006f94fda56a587242b2a22fa19abf840222.tar.gz kernel-crypto-7faa006f94fda56a587242b2a22fa19abf840222.tar.xz kernel-crypto-7faa006f94fda56a587242b2a22fa19abf840222.zip |
[TG3]: Flush tg3_reset_task()
Make sure tg3_reset_task() is flushed in the close and suspend paths
as noted by Jeff Garzik.
In the close path, calling flush_scheduled_work() may cause deadlock
if linkwatch_event() is on the workqueue. linkwatch_event() will try
to get the rtnl_lock() which is already held by tg3_close(). So
instead, we set a flag in tg3_reset_task() and tg3_close() polls
the flag until it is cleared.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index e8243305f0e..7f4b7f6ac40 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -2162,6 +2162,7 @@ struct tg3 { #define TG3_FLAG_JUMBO_RING_ENABLE 0x00800000 #define TG3_FLAG_10_100_ONLY 0x01000000 #define TG3_FLAG_PAUSE_AUTONEG 0x02000000 +#define TG3_FLAG_IN_RESET_TASK 0x04000000 #define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 #define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 #define TG3_FLAG_SPLIT_MODE 0x40000000 |