Thread (1 message) 1 message, 1 author, 2020-08-28

proposed modification of drivers/of/of_mdio.c and include/linux/of_mdio.h

From: Adam Rudziński <hidden>
Date: 2020-08-28 23:21:01

Hi,

I have found that a device with two Ethernet interfaces may have a 
problem with bringing up both interfaces on fresh boot (after power-on). 
According to my investigation, the problem is caused by probing PHYs on 
shared MDIO bus while one PHY still has no clock provided.

The possible workarounds are: reset or relying on u-boot for 
initialization of the clocks. However, they are unacceptable or dangerous.

In my opinion with the current kernel the Ethernet driver has no way of 
doing the thing right, because of_mdio.c allows only "full service" of 
new MDIO bus. I have implemented such modification for my designed 
device (where I encountered the problem), and now it works fine.

The proposed modification essentially comes down to making a part of 
of_mdiobus_register a separate public function (with prototype in the 
header file of_mdio.h). This new function only registers child nodes of 
mdio node from device tree. This enables the ethernet driver to add new 
PHYs to already registered MDIO bus. This is necessary to utilize a 
shared MDIO bus.

Please, let me know how I could or should send my proposed modification. 
My code is derived from kernel 4.19.35 taken from SomLabs' repository. 
Should I clone/fork a specific repo or make a branch in a repo, 
implement the changes there and create a pull-request? Should I send a 
patch versus some specific branch or commit? Or, should I just paste the 
relevant parts of code in a next email (or add as an attachment to an 
email)?

Best regards,
Adam
---------------------
Adam Rudziński
A.R.f.
http://arf.net.pl
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help