[dpdk-dev] [PATCH 09/29] net/ixgbe/base: enable LASI interrupts only for X552 devices

Wei Dai wei.dai at intel.com
Sun Dec 4 07:31:20 CET 2016


Enable the LASI interrupts on X552 devices to receive notifications of the
link configurations of the external PHY and correspondingly support the
configuration of the internal iXFI link, since iXFI does not support
auto-negotiation. This is not required for X553 devices having KR support,
which performs auto-negotiations and which is used as the internal link to
the external PHY. Hence adding a check here to avoid enabling LASI
interrupts for X553 devices. For X553 devices we get link
notifications through LSC interrupts in the MAC. That should suffice to
handle link notifications. The default value of "Link connect/disconnect
mask"  (IXGBE_MDIO_PMA_TX_VEN_LASI_INT_EN) in auto-neg transmit vendor
interrupt mask 2 (7.D401) is 0. Hence added a check that disables code in
ixgbe_x550.c/ixgbe_enable_lasi_ext_t_x550em() that sets this bit and hence
retains the default value for this bit, for X553 devices.

Signed-off-by: Wei Dai <wei.dai at intel.com>
---
 drivers/net/ixgbe/base/ixgbe_x550.c | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c
index 28c7ce3..fecc8e6 100644
--- a/drivers/net/ixgbe/base/ixgbe_x550.c
+++ b/drivers/net/ixgbe/base/ixgbe_x550.c
@@ -2026,19 +2026,32 @@ STATIC s32 ixgbe_enable_lasi_ext_t_x550em(struct ixgbe_hw *hw)
 	status = ixgbe_get_lasi_ext_t_x550em(hw, &lsc);
 
 	/* Enable link status change alarm */
-	status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_PMA_TX_VEN_LASI_INT_MASK,
-				      IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &reg);
 
-	if (status != IXGBE_SUCCESS)
-		return status;
+	/* Enable the LASI interrupts on X552 devices to receive notifications
+	 * of the link configurations of the external PHY and correspondingly
+	 * support the configuration of the internal iXFI link, since iXFI does
+	 * not support auto-negotiation. This is not required for X553 devices
+	 * having KR support, which performs auto-negotiations and which is used
+	 * as the internal link to the external PHY. Hence adding a check here
+	 * to avoid enabling LASI interrupts for X553 devices.
+	 */
+	if (hw->mac.type != ixgbe_mac_X550EM_a) {
+		status = hw->phy.ops.read_reg(hw,
+					IXGBE_MDIO_PMA_TX_VEN_LASI_INT_MASK,
+					IXGBE_MDIO_AUTO_NEG_DEV_TYPE, &reg);
+
+		if (status != IXGBE_SUCCESS)
+			return status;
 
-	reg |= IXGBE_MDIO_PMA_TX_VEN_LASI_INT_EN;
+		reg |= IXGBE_MDIO_PMA_TX_VEN_LASI_INT_EN;
 
-	status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_PMA_TX_VEN_LASI_INT_MASK,
-				       IXGBE_MDIO_AUTO_NEG_DEV_TYPE, reg);
+		status = hw->phy.ops.write_reg(hw,
+					IXGBE_MDIO_PMA_TX_VEN_LASI_INT_MASK,
+					IXGBE_MDIO_AUTO_NEG_DEV_TYPE, reg);
 
-	if (status != IXGBE_SUCCESS)
-		return status;
+		if (status != IXGBE_SUCCESS)
+			return status;
+	}
 
 	/* Enable high temperature failure and global fault alarms */
 	status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK,
-- 
2.7.4



More information about the dev mailing list