diff options
author | Arnaud Patard <apatard@mandriva.com> | 2006-10-12 16:33:31 -0400 |
---|---|---|
committer | Francois Romieu <romieu@electric-eye.fr.zoreil.com> | 2006-10-12 16:10:44 -0400 |
commit | 733b736c91dd2c556f35dffdcf77e667cf10cefc (patch) | |
tree | aeb1631abe0b6ee60d7216e6dbe7226c66073e3d /drivers/net/r8169.c | |
parent | 73f5e28b336772c4b08ee82e5bf28ab872898ee1 (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>
Diffstat (limited to 'drivers/net/r8169.c')
-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 c7309e98f89d..c2c9a86e445c 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -2702,6 +2702,7 @@ static void rtl8169_down(struct net_device *dev) | |||
2702 | struct rtl8169_private *tp = netdev_priv(dev); | 2702 | struct rtl8169_private *tp = netdev_priv(dev); |
2703 | void __iomem *ioaddr = tp->mmio_addr; | 2703 | void __iomem *ioaddr = tp->mmio_addr; |
2704 | unsigned int poll_locked = 0; | 2704 | unsigned int poll_locked = 0; |
2705 | unsigned int intrmask; | ||
2705 | 2706 | ||
2706 | rtl8169_delete_timer(dev); | 2707 | rtl8169_delete_timer(dev); |
2707 | 2708 | ||
@@ -2740,8 +2741,11 @@ core_down: | |||
2740 | * 2) dev->change_mtu | 2741 | * 2) dev->change_mtu |
2741 | * -> rtl8169_poll can not be issued again and re-enable the | 2742 | * -> rtl8169_poll can not be issued again and re-enable the |
2742 | * interruptions. Let's simply issue the IRQ down sequence again. | 2743 | * interruptions. Let's simply issue the IRQ down sequence again. |
2744 | * | ||
2745 | * No loop if hotpluged or major error (0xffff). | ||
2743 | */ | 2746 | */ |
2744 | if (RTL_R16(IntrMask)) | 2747 | intrmask = RTL_R16(IntrMask); |
2748 | if (intrmask && (intrmask != 0xffff)) | ||
2745 | goto core_down; | 2749 | goto core_down; |
2746 | 2750 | ||
2747 | rtl8169_tx_clear(tp); | 2751 | rtl8169_tx_clear(tp); |