net/ixgbe/base: enable LASI only for X552 devices

Enable the Link Alarm Status Interrupt (LASI) only for 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.

Signed-off-by: Wei Dai <wei.dai@intel.com>
This commit is contained in:
Wei Dai 2016-12-21 17:47:53 +08:00 committed by Ferruh Yigit
parent 06d85f7c7a
commit 769e6ae308

View File

@ -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);
reg |= IXGBE_MDIO_PMA_TX_VEN_LASI_INT_EN;
if (status != IXGBE_SUCCESS)
return status;
status = hw->phy.ops.write_reg(hw, IXGBE_MDIO_PMA_TX_VEN_LASI_INT_MASK,
IXGBE_MDIO_AUTO_NEG_DEV_TYPE, reg);
reg |= IXGBE_MDIO_PMA_TX_VEN_LASI_INT_EN;
if (status != IXGBE_SUCCESS)
return status;
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;
}
/* Enable high temperature failure and global fault alarms */
status = hw->phy.ops.read_reg(hw, IXGBE_MDIO_GLOBAL_INT_MASK,