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>
This commit is contained in:
committed by
Francois Romieu
parent
73f5e28b33
commit
733b736c91
@@ -2702,6 +2702,7 @@ static void rtl8169_down(struct net_device *dev)
|
|||||||
struct rtl8169_private *tp = netdev_priv(dev);
|
struct rtl8169_private *tp = netdev_priv(dev);
|
||||||
void __iomem *ioaddr = tp->mmio_addr;
|
void __iomem *ioaddr = tp->mmio_addr;
|
||||||
unsigned int poll_locked = 0;
|
unsigned int poll_locked = 0;
|
||||||
|
unsigned int intrmask;
|
||||||
|
|
||||||
rtl8169_delete_timer(dev);
|
rtl8169_delete_timer(dev);
|
||||||
|
|
||||||
@@ -2740,8 +2741,11 @@ core_down:
|
|||||||
* 2) dev->change_mtu
|
* 2) dev->change_mtu
|
||||||
* -> rtl8169_poll can not be issued again and re-enable the
|
* -> rtl8169_poll can not be issued again and re-enable the
|
||||||
* interruptions. Let's simply issue the IRQ down sequence again.
|
* 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;
|
goto core_down;
|
||||||
|
|
||||||
rtl8169_tx_clear(tp);
|
rtl8169_tx_clear(tp);
|
||||||
|
Reference in New Issue
Block a user