linux/drivers/net/pcs
Serge Semin bcac735cf6 net: pcs: xpcs: Introduce DW XPCS info structure
The being introduced structure will preserve the PCS and PMA IDs retrieved
from the respective DW XPCS MMDs or potentially pre-defined by the client
drivers. (The later change will be introduced later in the framework of
the commit adding the memory-mapped DW XPCS devices support.)

The structure fields are filled in in the xpcs_get_id() function, which
used to be responsible for the PCS Device ID getting only. Besides of the
PCS ID the method now fetches the PMA/PMD IDs too from MMD 1, which used
to be done in xpcs_dev_flag(). The retrieved PMA ID will be from now
utilized for the PMA-specific tweaks like it was introduced for the
Wangxun TxGBE PCS in the commit f629acc6f2 ("net: pcs: xpcs: support to
switch mode for Wangxun NICs").

Note 1. The xpcs_get_id() error-handling semantics has been changed. From
now the error number will be returned from the function. There is no point
in the next IOs or saving 0xffs and then looping over the actual device
IDs if device couldn't be reached. -ENODEV will be returned if the very
first IO operation failed thus indicating that no device could be found.

Note 2. The PCS and PMA IDs macros have been converted to enum'es. The
enum'es will be populated later in another commit with the virtual IDs
identifying the DW XPCS devices which have some platform-specifics, but
have been synthesized with the default PCS/PMA ID.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-07-05 09:35:50 +01: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: no need to read LPA in lynx_pcs_get_state_2500basex() 2024-05-13 16:37:18 -07:00
pcs-mtk-lynxi.c net: fill in MODULE_DESCRIPTION()s for PCS drivers 2024-01-29 12:12:51 +00:00
pcs-rzn1-miic.c net: pcs: rzn1-miic: Init RX clock early if MAC requires it 2024-03-28 19:21:34 -07: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: Introduce DW XPCS info structure 2024-07-05 09:35:50 +01:00
pcs-xpcs.h net: pcs: xpcs: Move native device ID macro to linux/pcs/pcs-xpcs.h 2024-07-05 09:35:49 +01:00