net/e1000: enable MSI-x for linkup and other events in 82574
authorLuca Boccassi <bluca@debian.org>
Fri, 27 Jul 2018 18:13:17 +0000 (19:13 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:56:02 +0000 (18:56 +0200)
Linux supports 82574 MSI-x interrupt for linkup and other link
conditions. Enable the same feature in the e1000 PMD in order to
allow this card to work properly, as it requires interrupt
handling for link negotiations among other things.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Acked-by: Wei Zhao <wei.zhao1@intel.com>
drivers/net/e1000/base/e1000_82571.c
drivers/net/e1000/em_ethdev.c

index 7c279db..397dd94 100644 (file)
@@ -1257,6 +1257,11 @@ STATIC s32 e1000_init_hw_82571(struct e1000_hw *hw)
         */
        e1000_clear_hw_cntrs_82571(hw);
 
+       /* MSI-X configure for 82574 */
+       if (mac->type == e1000_82574)
+               E1000_WRITE_REG(hw, E1000_IVAR,
+                               (E1000_IVAR_INT_ALLOC_VALID << 16));
+
        return ret_val;
 }
 
index 053e855..28c1535 100644 (file)
@@ -1444,7 +1444,8 @@ eth_em_interrupt_setup(struct rte_eth_dev *dev)
        /* clear interrupt */
        E1000_READ_REG(hw, E1000_ICR);
        regval = E1000_READ_REG(hw, E1000_IMS);
-       E1000_WRITE_REG(hw, E1000_IMS, regval | E1000_ICR_LSC);
+       E1000_WRITE_REG(hw, E1000_IMS,
+                       regval | E1000_ICR_LSC | E1000_ICR_OTHER);
        return 0;
 }
 
@@ -1494,7 +1495,7 @@ em_rxq_intr_enable(struct e1000_hw *hw)
 static void
 em_lsc_intr_disable(struct e1000_hw *hw)
 {
-       E1000_WRITE_REG(hw, E1000_IMC, E1000_IMS_LSC);
+       E1000_WRITE_REG(hw, E1000_IMC, E1000_IMS_LSC | E1000_IMS_OTHER);
        E1000_WRITE_FLUSH(hw);
 }