linux/drivers/net/phy
Rajasingh Thavamani 232ba3a51c net: phy: Micrel KSZ8061: link failure after cable connect
With Micrel KSZ8061 PHY, the link may occasionally not come up after
Ethernet cable connect. The vendor's (Microchip, former Micrel) errata
sheet 80000688A.pdf descripes the problem and possible workarounds in
detail, see below.
The batch implements workaround 1, which permanently fixes the issue.

DESCRIPTION
Link-up may not occur properly when the Ethernet cable is initially
connected. This issue occurs more commonly when the cable is connected
slowly, but it may occur any time a cable is connected. This issue occurs
in the auto-negotiation circuit, and will not occur if auto-negotiation
is disabled (which requires that the two link partners be set to the
same speed and duplex).

END USER IMPLICATIONS
When this issue occurs, link is not established. Subsequent cable
plug/unplaug cycle will not correct the issue.

WORk AROUND
There are four approaches to work around this issue:
1. This issue can be prevented by setting bit 15 in MMD device address 1,
   register 2, prior to connecting the cable or prior to setting the
   Restart Auto-negotiation bit in register 0h. The MMD registers are
   accessed via the indirect access registers Dh and Eh, or via the Micrel
   EthUtil utility as shown here:
   . if using the EthUtil utility (usually with a Micrel KSZ8061
     Evaluation Board), type the following commands:
     > address 1
     > mmd 1
     > iw 2 b61a
   . Alternatively, write the following registers to write to the
     indirect MMD register:
     Write register Dh, data 0001h
     Write register Eh, data 0002h
     Write register Dh, data 4001h
     Write register Eh, data B61Ah
2. The issue can be avoided by disabling auto-negotiation in the KSZ8061,
   either by the strapping option, or by clearing bit 12 in register 0h.
   Care must be taken to ensure that the KSZ8061 and the link partner
   will link with the same speed and duplex. Note that the KSZ8061
   defaults to full-duplex when auto-negotiation is off, but other
   devices may default to half-duplex in the event of failed
   auto-negotiation.
3. The issue can be avoided by connecting the cable prior to powering-up
   or resetting the KSZ8061, and leaving it plugged in thereafter.
4. If the above measures are not taken and the problem occurs, link can
   be recovered by setting the Restart Auto-Negotiation bit in
   register 0h, or by resetting or power cycling the device. Reset may
   be either hardware reset or software reset (register 0h, bit 15).

PLAN
This errata will not be corrected in the future revision.

Fixes: 7ab59dc15e ("drivers/net/phy/micrel_phy: Add support for new PHYs")
Signed-off-by: Alexander Onnasch <alexander.onnasch@landisgyr.com>
Signed-off-by: Rajasingh Thavamani <T.Rajasingh@landisgyr.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-02-27 10:04:34 -08:00
..
amd.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
aquantia.c net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
asix.c net: phy: Fixup GPLv2+ SPDX tags based on license text 2019-01-22 20:57:03 -08:00
at803x.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
bcm7xxx.c net: phy: bcm7xxx: Add entry for BCM7255 2018-11-07 21:50:27 -08:00
bcm63xx.c net: ethernet: Convert phydev advertize and supported from u32 to link mode 2018-11-11 10:10:01 -08:00
bcm87xx.c net: phy: Add missing features to PHY drivers 2019-01-16 15:41:02 -08:00
bcm-cygnus.c net: phy: broadcom: Fix bcm_write_exp() 2018-05-23 15:27:01 -04:00
bcm-phy-lib.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-26 19:46:15 -04:00
bcm-phy-lib.h net: phy: broadcom: Fix bcm_write_exp() 2018-05-23 15:27:01 -04:00
broadcom.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-11-11 17:57:54 -08:00
cicada.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
cortina.c net: phy: add missing phy driver features 2019-01-17 22:03:25 -08:00
davicom.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
dp83tc811.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
dp83640_reg.h
dp83640.c net: dp83640: expire old TX-skb 2019-02-04 08:54:52 -08:00
dp83822.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
dp83848.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
dp83867.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
et1011c.c net: phy: et011c: Remove incorrect PHY_POLL flags 2018-09-16 15:31:01 -07:00
fixed_phy.c Fixed PHY: Add fixed_phy_change_carrier() 2018-12-17 11:24:32 -08:00
icplus.c net: phy: icplus: allow configuring the interrupt function on IP101GR 2018-11-18 16:16:20 -08:00
intel-xway.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
Kconfig net: phy: bcm63xx: Allow to be built with COMPILE_TEST 2018-09-12 20:24:20 -07:00
lxt.c net: phy: Convert u32 phydev->lp_advertising to linkmode 2018-11-11 10:10:01 -08:00
Makefile net: phy: mscc-miim: Add MDIO driver 2018-05-15 16:41:15 -04:00
marvell10g.c net: phy: marvell10g: Fix Multi-G advertisement to only advertise 10G 2019-02-23 13:27:51 -08:00
marvell.c Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x" 2019-02-02 19:43:23 -08:00
mdio_bus.c mdio_bus: Fix use-after-free on device_register fails 2019-02-22 15:34:07 -08:00
mdio_device.c
mdio-bcm-iproc.c
mdio-bcm-unimac.c net: phy: mdio-bcm-unimac: mark PM functions as __maybe_unused 2018-09-28 10:25:11 -07:00
mdio-bitbang.c net: phy: mdio-bitbang: Remove reset support 2018-04-19 15:59:10 -04:00
mdio-boardinfo.c net: phy: mdio-boardinfo: Allow recursive mdiobus_register() 2018-04-20 10:33:26 -04:00
mdio-boardinfo.h
mdio-cavium.c
mdio-cavium.h
mdio-gpio.c net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data 2018-12-08 21:33:30 -08:00
mdio-hisi-femac.c net: phy: Fixup GPLv2+ SPDX tags based on license text 2019-01-22 20:57:03 -08:00
mdio-i2c.c
mdio-i2c.h
mdio-moxart.c
mdio-mscc-miim.c drivers: net: Remove device_node checks with of_mdiobus_register() 2018-05-16 14:20:36 -04:00
mdio-mux-bcm-iproc.c net: phy: mdio-mux-bcm-iproc: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
mdio-mux-gpio.c gpiolib: Pass array info to get/set array functions 2018-09-13 11:16:54 +02:00
mdio-mux-mmioreg.c net: phy: mdio-mux: slience probe defer error 2018-03-07 12:39:59 -05:00
mdio-mux.c
mdio-octeon.c
mdio-sun4i.c
mdio-thunder.c net: phy: Convert to using %pOFn instead of device_node.name 2018-10-01 23:29:37 -07:00
mdio-xgene.c
mdio-xgene.h
meson-gxl.c net: phy: meson-gxl: Use the genphy_soft_reset callback 2019-01-15 22:27:34 -08:00
micrel.c net: phy: Micrel KSZ8061: link failure after cable connect 2019-02-27 10:04:34 -08:00
microchip_t1.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
microchip.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
mscc.c net: phy: mscc: Fix the VSC 8531/41 Chip Init sequence 2018-12-19 10:33:25 -08:00
national.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
phy_device.c net: phy: phy driver features are mandatory 2019-01-19 10:03:08 -08:00
phy_led_triggers.c net: phy: leds: Don't make our own link speed names 2018-11-09 20:13:51 -08:00
phy-c45.c net: phy: Convert u32 phydev->lp_advertising to linkmode 2018-11-11 10:10:01 -08:00
phy-core.c net: phy: Add support for resolving 5G and 2.5G autoneg 2018-11-11 10:10:02 -08:00
phy.c net: phy: fix potential race in the phylib state machine 2019-02-14 12:04:55 -05:00
phylink.c net: phylink: avoid resolving link state too early 2019-02-12 12:25:18 -05:00
qsemi.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
realtek.c net: phy: realtek: Dummy IRQ calls for RTL8366RB 2019-02-23 18:45:28 -08:00
rockchip.c net: phy: Fixup GPLv2+ SPDX tags based on license text 2019-01-22 20:57:03 -08:00
sfp-bus.c net: sfp: do not probe SFP module before we're attached 2019-02-08 15:11:25 -08:00
sfp.c net: sfp: do not probe SFP module before we're attached 2019-02-08 15:11:25 -08:00
sfp.h net: sfp: do not probe SFP module before we're attached 2019-02-08 15:11:25 -08:00
smsc.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
spi_ks8995.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ste10Xp.c net: phy: remove flag PHY_HAS_INTERRUPT from driver configs 2018-11-11 09:36:56 -08:00
swphy.c
swphy.h
teranetics.c net: phy: add missing phy driver features 2019-01-17 22:03:25 -08:00
uPD60620.c net: phy: Convert u32 phydev->lp_advertising to linkmode 2018-11-11 10:10:01 -08:00
vitesse.c net: phy: vitesse: remove duplicate support for VSC8574 2018-11-23 17:25:32 -08:00
xilinx_gmii2rgmii.c net: phy: xgmiitorgmii: Support generic PHY status read 2019-02-15 20:20:10 -08:00