From: "Adam Rudziński" <adam.rudzinski@arf.net.pl>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev@vger.kernel.org
Cc: andrew@lunn.ch, m.felsch@pengutronix.de, hkallweit1@gmail.com,
richard.leitner@skidata.com, zhengdejin5@gmail.com,
devicetree@vger.kernel.org, kernel@pengutronix.de,
kuba@kernel.org, robh+dt@kernel.org
Subject: Re: [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe
Date: Fri, 4 Sep 2020 08:19:16 +0200 [thread overview]
Message-ID: <307b343b-2e8d-cb20-c22f-0e80acdf1dc9@arf.net.pl> (raw)
In-Reply-To: <cc6fc0f6-d4ae-9fa1-052d-6ab8e00ab32f@gmail.com>
W dniu 2020-09-04 o 06:04, Florian Fainelli pisze:
>
>
> On 9/2/2020 9:39 PM, Florian Fainelli wrote:
>> Hi all,
>>
>> This patch series takes care of enabling the Ethernet PHY clocks in
>> DT-based systems (we have no way to do it for ACPI, and ACPI would
>> likely keep all of this hardware enabled anyway).
>>
>> Please test on your respective platforms, mine still seems to have
>> a race condition that I am tracking down as it looks like we are not
>> waiting long enough post clock enable.
>>
>> The check on the clock reference count is necessary to avoid an
>> artificial bump of the clock reference count and to support the unbind
>> -> bind of the PHY driver. We could solve it in different ways.
>>
>> Comments and test results welcome!
>
> Andrew, while we figure out a proper way to support this with the
> Linux device driver model, would you be opposed in a single patch to
> drivers/net/mdio/mdio-bcm-unimac.c which takes care of enabling the
> PHY's clock during bus->reset just for the sake of getting those
> systems to work, and later on we move over to the pre-probe mechanism?
>
> That would allow me to continue working with upstream kernels on these
> systems without carrying a big pile of patches.
Just a bunch of questions.
Actually, why is it necessary to have a full MDIO bus scan already
during probing peripherals?
If during probing the peripherals enable their resources (like clocks),
what's wrong in having the full MDIO bus scan after probing of all
peripherals is complete (and all peripherals are up)?
Also, what's wrong in letting the MDIO bus scan find only some PHYs in
the first go, and then letting each driver instance (of particular
peripheral) initiate scan only for its specific PHY, if it was not found
yet?
(Is it thatof_mdio.h provides public function of_mdiobus_register, but
not something similar to add only specific devices/phys without
destroying the existing state?)
I'd say that it is not necessary to have a PHY getting found before it
is needed to setup the complete interface.
Best regards,
Adam
next prev parent reply other threads:[~2020-09-04 6:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 4:39 [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe Florian Fainelli
2020-09-03 4:39 ` [PATCH net-next 1/3] " Florian Fainelli
2020-09-03 20:39 ` Andrew Lunn
2020-09-03 21:25 ` Andrew Lunn
2020-09-03 21:28 ` Rob Herring
2020-09-03 21:42 ` Andrew Lunn
2020-09-03 21:50 ` Florian Fainelli
2020-09-03 21:43 ` Florian Fainelli
2020-09-03 4:39 ` [PATCH net-next 2/3] net: phy: mdio-bcm-unimac: Enable GPHY resources during bus reset Florian Fainelli
2020-09-03 4:39 ` [PATCH net-next 3/3] net: phy: bcm7xxx: request and manage GPHY clock Florian Fainelli
2020-09-04 6:15 ` Marco Felsch
2020-09-04 15:37 ` Florian Fainelli
2020-09-07 7:34 ` Marco Felsch
2020-09-07 19:07 ` Marco Felsch
2020-09-04 6:18 ` Marco Felsch
2020-09-04 15:38 ` Florian Fainelli
2020-09-07 7:37 ` Marco Felsch
2020-09-04 4:04 ` [PATCH net-next 0/3] net: phy: Support enabling clocks prior to bus probe Florian Fainelli
2020-09-04 6:19 ` Adam Rudziński [this message]
2020-09-04 13:45 ` Andrew Lunn
2020-09-04 14:00 ` Adam Rudziński
2020-09-04 14:23 ` Andrew Lunn
2020-09-04 17:21 ` Adam Rudziński
2020-09-04 13:58 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=307b343b-2e8d-cb20-c22f-0e80acdf1dc9@arf.net.pl \
--to=adam.rudzinski@arf.net.pl \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=richard.leitner@skidata.com \
--cc=robh+dt@kernel.org \
--cc=zhengdejin5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).