]> git.ipfire.org Git - thirdparty/openwrt.git/commit
generic: 6.18: backport SFP I2C presence detection without MOD_DEF0 GPIO 23836/head
authorCarlo Szelinsky <github@szelinsky.de>
Tue, 16 Jun 2026 19:12:23 +0000 (21:12 +0200)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 17 Jun 2026 06:53:33 +0000 (08:53 +0200)
commitcc5e8c5af5e3dd4fb12c76e2f3a16f5c0a772a88
treeef4cd88f07a501c46d7e6088d2d39039d51bef85
parent279ad9292328155d31690459894b8570d8b7ce8a
generic: 6.18: backport SFP I2C presence detection without MOD_DEF0 GPIO

Backport upstream net-next commit 8ac44d24c3a1. An SFP cage whose MOD_DEF0
signal is not wired to a readable GPIO currently uses sff_gpio_get_state(),
which always reports the module present: an empty cage gets stuck in
MOD_ERROR, hot-insertion is never detected and empty cages spam -EIO at
boot. Derive presence from a throttled single-byte I2C read of the module
EEPROM instead, so hot-plug works and the boot spam stops. A soldered-down
"sff,sff" module stays always-present.

This helps RTL93xx SFP boards that route no cage presence signal to a GPIO.

Remaining sfp.c patches refreshed.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=8ac44d24c3a1
Signed-off-by: Carlo Szelinsky <github@szelinsky.de>
Link: https://github.com/openwrt/openwrt/pull/23836
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/generic/backport-6.18/711-v7.2-net-phy-sfp-detect-presence-via-I2C-when-no-MOD_DEF0-GPIO.patch [new file with mode: 0644]
target/linux/generic/pending-6.18/750-net-sfp-add-quirk-for-QINIYEK-BJ-SFP-10G-T-copper-SF.patch
target/linux/generic/pending-6.18/751-net-sfp-add-quirk-for-TP-LINK-SM410U.patch
target/linux/realtek/patches-6.18/705-v7.1-net-sfp-initialize-i2c_block_size-at-adapter-configu.patch
target/linux/realtek/patches-6.18/706-01-v7.2-net-sfp-apply-I2C-adapter-quirks-to-limit-block-size.patch
target/linux/realtek/patches-6.18/706-02-v7.2-net-sfp-extend-SMBus-support.patch
target/linux/realtek/patches-6.18/714-net-phy-sfp-add-support-for-SMBus.patch