linux/drivers/net/mdio
Vladimir Oltean 0322ef49c1 net: dsa: seville: ignore mscc-miim read errors from Lynx PCS
During the refactoring in the commit below, vsc9953_mdio_read() was
replaced with mscc_miim_read(), which has one extra step: it checks for
the MSCC_MIIM_DATA_ERROR bits before returning the result.

On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they
are organized in 2 groups. First group responds to MDIO addresses 4-7
because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to
MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double
checked that these values are correctly set in the SERDES, as well as
PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01.

mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR
mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR

As can be seen, the data in MIIM_DATA is still valid despite having the
MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit
84705fc165 ("net: dsa: felix: introduce support for Seville VSC9953
switch") was ignoring these bits, perhaps deliberately (although
unbeknownst to me).

This is an old IP and the hardware team cannot seem to be able to help
me track down a plausible reason for these failures. I'll keep
investigating, but in the meantime, this is a direct regression which
must be restored to a working state.

The only thing I can do is keep ignoring the errors as before.

Fixes: b996584523 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-02-26 18:31:37 +00:00
..
acpi_mdio.c net: mdio: Add ACPI support code for mdio 2021-06-11 13:08:53 -07:00
fwnode_mdio.c net: mdiobus: Convert to use fwnode_device_is_compatible() 2023-01-23 14:37:13 +00:00
Kconfig net: mdio: add amlogic gxl mdio mux support 2023-01-31 20:59:07 -08:00
Makefile net: mdio: add amlogic gxl mdio mux support 2023-01-31 20:59:07 -08:00
mdio-aspeed.c net: phy: Remove probe_capabilities 2023-01-19 16:23:19 +01:00
mdio-bcm-iproc.c
mdio-bcm-unimac.c net: mdio: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
mdio-bitbang.c net: mdio: mdio-bitbang: Separate C22 and C45 transactions 2023-01-10 15:53:36 -08:00
mdio-cavium.c net: mdio: cavium: Remove unneeded simicolons 2023-01-17 13:19:05 +01:00
mdio-cavium.h net: mdio: cavium: Separate C22 and C45 transactions 2023-01-13 21:40:53 -08:00
mdio-gpio.c net: phy: Add support for microchip SMI0 MDIO bus 2021-04-27 14:13:24 -07:00
mdio-hisi-femac.c
mdio-i2c.c net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
mdio-ipq4019.c net: mdio: ipq4019: Separate C22 and C45 transactions 2023-01-13 21:40:54 -08:00
mdio-ipq8064.c net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
mdio-moxart.c net: phy: rename PHY_IGNORE_INTERRUPT to PHY_MAC_INTERRUPT 2021-02-15 15:20:49 -08:00
mdio-mscc-miim.c net: dsa: seville: ignore mscc-miim read errors from Lynx PCS 2023-02-26 18:31:37 +00:00
mdio-mux-bcm6368.c net: mdio: Fix ENOMEM return value in BCM6368 mux bus controller 2022-04-29 17:58:41 -07:00
mdio-mux-bcm-iproc.c net: mdio: mux-bcm-iproc: Separate C22 and C45 transactions 2023-01-13 21:40:54 -08:00
mdio-mux-gpio.c net: mdio: Alphabetically sort header inclusion 2021-03-16 11:10:00 -07:00
mdio-mux-meson-g12a.c net: mdio: mux-meson-g12a: use __clk_is_enabled to simplify the code 2023-01-30 07:17:30 +00:00
mdio-mux-meson-gxl.c net: mdio: add amlogic gxl mdio mux support 2023-01-31 20:59:07 -08:00
mdio-mux-mmioreg.c net: mdio: mux-mmioreg: Switch to use dev_err_probe() helper 2022-09-20 08:41:19 -07:00
mdio-mux-multiplexer.c net: mdio: mux-multiplexer: Switch to use dev_err_probe() helper 2022-09-20 08:41:20 -07:00
mdio-mux.c net: mdio-mux: add bus name to bus id 2022-03-08 10:28:25 +01:00
mdio-mvusb.c net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
mdio-octeon.c net: mdio: cavium: Separate C22 and C45 transactions 2023-01-13 21:40:53 -08:00
mdio-sun4i.c
mdio-thunder.c net: mdio: cavium: Separate C22 and C45 transactions 2023-01-13 21:40:53 -08:00
mdio-xgene.c drivers: net: Replace acpi_bus_get_device() 2022-02-02 08:05:06 -08:00
of_mdio.c net: mdio: fix unbalanced fwnode reference count in mdio_device_release() 2022-12-06 12:50:00 +01:00