Skip to content

Commit e773119

Browse files
Rafał Miłeckidavem330
authored andcommitted
net: bgmac: postpone turning IRQs off to avoid SoC hangs
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: 3432261 ("net: bgmac: Mask interrupts during probe") Signed-off-by: Rafał Miłecki <[email protected]> Reviewed-by: Michal Kubiak <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8139dcc commit e773119

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+2
-2
lines changed

drivers/net/ethernet/broadcom/bgmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,8 +1492,6 @@ int bgmac_enet_probe(struct bgmac *bgmac)
14921492

14931493
bgmac->in_init = true;
14941494

1495-
bgmac_chip_intrs_off(bgmac);
1496-
14971495
net_dev->irq = bgmac->irq;
14981496
SET_NETDEV_DEV(net_dev, bgmac->dev);
14991497
dev_set_drvdata(bgmac->dev, bgmac);
@@ -1511,6 +1509,8 @@ int bgmac_enet_probe(struct bgmac *bgmac)
15111509
*/
15121510
bgmac_clk_enable(bgmac, 0);
15131511

1512+
bgmac_chip_intrs_off(bgmac);
1513+
15141514
/* This seems to be fixing IRQ by assigning OOB #6 to the core */
15151515
if (!(bgmac->feature_flags & BGMAC_FEAT_IDM_MASK)) {
15161516
if (bgmac->feature_flags & BGMAC_FEAT_IRQ_ID_OOB_6)

0 commit comments

Comments
 (0)