Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY

As the interface mode doesn't need to be updated on PHYs connected with
USXGMII and integrated PHYs, gpy_update_interface() should just return 0
in these cases rather than -EINVAL which has wrongly been introduced by
commit 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface()
function return type"), as this breaks support for those PHYs.

Fixes: 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface() function return type")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/f744f721a1fcc5e2e936428c62ff2c7d94d2a293.1763648168.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Daniel Golle and committed by
Jakub Kicinski
ec3803b5 a14602fc

+1 -1
+1 -1
drivers/net/phy/mxl-gpy.c
··· 540 540 /* Interface mode is fixed for USXGMII and integrated PHY */ 541 541 if (phydev->interface == PHY_INTERFACE_MODE_USXGMII || 542 542 phydev->interface == PHY_INTERFACE_MODE_INTERNAL) 543 - return -EINVAL; 543 + return 0; 544 544 545 545 /* Automatically switch SERDES interface between SGMII and 2500-BaseX 546 546 * according to speed. Disable ANEG in 2500-BaseX mode.