How to deal with rare fec MDIO read timeout?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to deal with rare fec MDIO read timeout?

2,567 Views
changbaoma
Contributor III

i can reproduce in my custom im6ull+PHY-LAN8720 board after hundreds of times of cmd "ifconfig eth0 down" then "ifconfig eth0 up" , looks like:

changbaoma_0-1615347334098.png

any advise?

0 Kudos
5 Replies

2,500 Views
changbaoma
Contributor III

I solved this issue by disable LAN8720's Energy Detect Power Down (EDPD) mode. Thank you all.

0 Kudos

2,561 Views
igorpadykov
NXP Employee
NXP Employee

Hi changbaoma

 

one can look at suggestions provided on

https://www.spinics.net/lists/netdev/msg429838.html

and try latest nxp linux releases:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos

2,551 Views
changbaoma
Contributor III

Thank you @igorpadykov 

       i have try  two ways, but do not make any difference.

       1)  remove clk_ipg disable at runtime.

 --- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -4141,7 +4141,7 @@ static int __maybe_unused fec_runtime_suspend(struct device *dev)
struct fec_enet_private *fep = netdev_priv(ndev);

clk_disable_unprepare(fep->clk_ahb);
- clk_disable_unprepare(fep->clk_ipg);
+ //clk_disable_unprepare(fep->clk_ipg);
release_bus_freq(BUS_FREQ_HIGH);

       2) slow down smi clk (mdc) from 2.5MHz to 1.5MHz

i don't try the latest nxp linux releases, because my custom board not compliant fully with NXP demo board.

Any ideas?

0 Kudos

2,547 Views
igorpadykov
NXP Employee
NXP Employee

one can try to debug it using AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
https://www.nxp.com/docs/en/application-note/AN4553.pdf

 

Best regards
igor

0 Kudos

2,520 Views
changbaoma
Contributor III
the mdio timeout is came from imx6 fec controller , do you think this debug document fit for my issue?would you show me your steps?
0 Kudos