The M88E1112 can be strapped or EEPROM-configured to bridge SGMII to 100BASE-FX. In this mode the driver still needs the SGMII PHY register access path to identify the external PHY, but the MAC link setup must follow the SERDES media path rather than copper setup.
Decode the M88E1112 MAC Control 1 mode field and switch the I210 media type and physical interface setup callback when the PHY reports 100BASE-FX mode. The driver only observes the Marvell mode. It does not program the 88E1112 registers or its EEPROM. The board must configure it through firmware or straps before probe. Assisted-by: Codex:GPT-5 Signed-off-by: Pawel Dembicki <[email protected]> --- drivers/net/ethernet/intel/igb/e1000_82575.c | 12 +++++++++++- drivers/net/ethernet/intel/igb/e1000_defines.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c index 44a85ad749a4..72c42d9d6f47 100644 --- a/drivers/net/ethernet/intel/igb/e1000_82575.c +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c @@ -264,9 +264,19 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw) data = FIELD_GET(E1000_M88E1112_MAC_CTRL_1_MODE_MASK, data); if (data == E1000_M88E1112_AUTO_COPPER_SGMII || - data == E1000_M88E1112_AUTO_COPPER_BASEX) + data == E1000_M88E1112_AUTO_COPPER_BASEX) { hw->mac.ops.check_for_link = igb_check_for_link_media_swap; + } else if (data == E1000_M88E1112_100BASE_FX) { + /* The driver only detects this strap/EEPROM + * mode. 88E1112 register and EEPROM setup must + * be done outside igb before probe/reset. + */ + hw->phy.media_type = + e1000_media_type_internal_serdes; + hw->mac.ops.setup_physical_interface = + igb_setup_serdes_link_82575; + } } if (phy->id == M88E1512_E_PHY_ID) { ret_val = igb_initialize_M88E1512_phy(hw); diff --git a/drivers/net/ethernet/intel/igb/e1000_defines.h b/drivers/net/ethernet/intel/igb/e1000_defines.h index 7e6f9aa2d57b..25104328eae6 100644 --- a/drivers/net/ethernet/intel/igb/e1000_defines.h +++ b/drivers/net/ethernet/intel/igb/e1000_defines.h @@ -615,6 +615,7 @@ #define E1000_MEDIA_PORT_COPPER 1 #define E1000_MEDIA_PORT_OTHER 2 +#define E1000_M88E1112_100BASE_FX 0x0 #define E1000_M88E1112_AUTO_COPPER_SGMII 0x2 #define E1000_M88E1112_AUTO_COPPER_BASEX 0x3 #define E1000_M88E1112_STATUS_LINK 0x0004 /* Interface Link Bit */ -- 2.43.0
