mirror-linux/drivers/net
Oleksij Rempel 6d806841f1 net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver
commit fc0649395d upstream.

Fix an issue where the kernel would stall during netboot, showing the
"sched: RT throttling activated" message. This stall was triggered by
the behavior of the mii_interrupt bit (Bit 7 - DP83TD510E_STS_MII_INT)
in the DP83TD510E's PHY_STS Register (Address = 0x10). The DP83TD510E
datasheet (2020) states that the bit clears on write, however, in
practice, the bit clears on read.

This discrepancy had significant implications on the driver's interrupt
handling. The PHY_STS Register was used by handle_interrupt() to check
for pending interrupts and by read_status() to get the current link
status. The call to read_status() was unintentionally clearing the
mii_interrupt status bit without deasserting the IRQ pin, causing
handle_interrupt() to miss other pending interrupts. This issue was most
apparent during netboot.

The fix refrains from using the PHY_STS Register for interrupt handling.
Instead, we now solely rely on the INTERRUPT_REG_1 Register (Address =
0x12) and INTERRUPT_REG_2 Register (Address = 0x13) for this purpose.
These registers directly influence the IRQ pin state and are latched
high until read.

Note: The INTERRUPT_REG_2 Register (Address = 0x13) exists and can also
be used for interrupt handling, specifically for "Aneg page received
interrupt" and "Polarity change interrupt". However, these features are
currently not supported by this driver.

Fixes: 165cd04fe2 ("net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY")
Cc: <stable@vger.kernel.org>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230621043848.3806124-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-23 13:49:32 +02:00
..
appletalk
arcnet
bonding bonding: do not assume skb mac_header is set 2023-07-19 16:21:12 +02:00
caif
can can: kvaser_pciefd: Set hardware timestamp on transmitted packets 2023-07-19 16:21:11 +02:00
dsa net: dsa: qca8k: Add check for skb_copy 2023-07-23 13:49:24 +02:00
ethernet net: bcmgenet: Ensure MDIO unregistration has clocks enabled 2023-07-23 13:49:32 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154 ieee802154: hwsim: Fix possible memory leaks 2023-06-28 11:12:27 +02:00
ipa
ipvlan ipvlan: Fix return value of ipvlan_queue_xmit() 2023-07-19 16:21:13 +02:00
mctp
mdio net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe() 2023-05-24 17:32:31 +01:00
netdevsim netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write() 2023-07-23 13:49:27 +02:00
pcs net: pcs: xpcs: fix C73 AN not getting enabled 2023-05-24 17:32:47 +01:00
phy net: phy: dp83td510: fix kernel stall during netboot in DP83TD510E PHY driver 2023-07-23 13:49:32 +02:00
plip
ppp pptp: Fix fib lookup calls. 2023-07-19 16:22:06 +02:00
pse-pd
slip
team net: fix stack overflow when LRO is disabled for virtual interfaces 2023-05-30 14:03:20 +01:00
usb net: usb: qmi_wwan: add support for Compal RXM-G1 2023-06-21 16:00:56 +02:00
vmxnet3
vxlan
wan net: lapbether: only support ethernet devices 2023-06-21 16:01:02 +02:00
wireguard wireguard: netlink: send staged packets when setting initial private key 2023-07-19 16:22:17 +02:00
wireless wifi: rtw89: debug: fix error code in rtw89_debug_priv_send_h2c_set() 2023-07-23 13:49:27 +02:00
wwan net: wwan: t7xx: Ensure init is completed before system sleep 2023-06-09 10:34:15 +02:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c gtp: Fix use-after-free in __gtp_encap_destroy(). 2023-07-19 16:21:12 +02:00
ifb.c
loopback.c
macsec.c net: macsec: fix double free of percpu stats 2023-06-21 16:01:02 +02:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: add vlan_get_protocol_and_depth() helper 2023-05-24 17:32:32 +01:00
thunderbolt.c
tun.c tun: Fix memory leak for detached NAPI queue. 2023-05-24 17:32:47 +01:00
veth.c
virtio_net.c virtio_net: use control_buf for coalesce params 2023-06-14 11:15:28 +02:00
vrf.c
vsockmon.c
xen-netfront.c