Merge tag 'jg-20061012-00' of git://electric-eye.fr.zoreil.com/home/romieu/linux...
authorJeff Garzik <jeff@garzik.org>
Sat, 21 Oct 2006 18:16:11 +0000 (14:16 -0400)
committerJeff Garzik <jeff@garzik.org>
Sat, 21 Oct 2006 18:16:11 +0000 (14:16 -0400)
1  2 
drivers/net/r8169.c

diff --combined drivers/net/r8169.c
@@@ -214,6 -214,7 +214,7 @@@ static struct pci_device_id rtl8169_pci
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8168), 0, 0, RTL_CFG_2 },
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8169), 0, 0, RTL_CFG_0 },
        { PCI_DEVICE(PCI_VENDOR_ID_DLINK,       0x4300), 0, 0, RTL_CFG_0 },
+       { PCI_DEVICE(0x1259,                    0xc107), 0, 0, RTL_CFG_0 },
        { PCI_DEVICE(0x16ec,                    0x0116), 0, 0, RTL_CFG_0 },
        { PCI_VENDOR_ID_LINKSYS,                0x1032,
                PCI_ANY_ID, 0x0024, 0, 0, RTL_CFG_0 },
@@@ -473,7 -474,8 +474,7 @@@ MODULE_VERSION(RTL8169_VERSION)
  
  static int rtl8169_open(struct net_device *dev);
  static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
 -static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance,
 -                            struct pt_regs *regs);
 +static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance);
  static int rtl8169_init_ring(struct net_device *dev);
  static void rtl8169_hw_start(struct net_device *dev);
  static int rtl8169_close(struct net_device *dev);
@@@ -1391,7 -1393,7 +1392,7 @@@ static void rtl8169_netpoll(struct net_
        struct pci_dev *pdev = tp->pci_dev;
  
        disable_irq(pdev->irq);
 -      rtl8169_interrupt(pdev->irq, dev, NULL);
 +      rtl8169_interrupt(pdev->irq, dev);
        enable_irq(pdev->irq);
  }
  #endif
@@@ -2591,7 -2593,7 +2592,7 @@@ rtl8169_rx_interrupt(struct net_device 
  
  /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */
  static irqreturn_t
 -rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
 +rtl8169_interrupt(int irq, void *dev_instance)
  {
        struct net_device *dev = (struct net_device *) dev_instance;
        struct rtl8169_private *tp = netdev_priv(dev);
@@@ -2700,6 -2702,7 +2701,7 @@@ static void rtl8169_down(struct net_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);
  
@@@ -2738,8 -2741,11 +2740,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);