OpenCloudOS-Kernel/drivers/net
Russell King (Oracle) cc941e548b net: phy: fix IRQ-based wake-on-lan over hibernate / power off
Uwe reports:
"Most PHYs signal WoL using an interrupt. So disabling interrupts [at
shutdown] breaks WoL at least on PHYs covered by the marvell driver."

Discussing with Ioana, the problem which was trying to be solved was:
"The board in question is a LS1021ATSN which has two AR8031 PHYs that
share an interrupt line. In case only one of the PHYs is probed and
there are pending interrupts on the PHY#2 an IRQ storm will happen
since there is no entity to clear the interrupt from PHY#2's registers.
PHY#1's driver will get stuck in .handle_interrupt() indefinitely."

Further confirmation that "the two AR8031 PHYs are on the same MDIO
bus."

With WoL using interrupts to wake the system, in such a case, the
system will begin booting with an asserted interrupt. Thus, we need to
cope with an interrupt asserted during boot.

Solve this instead by disabling interrupts during PHY probe. This will
ensure in Ioana's situation that both PHYs of the same type sharing an
interrupt line on a common MDIO bus will have their interrupt outputs
disabled when the driver probes the device, but before we hook in any
interrupt handlers - thus avoiding the interrupt storm.

A better fix would be for platform firmware to disable the interrupting
devices at source during boot, before control is handed to the kernel.

Fixes: e2f016cf77 ("net: phy: add a shutdown procedure")
Link: 20230804071757.383971-1-u.kleine-koenig@pengutronix.de
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-08-13 12:27:08 +01:00
..
appletalk
arcnet leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value 2023-05-25 12:16:27 +01:00
bonding bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves 2023-08-07 12:19:16 -07:00
caif
can can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED 2023-07-20 11:12:45 +02:00
dsa net: dsa: ocelot: call dsa_tag_8021q_unregister() under rtnl_lock() on driver remove 2023-08-04 15:34:16 -07:00
ethernet net: hns3: fix strscpy causing content truncation issue 2023-08-10 11:47:56 -07:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Allocate rx indirection table size dynamically 2023-06-07 09:46:49 +01:00
ieee802154 Core WPAN changes: 2023-06-24 15:41:46 -07:00
ipa net: ipa: only reset hashed tables when supported 2023-07-25 20:34:20 -07:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-27 09:45:22 -07:00
mctp mctp i2c: Switch back to use struct i2c_driver's .probe() 2023-06-13 20:46:20 -07:00
mdio mdio: mdio-mux-mmioreg: Use of_property_read_reg() to parse "reg" 2023-06-12 10:56:01 +01:00
netdevsim netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write() 2023-07-12 12:46:35 -07:00
pcs net: pcs: Add missing put_device call in miic_create 2023-08-11 10:21:07 +01:00
phy net: phy: fix IRQ-based wake-on-lan over hibernate / power off 2023-08-13 12:27:08 +01:00
plip
ppp pptp: Fix fib lookup calls. 2023-07-04 19:39:30 +01:00
pse-pd
slip
team team: reset team's flags when down link is P2P device 2023-07-25 09:16:17 +02:00
thunderbolt
usb USB: zaurus: Add ID for A-300/B-500/C-700 2023-08-01 14:44:27 -07:00
vmxnet3 net: introduce and use skb_frag_fill_page_desc() 2023-05-13 19:47:56 +01:00
vxlan drivers: vxlan: vnifilter: free percpu vni stats on error path 2023-08-06 16:43:07 +01:00
wan net: lapbether: only support ethernet devices 2023-06-15 08:55:22 +01:00
wireguard wireguard: allowedips: expand maximum node depth 2023-08-07 12:26:57 -07:00
wireless wifi: ath12k: Fix buffer overflow when scanning with extraie 2023-08-09 14:44:14 +02:00
wwan Networking changes for 6.5. 2023-06-28 16:43:10 -07:00
xen-netback xen/netback: Fix buffer overrun triggered by unusual packet 2023-08-03 09:04:08 +02:00
Kconfig net: veth: make PAGE_POOL_STATS optional 2023-05-10 09:57:39 +01:00
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-06-24 15:20:42 -07:00
ifb.c
loopback.c
macsec.c macsec: use DEV_STATS_INC() 2023-08-06 13:19:57 +01:00
macvlan.c macvlan: add forgotten nla_policy for IFLA_MACVLAN_BC_CUTOFF 2023-07-25 19:48:50 -07:00
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Fix module_init problem 2023-07-08 11:03:53 -04:00
rionet.c
sb1000.c
sungem_phy.c
tap.c net: tap_open(): set sk_uid from current_fsuid() 2023-08-02 10:06:06 +01:00
tun.c drivers: net: prevent tun_build_skb() to exceed the packet size limit 2023-08-07 19:14:41 -07:00
veth.c net: veth: make PAGE_POOL_STATS optional 2023-05-10 09:57:39 +01:00
virtio_net.c virtio-net: set queues after driver_ok 2023-08-11 09:50:14 +01:00
vrf.c vrf: Fix lockdep splat in output path 2023-07-18 12:49:57 +02:00
vsockmon.c
xen-netfront.c