Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] igb: detect M88E1112 100BASE-FX SGMII mode
@ 2026-07-18 16:52 Pawel Dembicki
  0 siblings, 0 replies; only message in thread
From: Pawel Dembicki @ 2026-07-18 16:52 UTC (permalink / raw)
  To: netdev
  Cc: Pawel Dembicki, Tony Nguyen, Przemek Kitszel, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	intel-wired-lan, linux-kernel

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 <paweldembicki@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-18 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-18 16:52 [PATCH net-next 1/2] igb: detect M88E1112 100BASE-FX SGMII mode Pawel Dembicki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox