opnsense-src/sys/dev/sff
Tomaz Zaman 107d135ff0 sff: move SFP module management into sfp_fdt state machine
Move ~900 lines of SFP management code (GPIO polling, EEPROM reading,
RollBall I2C-MDIO PHY probing, auto-negotiation, link monitoring) from
the dtsec MAC driver into the sfp_fdt framework driver.

sfp_fdt now implements a full state machine (EMPTY → PROBE → PRESENT →
PHY_PROBE/WAIT_LOS → PHY_AN/DDM_POLL → LINK_UP) that handles module
detection, identification, and link management for any MAC driver with
SFP+ cages. MAC drivers register a callback table (sfp_upstream_ops)
via SFF_REGISTER_UPSTREAM() and receive module_insert, module_remove,
link_up, and link_down events.

dtsec is reduced to ~50 lines of callback implementations that update
interface link state and store module info for sysctl reporting.

Tested on hardware with both fiber (FLEXOPTIX DAC) and copper (FS.com
10GBASE-T with AQR113C PHY via RollBall) modules at 10 Gbps.
2026-07-13 01:50:37 +02:00
..
sff_if.m sff: move SFP module management into sfp_fdt state machine 2026-07-13 01:50:37 +02:00
sfp_fdt.c sff: move SFP module management into sfp_fdt state machine 2026-07-13 01:50:37 +02:00
sfp_fdt.h sff: move SFP module management into sfp_fdt state machine 2026-07-13 01:50:37 +02:00