Skip to content

Commit 37ccd92

Browse files
John Bonesiodavem330
John Bonesio
authored andcommitted
net/fec_mpc52xx: Fix kernel panic on FEC error
The MDIO bus cannot be accessed at interrupt context, but on an FEC error, the fec_mpc52xx driver reset function also tries to reset the PHY. Since the error is detected at IRQ context, and the PHY functions try to sleep, the kernel ends up panicking. Resetting the PHY on an FEC error isn't even necessary. This patch solves the problem by removing the PHY reset entirely. Signed-off-by: John Bonesio <[email protected]> Signed-off-by: Grant Likely <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e72701a commit 37ccd92

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/net/fec_mpc52xx.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -759,12 +759,6 @@ static void mpc52xx_fec_reset(struct net_device *dev)
759759

760760
mpc52xx_fec_hw_init(dev);
761761

762-
if (priv->phydev) {
763-
phy_stop(priv->phydev);
764-
phy_write(priv->phydev, MII_BMCR, BMCR_RESET);
765-
phy_start(priv->phydev);
766-
}
767-
768762
bcom_fec_rx_reset(priv->rx_dmatsk);
769763
bcom_fec_tx_reset(priv->tx_dmatsk);
770764

0 commit comments

Comments
 (0)