]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: fec: fix MDIO probing for some FEC hardware blocks
authorGreg Ungerer <gerg@linux-m68k.org>
Wed, 28 Oct 2020 05:22:32 +0000 (15:22 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:38:58 +0000 (12:38 +0100)
commit1789e80f40980a41d74ea9abbcc7b8d503e53e32
treed5a53c71648bccff07e8d1ba19fb26812ecb8d05
parent97b8d97359869f4b6b71d0cc7fa49911f6fe9551
net: fec: fix MDIO probing for some FEC hardware blocks

[ Upstream commit 1e6114f51f9d4090390fcec2f5d67d8cc8dc4bfc ]

Some (apparently older) versions of the FEC hardware block do not like
the MMFR register being cleared to avoid generation of MII events at
initialization time. The action of clearing this register results in no
future MII events being generated at all on the problem block. This means
the probing of the MDIO bus will find no PHYs.

Create a quirk that can be checked at the FECs MII init time so that
the right thing is done. The quirk is set as appropriate for the FEC
hardware blocks that are known to need this.

Fixes: f166f890c8f0 ("net: ethernet: fec: Replace interrupt driven MDIO with polled IO")
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Acked-by: Fugang Duan <fugand.duan@nxp.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Link: https://lore.kernel.org/r/20201028052232.1315167-1-gerg@linux-m68k.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c