linux/drivers/net/phy
Maxime Chevallier d4e6cb324d net: phy: phy_caps: Don't skip better duplex macth on non-exact match
When performing a non-exact phy_caps lookup, we are looking for a
supported mode that matches as closely as possible the passed speed/duplex.

Blamed patch broke that logic by returning a match too early in case
the caller asks for half-duplex, as a full-duplex linkmode may match
first, and returned as a non-exact match without even trying to mach on
half-duplex modes.

Reported-by: Jijie Shao <shaojijie@huawei.com>
Closes: https://lore.kernel.org/netdev/20250603102500.4ec743cf@fedora/T/#m22ed60ca635c67dc7d9cbb47e8995b2beb5c1576
Tested-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Fixes: fc81e257d1 ("net: phy: phy_caps: Allow looking-up link caps based on speed and duplex")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250606094321.483602-1-maxime.chevallier@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-06-12 08:00:53 -07:00
..
aquantia net: phy: aquantia: fix commenting format 2025-04-29 15:13:21 -07:00
mediatek net: phy: mediatek: Add Airoha AN7583 PHY support 2025-05-27 17:07:53 -07:00
mscc net: phy: mscc: Stop clearing the the UDPv4 checksum for L2 frames 2025-05-28 09:11:19 +02:00
qcom
realtek net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
adin.c
adin1100.c
air_en8811h.c net: phy: air_en8811h: Add clk provider for CKO pin 2025-04-11 18:35:04 -07:00
amd.c
as21xxx.c net: phy: Add support for Aeonsemi AS21xxx PHYs 2025-05-21 15:56:10 -07:00
ax88796b_rust.rs
ax88796b.c
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm-phy-ptp.c
bcm7xxx.c
bcm63xx.c
bcm87xx.c net: phy: bcm87xx: simplify .match_phy_device OP 2025-05-21 15:56:09 -07:00
bcm54140.c
bcm84881.c
broadcom.c net: phy: broadcom: Correct BCM5221 PHY model detection 2025-03-31 13:47:41 +01:00
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c
dp83tg720.c
dp83640_reg.h
dp83640.c net: ptp: introduce .supported_perout_flags to ptp_clock_info 2025-04-15 20:20:58 -07:00
dp83822.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-04-24 11:20:52 -07:00
dp83848.c
dp83867.c net: phy: dp83867: use 2ns delay if not specified in DTB 2025-05-12 18:43:35 -07:00
dp83869.c
et1011c.c
fixed_phy.c net: phy: fixed_phy: constify status argument where possible 2025-05-20 18:17:43 -07:00
icplus.c net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
intel-xway.c
Kconfig net: phy: add driver for MaxLinear MxL86110 PHY 2025-05-27 09:36:17 +02:00
linkmode.c
lxt.c
Makefile net: phy: add driver for MaxLinear MxL86110 PHY 2025-05-27 09:36:17 +02:00
marvell-88q2xxx.c net: phy: marvell-88q2xxx: Enable temperature measurement in probe again 2025-05-15 12:32:09 +02:00
marvell-88x2222.c
marvell.c
marvell10g.c net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
mdio_bus_provider.c net: phy: factor out provider part from mdio_bus.c 2025-05-01 18:03:29 -07:00
mdio_bus.c net/mdiobus: Fix potential out-of-bounds clause 45 read/write access 2025-06-11 12:49:03 +01:00
mdio_device.c net: phy: make mdio consumer / device layer a separate module 2025-05-20 12:22:47 +02:00
mdio_devres.c
mdio-boardinfo.c
mdio-boardinfo.h
mdio-open-alliance.h
meson-gxl.c
micrel.c net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
microchip_rds_ptp.c net: ptp: introduce .supported_perout_flags to ptp_clock_info 2025-04-15 20:20:58 -07:00
microchip_rds_ptp.h
microchip_t1.c
microchip_t1s.c
microchip.c net: phy: microchip: document where the LAN88xx PHYs are used 2025-05-16 16:27:54 -07:00
mii_timestamper.c
motorcomm.c
mxl-86110.c net: phy: add driver for MaxLinear MxL86110 PHY 2025-05-27 09:36:17 +02:00
mxl-gpy.c
national.c
ncn26000.c
nxp-c45-tja11xx-macsec.c
nxp-c45-tja11xx.c net: phy: nxp-c45-tja11xx: simplify .match_phy_device OP 2025-05-21 15:56:09 -07:00
nxp-c45-tja11xx.h
nxp-cbtx.c
nxp-tja11xx.c net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
open_alliance_helpers.c
open_alliance_helpers.h
phy_caps.c net: phy: phy_caps: Don't skip better duplex macth on non-exact match 2025-06-12 08:00:53 -07:00
phy_device.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-28 10:11:15 +02:00
phy_led_triggers.c net: phy: leds: fix memory leak 2025-04-22 18:25:18 -07:00
phy_link_topology.c
phy_package.c
phy-c45.c
phy-caps.h
phy-core.c
phy.c
phylib-internal.h
phylib.h
phylink.c net: phylink: Drop unused defines for SUPPORTED/ADVERTISED_INTERFACES 2025-04-29 11:26:34 -07:00
qsemi.c
qt2025.rs
rockchip.c
sfp-bus.c
sfp.c
sfp.h
smsc.c
spi_ks8995.c
ste10Xp.c
stubs.c
swphy.c
swphy.h
teranetics.c net: phy: pass PHY driver to .match_phy_device OP 2025-05-21 15:56:09 -07:00
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c