]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Wed, 15 Oct 2025 02:57:43 +0000 (19:57 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 22:42:10 +0000 (15:42 -0700)
commitbd853a59a87ecf9fc060dd54b10a3a94e9786182
treec2756d09e0037c75613b4957decf0f047c9f77c5
parent55db64ddd6a12c5157a61419a11a18fc727e8286
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: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Shyam 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: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c