Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / net / ethernet / intel / ixgbe / ixgbe_main.c
index cc96a5a..d93eee1 100644 (file)
@@ -1937,6 +1937,16 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)
         * with the write to EICR.
         */
        eicr = IXGBE_READ_REG(hw, IXGBE_EICS);
+
+       /* The lower 16bits of the EICR register are for the queue interrupts
+        * which should be masked here in order to not accidently clear them if
+        * the bits are high when ixgbe_msix_other is called. There is a race
+        * condition otherwise which results in possible performance loss
+        * especially if the ixgbe_msix_other interrupt is triggering
+        * consistently (as it would when PPS is turned on for the X540 device)
+        */
+       eicr &= 0xFFFF0000;
+
        IXGBE_WRITE_REG(hw, IXGBE_EICR, eicr);
 
        if (eicr & IXGBE_EICR_LSC)
@@ -5408,7 +5418,9 @@ static int ixgbe_resume(struct pci_dev *pdev)
 
        pci_wake_from_d3(pdev, false);
 
+       rtnl_lock();
        err = ixgbe_init_interrupt_scheme(adapter);
+       rtnl_unlock();
        if (err) {
                e_dev_err("Cannot initialize interrupts for device\n");
                return err;
@@ -8003,12 +8015,15 @@ static int __init ixgbe_init_module(void)
        pr_info("%s - version %s\n", ixgbe_driver_string, ixgbe_driver_version);
        pr_info("%s\n", ixgbe_copyright);
 
+       ret = pci_register_driver(&ixgbe_driver);
+       if (ret)
+               return ret;
+
 #ifdef CONFIG_IXGBE_DCA
        dca_register_notify(&dca_notifier);
 #endif
 
-       ret = pci_register_driver(&ixgbe_driver);
-       return ret;
+       return 0;
 }
 
 module_init(ixgbe_init_module);