* [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
@ 2009-10-14 17:43 Grant Likely
2009-10-14 19:11 ` Wolfgang Grandegger
2009-10-14 22:10 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Grant Likely @ 2009-10-14 17:43 UTC (permalink / raw)
To: linuxppc-dev, netdev, davem; +Cc: John Bonesio
From: John Bonesio <bones@secretlab.ca>
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>
---
v2: fixed stupid misspelling of John's email address. No changes to content.
drivers/net/fec_mpc52xx.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index c40113f..66dace6 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -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);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
2009-10-14 17:43 [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error Grant Likely
@ 2009-10-14 19:11 ` Wolfgang Grandegger
2009-10-14 19:32 ` Grant Likely
2009-10-14 22:10 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2009-10-14 19:11 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, netdev, davem, John Bonesio
Grant Likely wrote:
> From: John Bonesio <bones@secretlab.ca>
>
> 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.
There is also no need to free and re-allocate the RX buffers in
mpc52xx_fec_reset().
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
2009-10-14 19:11 ` Wolfgang Grandegger
@ 2009-10-14 19:32 ` Grant Likely
0 siblings, 0 replies; 4+ messages in thread
From: Grant Likely @ 2009-10-14 19:32 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: John Bonesio, netdev, linuxppc-dev, davem
On Wed, Oct 14, 2009 at 1:11 PM, Wolfgang Grandegger <wg@grandegger.com> wrote:
> Grant Likely wrote:
>> From: John Bonesio <bones@secretlab.ca>
>>
>> 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.
>
> There is also no need to free and re-allocate the RX buffers in
> mpc52xx_fec_reset().
Write and test a patch for me! :-)
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error
2009-10-14 17:43 [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error Grant Likely
2009-10-14 19:11 ` Wolfgang Grandegger
@ 2009-10-14 22:10 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-10-14 22:10 UTC (permalink / raw)
To: grant.likely; +Cc: bones, netdev, linuxppc-dev
From: Grant Likely <grant.likely@secretlab.ca>
Date: Wed, 14 Oct 2009 11:43:43 -0600
> From: John Bonesio <bones@secretlab.ca>
>
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-14 22:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14 17:43 [PATCH v2] net/fec_mpc52xx: Fix kernel panic on FEC error Grant Likely
2009-10-14 19:11 ` Wolfgang Grandegger
2009-10-14 19:32 ` Grant Likely
2009-10-14 22:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).