‘Legacy’ SFP mode requires “manual” control of the SFP pins.
‘Managed’ mode for SFP requires the Linux phylink + sfp driver. This driver manages the pins based on SFP state:
# Linux SFP managed mode
cat /sys/kernel/debug/gpio
gpiochip4: GPIOs 368-383, parent: i2c/0-0076, 0-0076, can sleep:
gpio-368 ( |tx-fault ) in lo
gpio-369 ( |tx-disable ) out lo
gpio-370 ( |mod-def0 ) in lo ACTIVE LOW
gpio-371 ( |los ) in lo
gpio-372 ( |tx-fault ) in lo
gpio-373 ( |tx-disable ) out lo
gpio-374 ( |mod-def0 ) in lo ACTIVE LOW
gpio-375 ( |los ) in lo
gpio-380 ( |ten64:admin ) out hi
gpio-381 ( |admin_led_lower ) out lo
# Legacy / unmanaged mode
cat /sys/kernel/debug/gpio
gpiochip4: GPIOs 368-383, parent: i2c/0-0076, 0-0076, can sleep:
gpio-369 ( |sysfs ) out lo
gpio-373 ( |sysfs ) out lo
gpio-376 ( |sysfs ) out lo
gpio-377 ( |sysfs ) out lo
gpio-378 ( |sysfs ) out lo
gpio-379 ( |sysfs ) out lo
gpio-381 ( |admin_led_lower ) out lo
sysfs gpio has been deprecated in recent kernel versions, you can use `CONFIG_GPIO_SYSFS=y
to re-enable it.
I’m a bit behind on testing new kernel releases at the moment, hopefully I can look at 5.19 in the next few days.
Passive DAC cables don’t have any electronics in them (apart from the EEPROM), so the state of the control pins (like TXDISABLE) has no effect.