of_mdiobus_register never failed when PHY id read error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

of_mdiobus_register never failed when PHY id read error

1,346件の閲覧回数
laizhefeng
Contributor II

Hi, guys,

I have encountered a problem about the fec(freescale ethernet controller), it will cause the kernel panic when the ethernet cable repeat attached and detached for several times.

Fortunately, I finally found out the reason: the reset pin of PHY(LAN8720) in our board is connetted to a reset signal generate by a chip(SGM809), so when POR, PHY is reset automatically, in the meanwhile, the reset of PHY is out of software control. If kernel command line contain "console=/dev/null", read PHY id failed, but when "console=/dev/ttyAMA0" everything is fine, the difference between these is that the data output from UART add some delay between PHY reset and PHY id read operation.

It is easy to solve this problem when we know the reason, but what I don't understand is why of_mdiobus_register() takes it is fine when PHY id read failed and go ahead to register the enet device, if this is not a problem, why the attached/detached of enet cable cause the kernel panic?

PS:

I found that at Apr 17 2016, a kernel patch change of_mdiobus_register_{device|phy} from return "int" to "void", so I guess in the maintainer's opinion register phy should always success, in the contrast it is the responsible for fec driver to avoid kernel panic when no phy connected(PHY id read faile, etc).

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

1,104件の閲覧回数
art
NXP Employee
NXP Employee

To make me able to provide you with a reasonable answer, first of all, please specify what exactly i.MX family processor do you use. Also, please provide the part of the schematic that shows the interconnection of the PHY and the processor.


Have a great day,
Artur

0 件の賞賛
返信

1,103件の閲覧回数
laizhefeng
Contributor II

processor: imx6ul

R286 and R143 is NC.

phy.bmp

0 件の賞賛
返信