All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45
@ 2025-10-15  2:57 Alok Tiwari
  2025-10-15  4:12 ` Shyam Sundar S K
  2025-10-16 22:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Alok Tiwari @ 2025-10-15  2:57 UTC (permalink / raw)
  To: Shyam-sundar.S-k, kuba, andrew+netdev, davem, edumazet, pabeni,
	horms, linux, netdev
  Cc: alok.a.tiwari

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>
---
v1 -> v2
Added Reviewed-by tag and marked for net-next
remove fixes tag
---
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
index a56efc1bee33..35a381a83647 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
@@ -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);
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45
  2025-10-15  2:57 [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45 Alok Tiwari
@ 2025-10-15  4:12 ` Shyam Sundar S K
  2025-10-16 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Shyam Sundar S K @ 2025-10-15  4:12 UTC (permalink / raw)
  To: Alok Tiwari, kuba, andrew+netdev, davem, edumazet, pabeni, horms,
	linux, netdev



On 10/15/2025 08:27, Alok Tiwari wrote:
> 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>

Looks good to me.

Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Thanks,
Shyam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45
  2025-10-15  2:57 [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45 Alok Tiwari
  2025-10-15  4:12 ` Shyam Sundar S K
@ 2025-10-16 22:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-16 22:50 UTC (permalink / raw)
  To: ALOK TIWARI
  Cc: Shyam-sundar.S-k, kuba, andrew+netdev, davem, edumazet, pabeni,
	horms, linux, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 14 Oct 2025 19:57:43 -0700 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45
    https://git.kernel.org/netdev/net-next/c/bd853a59a87e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-16 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-15  2:57 [PATCH net-next v2] net: amd-xgbe: use EOPNOTSUPP instead of ENOTSUPP in xgbe_phy_mii_read_c45 Alok Tiwari
2025-10-15  4:12 ` Shyam Sundar S K
2025-10-16 22:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.