exynos-linux-stable/drivers/net/phy
Oleksij Rempel 1ee3d823b8 net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
[ Upstream commit 6110dff776f7fa65c35850ef65b41d3b39e2fac2 ]

After the power-down bit is cleared, the chip internally triggers a
global reset. According to the KSZ9031 documentation, we have to wait at
least 1ms for the reset to finish.

If the chip is accessed during reset, read will return 0xffff, while
write will be ignored. Depending on the system performance and MDIO bus
speed, we may or may not run in to this issue.

This bug was discovered on an iMX6QP system with KSZ9031 PHY and
attached PHY interrupt line. If IRQ was used, the link status update was
lost. In polling mode, the link status update was always correct.

The investigation showed, that during a read-modify-write access, the
read returned 0xffff (while the chip was still in reset) and
corresponding write hit the chip _after_ reset and triggered (due to the
0xffff) another reset in an undocumented bit (register 0x1f, bit 1),
resulting in the next write being lost due to the new reset cycle.

This patch fixes the issue by adding a 1...2 ms sleep after the
genphy_resume().

Fixes: 836384d250 ("net: phy: micrel: Add specific suspend")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-13 10:32:55 +02:00
..
amd.c
aquantia.c
at803x.c
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h
bcm7xxx.c
bcm63xx.c
bcm87xx.c
broadcom.c
cicada.c
davicom.c
dp83640.c net: dp83640: expire old TX-skb 2019-02-12 19:44:59 +01:00
dp83640_reg.h
dp83848.c
dp83867.c
et1011c.c
fixed_phy.c net: phy: fixed_phy: Fix fixed_phy not checking GPIO 2020-01-29 10:24:14 +01:00
icplus.c
intel-xway.c
Kconfig
lxt.c
Makefile
marvell.c net: phy: marvell: Fix buffer overrun with stats counters 2019-05-08 07:19:05 +02:00
mdio-bcm-iproc.c net: phy: restore mdio regs in the iproc mdio driver 2020-03-11 07:53:04 +01:00
mdio-bcm-unimac.c
mdio-bitbang.c
mdio-cavium.c
mdio-cavium.h
mdio-gpio.c
mdio-hisi-femac.c
mdio-moxart.c
mdio-mux-bcm-iproc.c
mdio-mux-gpio.c
mdio-mux-mmioreg.c
mdio-mux.c
mdio-octeon.c
mdio-sun4i.c
mdio-thunder.c
mdio-xgene.c
mdio-xgene.h
mdio_bus.c mdio_bus: Fix use-after-free on device_register fails 2019-03-19 13:14:09 +01:00
mdio_device.c
micrel.c net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers 2020-04-13 10:32:55 +02:00
microchip.c
mscc.c
national.c net/phy: fix DP83865 10 Mbps HDX loopback disable function 2019-10-05 12:30:13 +02:00
phy.c net: phy: Keep reporting transceiver type 2020-01-29 10:24:36 +01:00
phy_device.c net: phy: fix MDIO bus PM PHY resuming 2020-03-20 09:07:43 +01:00
qsemi.c
realtek.c
smsc.c
spi_ks8995.c spi: Micrel eth switch: declare missing of table 2019-05-16 19:43:43 +02:00
ste10Xp.c
swphy.c
swphy.h
teranetics.c
vitesse.c
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Support generic PHY status read 2019-02-23 09:05:58 +01:00