[<prev] [next>] [day] [month] [year] [list]
Message-ID: <743ba788-6794-4eba-4fed-b2c019273b35@arf.net.pl>
Date: Sat, 29 Aug 2020 00:21:59 +0200
From: Adam Rudziński <adam.rudzinski@....net.pl>
To: netdev@...r.kernel.org
Cc: robh+dt@...nel.org, frowand.list@...il.com, f.fainelli@...il.com,
andrew@...n.ch
Subject: proposed modification of drivers/of/of_mdio.c and
include/linux/of_mdio.h
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
Powered by blists - more mailing lists