diff options
author | Arnaud Patard <apatard@mandriva.com> | 2006-12-17 22:12:09 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-12-17 22:12:09 +0100 |
commit | 1d244821fb562c763c0244f6823ced9aa73ec83a (patch) | |
tree | 81848353182d9419e7f5bb6d3ce84fdc15edb29e /drivers | |
parent | 0263245a8ca0dd71240734d0e1da46fbd4fcab84 (diff) |
r8169: fix infinite loop during hotplug
Bug reported for PCMCIA.
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/r8169.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 68e009bfbdd..9841acd8bdc 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2619,6 +2619,7 @@ static void rtl8169_down(struct net_device *dev) struct rtl8169_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp->mmio_addr; unsigned int poll_locked = 0; + unsigned int intrmask; rtl8169_delete_timer(dev); @@ -2657,8 +2658,11 @@ core_down: * 2) dev->change_mtu * -> rtl8169_poll can not be issued again and re-enable the * interruptions. Let's simply issue the IRQ down sequence again. + * + * No loop if hotpluged or major error (0xffff). */ - if (RTL_R16(IntrMask)) + intrmask = RTL_R16(IntrMask); + if (intrmask && (intrmask != 0xffff)) goto core_down; rtl8169_tx_clear(tp); |