linux_dsm_epyc7002/drivers/net/ethernet/freescale
Gerlando Falauto 3bb35ac497 net/fsl_pq_mdio: fix computed address for the TBI register
commit afae5ad78b
  "net/fsl_pq_mdio: streamline probing of MDIO nodes"

added support for different types of MDIO devices:
1) Gianfar MDIO nodes that only map the MII registers
2) Gianfar MDIO nodes that map the full MDIO register set
3) eTSEC2 MDIO nodes (which map the full MDIO register set)
4) QE MDIO nodes (which map only the MII registers)

However, the implementation for types 1 and 4 would mistakenly assume
a mapping of the full MDIO register set, thereby computing the address
for the TBI register starting from the containing structure.
The TBI register would therefore be accessed at a wrong (much bigger)
address, not giving the expected result at all.
This patch restores the correct behavior we had prior to the above one.

The consequences of this bug are apparent when trying to access a PHY
with the same address as the value contained in the initial value of
the TBI register (normally 0); in that case you'll get answers from the
internal TBI device (even though MDIO/MDC pins are actually *also*
toggling on the physical bus!).
Beware that you also need to add a fake tbi node to your device tree
with an unused address.

Notice how this fix is related to commit
220669495b
  "powerpc: Add TBI PHY node to first MDIO bus"

which fixed the behavior in kernel 3.3, which was later broken by the
above commit on kernel 3.7.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Cc: Timur Tabi <timur@tabi.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-13 04:29:55 -07:00
..
fs_enet net: fs_enet: mask interrupts for TX partial frames. 2015-08-11 12:05:34 -07:00
fec_main.c net: fec: add netif status check before set mac address 2015-09-09 20:30:10 -07:00
fec_mpc52xx_phy.c net/fsl: constify of_device_id array 2015-03-17 15:00:21 -04:00
fec_mpc52xx.c net/fsl: constify of_device_id array 2015-03-17 15:00:21 -04:00
fec_mpc52xx.h
fec_ptp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-31 23:52:20 -07:00
fec.h net: fec: introduce fec_ptp_stop and use in probe fail path 2015-07-26 21:51:53 -07:00
fsl_pq_mdio.c net/fsl_pq_mdio: fix computed address for the TBI register 2015-10-13 04:29:55 -07:00
gianfar_ethtool.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-08-13 16:23:11 -07:00
gianfar_ptp.c net: gianfar_ptp: Fix module autoload for OF platform driver 2015-09-21 16:08:21 -07:00
gianfar.c phy: add phy_device_remove() 2015-09-24 23:04:53 -07:00
gianfar.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-07-31 23:52:20 -07:00
Kconfig net/fsl: remove dependency FSL_SOC for Gianfar 2015-06-25 02:13:04 -07:00
Makefile gianfar: Remove sysfs stubs for FIFOCFG and stashing 2014-02-18 15:03:02 -05:00
ucc_geth_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ucc_geth.c net: fix phy refcounting in a bunch of drivers 2015-09-24 23:04:53 -07:00
ucc_geth.h
xgmac_mdio.c net/fsl: constify of_device_id array 2015-03-17 15:00:21 -04:00