[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMgRwdtmDPNqbx4n@shell.armlinux.org.uk>
Date: Mon, 15 Sep 2025 14:16:49 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, linux-arm-msm@...r.kernel.org,
Marek BehĂșn <kabel@...nel.org>,
netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 0/7] net: rework SFP capability parsing and quirks
The original SPF module parsing was implemented prior to gaining any
quirks, and was designed such that the upstream calls the parsing
functions to get the translated capabilities of the module.
SFP quirks were then added to cope with modules that didn't correctly
fill out their ID EEPROM. The quirk function was called from
sfp_parse_support() to allow quirks to modify the ethtool link mode
masks.
Using just ethtool link mode masks eventually lead to difficulties
determining the correct phy_interface_t mode, so a bitmap of these
modes were added - needing both the upstream API and quirks to be
updated.
We have had significantly more SFP module quirks added since, some
which are modifying the ID EEPROM as a way of influencing the data
we provide to the upstream - for example, sfp_fixup_10gbaset_30m()
changes id.base.connector so we report PORT_TP. This could be done
more cleanly if the quirks had access to the parsed SFP port.
In order to improve flexibility, and to simplify some of the upstream
code, we group all module capabilities into a single structure that
the upstream can access via sfp_module_get_caps(). This will allow
the module capabilities to be expanded if required without reworking
all the infrastructure and upstreams again.
In this series, we rework the SFP code to use the capability structure
and then rework all the upstream implementations, finally removing the
old kernel internal APIs.
drivers/net/phy/marvell-88x2222.c | 13 +++--
drivers/net/phy/marvell.c | 8 ++-
drivers/net/phy/marvell10g.c | 7 ++-
drivers/net/phy/phylink.c | 11 ++--
drivers/net/phy/qcom/at803x.c | 9 ++--
drivers/net/phy/qcom/qca807x.c | 7 ++-
drivers/net/phy/sfp-bus.c | 107 ++++++++++++++++----------------------
drivers/net/phy/sfp.c | 49 +++++++++--------
drivers/net/phy/sfp.h | 4 +-
include/linux/phy.h | 5 ++
include/linux/sfp.h | 48 +++++++++--------
11 files changed, 126 insertions(+), 142 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists