linux-stable/drivers/net/phy
Arun Ramadoss 5382033a35 net: phy: lan87xx: change interrupt src of link_up to comm_ready
Currently phy link up/down interrupt is enabled using the
LAN87xx_INTERRUPT_MASK register. In the lan87xx_read_status function,
phy link is determined using the T1_MODE_STAT_REG register comm_ready bit.
comm_ready bit is set using the loc_rcvr_status & rem_rcvr_status.
Whenever the phy link is up, LAN87xx_INTERRUPT_SOURCE link_up bit is set
first but comm_ready bit takes some time to set based on local and
remote receiver status.
As per the current implementation, interrupt is triggered using link_up
but the comm_ready bit is still cleared in the read_status function. So,
link is always down.  Initially tested with the shared interrupt
mechanism with switch and internal phy which is working, but after
implementing interrupt controller it is not working.
It can fixed either by updating the read_status function to read from
LAN87XX_INTERRUPT_SOURCE register or enable the interrupt mask for
comm_ready bit. But the validation team recommends the use of comm_ready
for link detection.
This patch fixes by enabling the comm_ready bit for link_up in the
LAN87XX_INTERRUPT_MASK_2 register (MISC Bank) and link_down in
LAN87xx_INTERRUPT_MASK register.

Fixes: 8a1b415d70 ("net: phy: added ethtool master-slave configuration support")
Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220905152750.5079-1-arun.ramadoss@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-09-08 11:02:44 +02:00
..
mscc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-17 13:56:58 -07:00
Kconfig net: phy: mxl-gpy: add temperature sensor 2022-06-23 20:55:18 -07:00
Makefile net: phy: broadcom: Add PTP support for some Broadcom PHYs. 2022-06-23 20:49:02 -07:00
adin.c net: phy: adin: add support for clock output 2022-05-18 19:58:25 -07:00
adin1100.c net: phy: adin1100: Add SQI support 2022-05-01 17:45:35 +01:00
amd.c
aquantia.h
aquantia_hwmon.c
aquantia_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-06-23 12:33:24 -07:00
at803x.c net: phy: at803x: fix NULL pointer dereference on AR9331 PHY 2022-06-19 11:52:23 +01:00
ax88796b.c net: phy: ax88772a: fix lost pause advertisement configuration 2022-06-29 20:39:05 -07:00
bcm-cygnus.c
bcm-phy-lib.c
bcm-phy-lib.h net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib 2022-06-23 20:49:02 -07:00
bcm-phy-ptp.c net: phy: Add support for 1PPS out and external timestamps 2022-06-23 20:49:02 -07:00
bcm7xxx.c net: phy: bcm7xxx: Add EPHY entry for 7712 2021-10-24 13:42:28 +01:00
bcm63xx.c
bcm87xx.c net: phy: bcm87xx: Use mmd helpers 2022-05-02 13:21:38 +02:00
bcm54140.c
bcm84881.c
broadcom.c net: phy: broadcom: Add support for BCM53128 internal PHYs 2022-07-04 10:33:06 +01:00
cicada.c
cortina.c
davicom.c
dp83tc811.c
dp83td510.c net: phy: dp83td510: add SQI support 2022-06-21 22:01:14 -07:00
dp83640.c dp83640: Use generic ptp_msg_is_sync() function 2022-03-07 11:31:34 +00:00
dp83640_reg.h ptp: dp83640: don't define PAGE0 2021-09-14 20:03:24 -07:00
dp83822.c net: dp83822: disable rx error interrupt 2022-06-24 16:33:22 -07:00
dp83848.c
dp83867.c net: phy: dp83867: fix get nvmem cell fail 2022-08-08 20:57:03 -07:00
dp83869.c net: phy: add support for TI DP83561-SP phy 2021-11-19 20:13:07 -08:00
et1011c.c
fixed_phy.c net: phy: fixed_phy: set phy_mask before calling mdiobus_register() 2022-06-13 23:11:24 -07:00
icplus.c
intel-xway.c
linkmode.c
lxt.c
marvell-88x2222.c net: phy: marvell-88x2222: set proper phydev->port 2022-06-15 09:25:31 +01:00
marvell.c net: phy: marvell: use mii_bmcr_encode_fixed() 2022-06-19 10:38:26 +01:00
marvell10g.c net: phy: marvell10g: fix return value on error 2022-04-26 11:46:18 +02:00
mdio-boardinfo.c
mdio-boardinfo.h
mdio_bus.c net: mdio: unexport __init-annotated mdio_bus_init() 2022-06-08 10:10:13 -07:00
mdio_device.c net: mdio: introduce a shutdown method to mdio device drivers 2021-09-19 12:08:37 +01:00
mdio_devres.c
mediatek-ge.c net: phy: mediatek: remove PHY mode check on MT7531 2022-02-15 14:21:01 +00:00
meson-gxl.c Revert "net: phy: meson-gxl: improve link-up behavior" 2022-09-01 20:55:12 -07:00
micrel.c net: phy: micrel: Make the GPIO to be non-exclusive 2022-08-30 22:49:50 -07:00
microchip.c net: phy: microchip: add comments for the modified LAN88xx phy ID mask. 2022-05-10 18:57:14 -07:00
microchip_t1.c net: phy: lan87xx: change interrupt src of link_up to comm_ready 2022-09-08 11:02:44 +02:00
mii_timestamper.c
motorcomm.c
mxl-gpy.c net: phy: mxl-gpy: print firmware in human readable form 2022-07-13 14:18:39 +01:00
national.c
nxp-c45-tja11xx.c net: phy: Use netif_rx(). 2022-03-06 11:05:31 +00:00
nxp-tja11xx.c net: phy: nxp-tja11xx: use devm_hwmon_sanitize_name() 2022-06-23 20:52:19 -07:00
phy-c45.c net: phy: c45 baset1: do not skip aneg configuration if clock role is not specified 2022-08-08 20:54:28 -07:00
phy-core.c ethtool: Add 10base-T1L link mode entry 2022-05-01 17:45:35 +01:00
phy.c net: phy: Don't trigger state machine while in suspend 2022-06-29 20:38:52 -07:00
phy_device.c net: phy: Don't WARN for PHY_READY state in mdio_bus_phy_resume() 2022-08-22 18:14:10 -07:00
phy_led_triggers.c
phylink.c net: phylink: fix SGMII inband autoneg enable 2022-07-08 20:19:19 -07:00
qsemi.c
realtek.c net: phy: realtek: add support for RTL8365MB-VC internal PHYs 2021-10-18 14:02:56 +01:00
rockchip.c
sfp-bus.c net: sfp: add 2500base-X quirk for Lantech SFP module 2022-03-15 11:41:20 +01:00
sfp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-06-30 16:31:00 -07:00
sfp.h
smsc.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-06-23 12:33:24 -07:00
spi_ks8995.c spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
ste10Xp.c
swphy.c
swphy.h
teranetics.c
uPD60620.c
vitesse.c
xilinx_gmii2rgmii.c net: phy: gmii2rgmii: Support PHY loopback 2021-08-20 14:31:46 +01:00