linux/drivers
Oleksij Rempel 6110dff776 net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
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>
2020-04-03 16:04:24 -07:00
..
accessibility
acpi Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
amba
android binderfs: use refcount for binder control devices too 2020-03-11 19:33:52 +01:00
ata ata: make "libata.force" kernel parameter optional 2020-03-26 10:28:20 -06:00
atm atm: nicstar: fix if-statement empty body warning 2020-02-29 21:28:30 -08:00
auxdisplay auxdisplay: charlcd: replace zero-length array with flexible-array member 2020-03-06 22:18:07 +01:00
base Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
bcma
block for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
bluetooth Bluetooth: btusb: print Intel fw build version in power-on boot 2020-03-16 08:57:40 +01:00
bus Merge tag 'omap-for-v5.6/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes 2020-03-25 14:27:22 +01:00
cdrom scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places 2020-02-24 15:06:07 -05:00
char Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
clk clk: imx: Align imx sc clock parent msg structs to 4 2020-03-25 18:46:05 -07:00
clocksource arm64 updates for 5.7: 2020-03-31 10:05:01 -07:00
connector
counter counter: 104-quad-8: Support Differential Encoder Cable Status 2020-03-08 17:28:53 +00:00
cpufreq arm64 updates for 5.7: 2020-03-31 10:05:01 -07:00
cpuidle Merge branches 'pm-core', 'pm-sleep', 'pm-acpi' and 'pm-domains' 2020-03-30 14:46:58 +02:00
crypto crypto/chcr: Add missing include file <linux/highmem.h> 2020-04-02 06:55:06 -07:00
dax
dca
devfreq PM / devfreq: Fix handling dev_pm_qos_remove_request result 2020-03-25 08:35:03 +09:00
dio dio: Fix dio_bus_match() kerneldoc 2020-03-09 11:12:19 +01:00
dma dmaengine: ti: k3-udma-glue: Fix an error handling path in 'k3_udma_glue_cfg_rx_flow()' 2020-03-23 11:48:34 +05:30
dma-buf dma-buf: free dmabuf->name in dma_buf_release() 2020-02-27 18:01:58 +05:30
edac Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
eisa
extcon extcon: axp288: Convert to new X86 CPU match macros 2020-03-24 21:34:11 +01:00
firewire
firmware MMC core: 2020-03-31 16:13:09 -07:00
fpga
fsi
gnss
gpio gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model 2020-03-24 10:06:54 +01:00
gpu Power management updates for 5.7-rc1 2020-03-30 15:05:01 -07:00
greybus
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-03-17 09:38:03 -07:00
hsi
hv
hwmon Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
hwspinlock
hwtracing intel_th: pci: Add Elkhart Lake CPU support 2020-03-18 11:32:56 +01:00
i2c i2c: pca-platform: Use platform_irq_get_optional 2020-03-28 05:03:17 +01:00
i3c i3c: convert to use i2c_new_client_device() 2020-03-29 10:35:50 +02:00
ide Linux 5.6 2020-03-30 13:31:37 +02:00
idle Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
iio staging: iio: adc: ad7192: Re-indent enum labels 2020-03-23 11:43:42 +01:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
input Driver core patches for 5.7-rc1 2020-03-30 13:59:52 -07:00
interconnect interconnect: Handle memory allocation errors 2020-03-03 08:02:57 +01:00
iommu iommu/vt-d: Populate debugfs if IOMMUs are detected 2020-03-14 20:02:43 +01:00
ipack
irqchip MIPS updates for v5.7: 2020-03-31 08:51:45 -07:00
isdn
leds
lightnvm for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
macintosh macintosh: windfarm: fix MODINFO regression 2020-03-10 12:30:59 +01:00
mailbox
mcb
md for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
media Power management updates for 5.7-rc1 2020-03-30 15:05:01 -07:00
memory
memstick
message
mfd
misc arm64 updates for 5.7: 2020-03-31 10:05:01 -07:00
mmc MMC core: 2020-03-31 16:13:09 -07:00
most staging: most: move core files out of the staging area 2020-03-24 13:42:44 +01:00
mtd mtd: spi-nor: remove mtk-quadspi driver 2020-03-11 19:56:08 +00:00
mux
net net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers 2020-04-03 16:04:24 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-03-25 18:58:11 -07:00
ntb NTB: add pci shutdown handler for AMD NTB 2020-03-13 10:04:20 -04:00
nubus
nvdimm block: simplify queue allocation 2020-03-27 10:23:43 -06:00
nvme for-5.7/drivers-2020-03-29 2020-03-30 11:43:51 -07:00
nvmem
of Driver core patches for 5.7-rc1 2020-03-30 13:59:52 -07:00
opp
oprofile
parisc
parport
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
pcmcia
perf arm64 updates for 5.7: 2020-03-31 10:05:01 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
pinctrl Updates for the interrupt subsystem: 2020-03-30 17:35:14 -07:00
platform platform-drivers-x86 for v5.7-1 2020-03-31 16:43:40 -07:00
pnp
power
powercap Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:40:08 -07:00
pps
ps3
ptp ptp: Avoid deadlocks in the programmable pin code. 2020-03-30 11:16:38 -07:00
pwm clocksource/drivers/timer-ti-dm: Enable autoreload in set_pwm 2020-03-16 12:40:51 +01:00
rapidio
ras
regulator spi/regulator: Updates for v5.7 2020-03-30 14:58:26 -07:00
remoteproc remoteproc: clean up notification config 2020-03-16 17:31:51 -07:00
reset
rpmsg
rtc Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:13:08 -07:00
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
sbus
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
sfi
sh
siox
slimbus slimbus: ngd: add v2.1.0 compatible 2020-03-12 16:51:15 +01:00
soc soc: samsung: chipid: Fix return value on non-Exynos platforms 2020-03-25 14:27:27 +01:00
soundwire
spi Power management updates for 5.7-rc1 2020-03-30 15:05:01 -07:00
spmi
ssb ssb: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 15:44:12 +02:00
staging Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2020-03-31 17:29:33 -07:00
target scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" 2020-02-14 17:13:54 -05:00
tc
tee Merge tag 'tee-amdtee-fix2-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes 2020-03-25 14:27:27 +01:00
thermal Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 17:01:51 -07:00
thunderbolt Merge 5.6-rc7 into usb-next 2020-03-23 08:04:08 +01:00
tty TTY/Serial patches for 5.7-rc1 2020-03-31 16:18:55 -07:00
uio
usb Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-03-30 16:17:15 -07:00
vfio
vhost vhost: Check docket sk_family instead of call getname 2020-02-22 21:41:42 -08:00
video MIPS updates for v5.7: 2020-03-31 08:51:45 -07:00
virt
virtio virtio_balloon: Adjust label in virtballoon_probe 2020-03-08 05:35:24 -04:00
visorbus
vlynq
vme
w1
watchdog watchdog: iTCO_wdt: Make ICH_RES_IO_SMI optional 2020-03-10 10:20:37 +01:00
xen CPU (hotplug) updates: 2020-03-30 18:06:39 -07:00
zorro zorro: Replace zero-length array with flexible-array member 2020-03-09 11:12:19 +01:00
Kconfig staging: most: move core files out of the staging area 2020-03-24 13:42:44 +01:00
Makefile staging: most: move core files out of the staging area 2020-03-24 13:42:44 +01:00