igb: Fix SGMII SFP module discovery for 100FX/LX.
[ Upstream commit 5365ec1aeff5b9f2962a9c9b31d63f9dad7e0e2d ] Changing the link mode should also be done for 100BaseFX SGMII modules, otherwise they just don't work when the default link mode in CTRL_EXT coming from the EEPROM is SERDES. Additionally 100Base-LX SGMII SFP modules are also supported now, which was not the case before. Tested with an i210 using Flexoptix S.1303.2M.G 100FX and S.1303.10.G 100LX SGMII SFP modules. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicronenergy.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0350ed7bcc
commit
5c273c3a8b
@ -562,7 +562,7 @@ static s32 igb_set_sfp_media_type_82575(struct e1000_hw *hw)
|
||||
dev_spec->module_plugged = true;
|
||||
if (eth_flags->e1000_base_lx || eth_flags->e1000_base_sx) {
|
||||
hw->phy.media_type = e1000_media_type_internal_serdes;
|
||||
} else if (eth_flags->e100_base_fx) {
|
||||
} else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) {
|
||||
dev_spec->sgmii_active = true;
|
||||
hw->phy.media_type = e1000_media_type_internal_serdes;
|
||||
} else if (eth_flags->e1000_base_t) {
|
||||
@ -689,14 +689,10 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
|
||||
break;
|
||||
}
|
||||
|
||||
/* do not change link mode for 100BaseFX */
|
||||
if (dev_spec->eth_flags.e100_base_fx)
|
||||
break;
|
||||
|
||||
/* change current link mode setting */
|
||||
ctrl_ext &= ~E1000_CTRL_EXT_LINK_MODE_MASK;
|
||||
|
||||
if (hw->phy.media_type == e1000_media_type_copper)
|
||||
if (dev_spec->sgmii_active)
|
||||
ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_SGMII;
|
||||
else
|
||||
ctrl_ext |= E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES;
|
||||
|
@ -201,7 +201,7 @@ static int igb_get_link_ksettings(struct net_device *netdev,
|
||||
advertising &= ~ADVERTISED_1000baseKX_Full;
|
||||
}
|
||||
}
|
||||
if (eth_flags->e100_base_fx) {
|
||||
if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) {
|
||||
supported |= SUPPORTED_100baseT_Full;
|
||||
advertising |= ADVERTISED_100baseT_Full;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user