linux-stable/drivers/net/pcs
Serge Semin a3f6045ce3 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:04:58 +02:00
..
Kconfig net: pcs: add new PCS driver for altera TSE PCS 2022-09-05 10:16:53 +01:00
Makefile net: pcs: add new PCS driver for altera TSE PCS 2022-09-05 10:16:53 +01:00
pcs-altera-tse.c net: pcs: add new PCS driver for altera TSE PCS 2022-09-05 10:16:53 +01:00
pcs-lynx.c net: pcs: lynx: consolidate sgmii and 1000base-x config code 2022-06-24 11:27:24 -07:00
pcs-rzn1-miic.c net: pcs: Add missing put_device call in miic_create 2023-08-23 17:52:33 +02:00
pcs-xpcs-nxp.c
pcs-xpcs.c net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:04:58 +02:00
pcs-xpcs.h net: pcs: xpcs: add CL37 1000BASE-X AN support 2022-06-17 10:55:35 +01:00