linux/drivers/net/ethernet/micrel
Marek Vasut 66ef5adb75 net: ks8851: Fix receiver error in 100BASE-TX mode following software power-down
KSZ8851 errata sheet DS80000716D-page 4 Module 3 [1] states that,
when issuing a software power-down (PMECR[1:0] = 10) followed by a
power-on (PMECR[1:0] = 00), the receiver circuit can fail to start
properly preventing communication. The Transmitter will still send
data, but no data will be received.

The errata sheet also includes a workaround, which states that,
it is recommended that the software power-down feature not be used.

Implement that workaround and drop the entry into software power-down
mode. The ks8851_write_mac_addr() calls entry into normal power-on
mode at the very beginning of the function, therefore dropping the
second call to enter software power-down mode is sufficient here.
The ks8851_net_stop() can only be called after ks8851_net_start()
was already called, and ks8851_net_start() also makes the MAC enter
normal power-on mode, therefore it is also fine to drop the call to
enter software power-down mode from ks8851_net_stop().

This will lead to a slight increase in power consumption, but it also
fixes a sporadic reliability problem on at least KSZ8851-16MLL, which
is where the problem was reported and this fix was tested.

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/80000716D.pdf

Fixes: 3ba81f3ece ("net: Micrel KS8851 SPI network driver")
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://patch.msgid.link/20260905130327.203851-1-marex@nabladev.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-09 18:04:05 -07:00
..
Kconfig net: micrel: Fix KS8851 Kconfig 2022-04-05 17:32:05 -07:00
ks8842.c net/micrel: Fix typos in micrel driver code comments 2026-01-20 19:00:46 -08:00
ks8851_common.c net: ks8851: Fix receiver error in 100BASE-TX mode following software power-down 2026-09-09 18:04:05 -07:00
ks8851_par.c net: ks8851: Reinstate disabling of BHs around IRQ handler 2026-04-18 12:14:19 -07:00
ks8851_spi.c net: ks8851: Reinstate disabling of BHs around IRQ handler 2026-04-18 12:14:19 -07:00
ks8851.h net: ks8851: Reinstate disabling of BHs around IRQ handler 2026-04-18 12:14:19 -07:00
ksz884x.c net: Consistently define pci_device_ids using named initializers 2026-05-12 18:16:34 -07:00
Makefile net: ks8851: fix link error 2021-09-28 13:11:20 +01:00