diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-10-17 21:15:37 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-10-21 14:20:02 -0400 |
commit | cfadbd298e8b3e7f2e324696b653bb74094590db (patch) | |
tree | f7d68ce2465fdab2b7d673422ff37e743ec010d8 /drivers/net/ioc3-eth.c | |
parent | 089fff2aa8cc2a0383ea9fce17afd10bfab9ac7c (diff) |
[PATCH] Fix timer race
When closing the driver or reinitializing the hardware there is the
usual del_timer() race condition that exists when timers re-add
themselves. Fix by conversion to del_timer_sync().
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ioc3-eth.c')
-rw-r--r-- | drivers/net/ioc3-eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c index e963dbf816be..f56b00ee385e 100644 --- a/drivers/net/ioc3-eth.c +++ b/drivers/net/ioc3-eth.c | |||
@@ -1017,7 +1017,7 @@ static void ioc3_init(struct net_device *dev) | |||
1017 | struct ioc3_private *ip = netdev_priv(dev); | 1017 | struct ioc3_private *ip = netdev_priv(dev); |
1018 | struct ioc3 *ioc3 = ip->regs; | 1018 | struct ioc3 *ioc3 = ip->regs; |
1019 | 1019 | ||
1020 | del_timer(&ip->ioc3_timer); /* Kill if running */ | 1020 | del_timer_sync(&ip->ioc3_timer); /* Kill if running */ |
1021 | 1021 | ||
1022 | ioc3_w_emcr(EMCR_RST); /* Reset */ | 1022 | ioc3_w_emcr(EMCR_RST); /* Reset */ |
1023 | (void) ioc3_r_emcr(); /* Flush WB */ | 1023 | (void) ioc3_r_emcr(); /* Flush WB */ |
@@ -1081,7 +1081,7 @@ static int ioc3_close(struct net_device *dev) | |||
1081 | { | 1081 | { |
1082 | struct ioc3_private *ip = netdev_priv(dev); | 1082 | struct ioc3_private *ip = netdev_priv(dev); |
1083 | 1083 | ||
1084 | del_timer(&ip->ioc3_timer); | 1084 | del_timer_sync(&ip->ioc3_timer); |
1085 | 1085 | ||
1086 | netif_stop_queue(dev); | 1086 | netif_stop_queue(dev); |
1087 | 1087 | ||