Skip to content

Commit

Permalink
net/fec_mpc52xx: Fix kernel panic on FEC error
Browse files Browse the repository at this point in the history
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 <bones@secretlab.ca>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John Bonesio authored and David S. Miller committed Oct 14, 2009
1 parent e72701a commit 37ccd92
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,12 +759,6 @@ static void mpc52xx_fec_reset(struct net_device *dev)

mpc52xx_fec_hw_init(dev);

if (priv->phydev) {
phy_stop(priv->phydev);
phy_write(priv->phydev, MII_BMCR, BMCR_RESET);
phy_start(priv->phydev);
}

bcom_fec_rx_reset(priv->rx_dmatsk);
bcom_fec_tx_reset(priv->tx_dmatsk);

Expand Down

0 comments on commit 37ccd92

Please sign in to comment.