From: Stas Sergeev <stsp@list.ru>
To: Florian Fainelli <f.fainelli@gmail.com>, netdev <netdev@vger.kernel.org>
Cc: Linux kernel <linux-kernel@vger.kernel.org>,
Sebastien Rannou <mxs@sbrk.org>,
Arnaud Ebalard <arno@natisbad.org>,
Stas Sergeev <stsp@users.sourceforge.net>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Grant Likely <grant.likely@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] of_mdio: add new DT property 'managed' to specify the PHY management type
Date: Tue, 14 Jul 2015 23:26:10 +0300 [thread overview]
Message-ID: <55A57062.80703@list.ru> (raw)
In-Reply-To: <55A54C3A.1040403@gmail.com>
14.07.2015 20:51, Florian Fainelli пишет:
> On 14/07/15 10:13, Stas Sergeev wrote:
>> Currently the PHY management type is selected by the MAC driver arbitrary.
>> The decision is based on the presence of the "fixed-link" node and on a
>> will of the driver's authors.
>> This caused a regression recently, when mvneta driver suddenly started
>> to use the in-band status for auto-negotiation on fixed links.
>> It appears the auto-negotiation may not work when expected by the MAC driver.
>> Sebastien Rannou explains:
>> << Yes, I confirm that my HW does not generate an in-band status. AFAIK, it's
>> a PHY that aggregates 4xSGMIIs to 1xQSGMII ; the MAC side of the PHY (with
>> inband status) is connected to the switch through QSGMII, and in this context
>> we are on the media side of the PHY. >>
>> https://lkml.org/lkml/2015/7/10/206
>>
>> This patch introduces the new string property 'managed' that allows
>> the user to set the management type explicitly.
>> The supported values are:
>> "auto" - default. Uses either MDIO or nothing, depending on the presence
>> of the fixed-link node
>> "mdio" - use MDIO
>> "in-band-status" - use in-band status
>> "none" - use fixed-link description
> I thought we agreed in the last thread that "mdio" was implied whenever
> a proper PHY phandle to a device sitting on MDIO bus is used and that
> "auto" did not make much sense unless we were also describing how to do
> this auto-negotiation completely?
Exactly not:
---
> If we would implement autoneg outside of the fixed-link,
> then its semantic would likely be
> autoneg = "mdio" | "in-band" | "off"
Right, if auto-negotiation was defined outside of fixed-link, that is
indeed how I would also specify this.
---
That's why I implemented it the way you see.
But as you changed your mind, I'll remove "mdio".
> As mentioned below, "mdio" is redundant with finding a "phy-handle",
> and "auto" is not specific enough to be useful to a consumer of this
> information.
I prefer to keep "auto", as otherwise we'll have the default
value (when the option is not specified) never achievable
when the option _is_ specified, which is probably not very
good. But I can remove "none" instead, leaving only
"in-band-status" and "auto". Ok?
Of course one can propose to completely ignore that option
in presence of MDIO, but I wonder why not to allow for
example to opt for in-band status even if you have MDIO?
So if we want this option to play nicely with MDIO, as opposed
to being entirely overridden, then "auto" still makes sense IMO.
next prev parent reply other threads:[~2015-07-14 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <55A5424D.4030809@list.ru>
2015-07-14 17:13 ` [PATCH 2/3] of_mdio: add new DT property 'managed' to specify the PHY management type Stas Sergeev
[not found] ` <55A5432C.1080609-cmBhpYW9OiY@public.gmane.org>
2015-07-14 17:51 ` Florian Fainelli
2015-07-14 20:26 ` Stas Sergeev [this message]
[not found] <55A7C45F.1070501@list.ru>
[not found] ` <55A7C45F.1070501-cmBhpYW9OiY@public.gmane.org>
2015-07-16 14:52 ` Stas Sergeev
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=55A57062.80703@list.ru \
--to=stsp@list.ru \
--cc=arno@natisbad.org \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mxs@sbrk.org \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=stsp@users.sourceforge.net \
/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).