Commit 7adbccbb authored by Tony Nguyen's avatar Tony Nguyen Committed by Jeff Kirsher

ixgbe: Disable flow control for XFI

Flow control autonegotiation is not supported for XFI.  Make sure that
ixgbe_device_supports_autoneg_fc() returns false and
hw->fc.disable_fc_autoneg is set to true to avoid running the fc_autoneg
function for that device.
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent ae84dbf7
...@@ -97,6 +97,9 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) ...@@ -97,6 +97,9 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
break; break;
case ixgbe_media_type_backplane: case ixgbe_media_type_backplane:
if (hw->device_id == IXGBE_DEV_ID_X550EM_X_XFI)
supported = false;
else
supported = true; supported = true;
break; break;
case ixgbe_media_type_copper: case ixgbe_media_type_copper:
......
...@@ -2843,7 +2843,7 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw) ...@@ -2843,7 +2843,7 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)
{ {
bool pause, asm_dir; bool pause, asm_dir;
u32 reg_val; u32 reg_val;
s32 rc; s32 rc = 0;
/* Validate the requested mode */ /* Validate the requested mode */
if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) { if (hw->fc.strict_ieee && hw->fc.requested_mode == ixgbe_fc_rx_pause) {
...@@ -2886,11 +2886,10 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw) ...@@ -2886,11 +2886,10 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)
return IXGBE_ERR_CONFIG; return IXGBE_ERR_CONFIG;
} }
if (hw->device_id != IXGBE_DEV_ID_X550EM_X_KR && switch (hw->device_id) {
hw->device_id != IXGBE_DEV_ID_X550EM_A_KR && case IXGBE_DEV_ID_X550EM_X_KR:
hw->device_id != IXGBE_DEV_ID_X550EM_A_KR_L) case IXGBE_DEV_ID_X550EM_A_KR:
return 0; case IXGBE_DEV_ID_X550EM_A_KR_L:
rc = hw->mac.ops.read_iosf_sb_reg(hw, rc = hw->mac.ops.read_iosf_sb_reg(hw,
IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id), IXGBE_KRM_AN_CNTL_1(hw->bus.lan_id),
IXGBE_SB_IOSF_TARGET_KR_PHY, IXGBE_SB_IOSF_TARGET_KR_PHY,
...@@ -2911,7 +2910,13 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw) ...@@ -2911,7 +2910,13 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)
/* This device does not fully support AN. */ /* This device does not fully support AN. */
hw->fc.disable_fc_autoneg = true; hw->fc.disable_fc_autoneg = true;
break;
case IXGBE_DEV_ID_X550EM_X_XFI:
hw->fc.disable_fc_autoneg = true;
break;
default:
break;
}
return rc; return rc;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment