Commit bd853a59 authored by Alok Tiwari's avatar Alok Tiwari Committed by Jakub Kicinski
Browse files

net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45



The MDIO read callback xgbe_phy_mii_read_c45() can propagate its return
value up through phylink_mii_ioctl() to user space via netdev ioctls such
as SIOCGMIIREG. Returning ENOTSUPP results in user space seeing
"Unknown error", since ENOTSUPP is not a standard errno value.

Replace ENOTSUPP with EOPNOTSUPP to align with the MDIO core’s
usage and ensure user space receives a proper "Operation not supported"
error instead of an unknown code.

Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Acked-by: default avatarShyam Sundar S K <Shyam-sundar.S-k@amd.com>
Link: https://patch.msgid.link/20251015025751.1532149-1-alok.a.tiwari@oracle.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 55db64dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -668,7 +668,7 @@ static int xgbe_phy_mii_read_c45(struct mii_bus *mii, int addr, int devad,
	else if (phy_data->conn_type & XGBE_CONN_TYPE_MDIO)
		ret = xgbe_phy_mdio_mii_read_c45(pdata, addr, devad, reg);
	else
		ret = -ENOTSUPP;
		ret = -EOPNOTSUPP;

	xgbe_phy_put_comm_ownership(pdata);