openwrt-mirror/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx
Markus Stockhausen 9533e2e574 realtek: dsa: relax capability checks for 2.5G modes
The driver currently uses two checks to verify the capabilities. These
are ..._phylink_get_caps() and ..._pcs_validate(). For RTL930x these
must allow 2.5G modes. Enhance that as follows:

Add 2500BASEX to phylink_get_caps(). Sort the interfaces alphabetically
and rename the function to the new prefix. IMPORTANT REMARK! Until now
this function allowed the XGMII mode (10G only parallel interface) that
was somehow mixed with the Realtek proprietary mode XSGMII (10G SGMII).
Remove it to avoid further confusion.

Looking upstream pcs_validate() is used less and less. There are only
2 consumers left in 6.16 and the calling location reads:

	/* Validate the link parameters with the PCS */
	if (pcs->ops->pcs_validate) {
		ret = pcs->ops->pcs_validate(pcs, supported, state);
		if (ret < 0 || phylink_is_empty_linkmode(supported))
			return -EINVAL;

		/* Ensure the advertising mask is a subset of the
		 * supported mask.
		 */
		linkmode_and(state->advertising, state->advertising,
			     supported);
	}

There is no need for this additional check. Drop the functions.

Tested-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19429
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-07-24 00:35:00 +02:00
..
common.c realtek: 6.12: proper mdio c45 handling in DSA driver 2025-06-11 22:27:22 +02:00
debugfs.c
dsa.c realtek: dsa: relax capability checks for 2.5G modes 2025-07-24 00:35:00 +02:00
Kconfig
Makefile
qos.c
rtl83xx.h
rtl838x.c realtek: 6.12: allow mixed c22/c45 bus access 2025-06-11 22:27:22 +02:00
rtl838x.h realtek: 6.12: align internal/external mac eee function names 2025-06-11 22:27:22 +02:00
rtl839x.c realtek: 6.12: align internal/external mac eee function names 2025-06-11 22:27:22 +02:00
rtl930x.c realtek: 6.12: align internal/external mac eee function names 2025-06-11 22:27:22 +02:00
rtl931x.c realtek: rtl931x: fix setting number of leds per port 2025-07-13 16:47:42 +02:00
tc.c