net: bgmac: postpone turning IRQs off to avoid SoC hangs
authorRafał Miłecki <rafal@milecki.pl>
Fri, 7 Jul 2023 06:53:25 +0000 (08:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:23 +0000 (13:49 +0200)
commit685b57a1221c38ec8b456f968264d2496715820c
tree4e29467c40c86d45ae3d63b6a31b32d6f7feda54
parentdc470466753ad0dd3a8c48aaefa05a992c119b9c
net: bgmac: postpone turning IRQs off to avoid SoC hangs

[ Upstream commit e7731194fdf085f46d58b1adccfddbd0dfee4873 ]

Turning IRQs off is done by accessing Ethernet controller registers.
That can't be done until device's clock is enabled. It results in a SoC
hang otherwise.

This bug remained unnoticed for years as most bootloaders keep all
Ethernet interfaces turned on. It seems to only affect a niche SoC
family BCM47189. It has two Ethernet controllers but CFE bootloader uses
only the first one.

Fixes: 34322615cbaa ("net: bgmac: Mask interrupts during probe")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/broadcom/bgmac.c