linux/drivers/net/pcs
Serge Semin 0f53675df6 net: pcs: xpcs: Return EINVAL in the internal methods
[ Upstream commit f5151005d3 ]

In particular the xpcs_soft_reset() and xpcs_do_config() functions
currently return -1 if invalid auto-negotiation mode is specified. That
value might be then passed to the generic kernel subsystems which require
a standard kernel errno value. Even though the erroneous conditions are
very specific (memory corruption or buggy driver implementation) using a
hard-coded -1 literal doesn't seem correct anyway especially when it comes
to passing it higher to the network subsystem or printing to the system
log.  Convert the hard-coded error values to -EINVAL then.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:10:00 +02:00
..
Kconfig net: pcs: Drop the TSE PCS driver 2023-06-05 09:56:36 +01:00
Makefile net: pcs: xpcs: support to switch mode for Wangxun NICs 2023-08-25 07:42:58 +01:00
pcs-lynx.c net: pcs: lynx: fix lynx_pcs_link_up_sgmii() not doing anything in fixed-link mode 2023-08-13 12:32:44 +01:00
pcs-mtk-lynxi.c net: pcs: lynxi: implement pcs_disable op 2023-08-21 19:08:57 -07:00
pcs-rzn1-miic.c net: pcs: rzn1-miic: Convert to platform remove callback returning void 2023-12-05 19:51:09 -08:00
pcs-xpcs-nxp.c net: update NXP copyright text 2021-09-17 13:52:17 +01:00
pcs-xpcs-wx.c net: pcs: xpcs: adapt Wangxun NICs for SGMII mode 2023-08-25 07:42:59 +01:00
pcs-xpcs.c net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:10:00 +02:00
pcs-xpcs.h net: pcs: xpcs: Add 2500BASE-X case in get state for XPCS drivers 2023-10-27 15:59:44 -07:00