From: Andrew Lunn <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine
Date: Wed, 7 Nov 2018 21:21:56 +0100 [thread overview]
Message-ID: <20181107202156.GD9599@lunn.ch> (raw)
In-Reply-To: <5c2d1fba-0c94-210f-0d9b-e1d8f70fbee0@gmail.com>
On Wed, Nov 07, 2018 at 09:05:49PM +0100, Heiner Kallweit wrote:
> On 07.11.2018 20:48, Andrew Lunn wrote:
> > On Wed, Nov 07, 2018 at 08:41:52PM +0100, Heiner Kallweit wrote:
> >> This patch series is based on two axioms:
> >>
> >> - During autoneg a PHY always reports the link being down
> >
> > Hi Heiner
> >
> > I think that is a risky assumption to make.
> >
> I wasn't sure initially too (found no clear rule in 802.3 clause 22)
> and therefore asked around. Florian agrees to the assumption,
> see here: https://www.spinics.net/lists/netdev/msg519242.html
>
> If a PHY reports the link as up then every user would assume that
> data can be transferred. But that's not the case during aneg.
> Therefore reporting the link as up during aneg wouldn't make sense.
Hi Heiner
If auto-neg has already been completed once before, i can see a lazy
hardware designed not reporting link down, or at least, not until
auto-neg actually fails.
And what about if link is down for too short a time for us to notice?
I've seen some code fail because the kernel went off and did something
else for too long, and a state change was missed.
> > What happens if this assumption is incorrect?
> >
> Then we have to flush this patch series down the drain ;)
> At least I would have to check in detail which parts need to be
> changed. I clearly mention the assumptions so that every
> reviewer can check whether he agrees.
Thanks for doing that. I want to be happy this is safe, and not going
to introduce regressions.
Andrew
next prev parent reply other threads:[~2018-11-08 5:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 19:41 [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine Heiner Kallweit
2018-11-07 19:43 ` [PATCH net-next 1/5] net: phy: remove useless check in state machine case PHY_NOLINK Heiner Kallweit
2018-11-07 19:44 ` [PATCH net-next 2/5] net: phy: remove useless check in state machine case PHY_RESUMING Heiner Kallweit
2018-11-07 19:45 ` [PATCH net-next 3/5] net: phy: add phy_check_link_status Heiner Kallweit
2018-11-07 19:46 ` [PATCH net-next 4/5] net: phy: remove state PHY_AN Heiner Kallweit
2018-11-07 19:47 ` [PATCH net-next 5/5] net: phy: use phy_check_link_status in more places in the state machine Heiner Kallweit
2018-11-07 19:48 ` [PATCH net-next 0/5] net: phy: improve and simplify phylib " Andrew Lunn
2018-11-07 20:05 ` Heiner Kallweit
2018-11-07 20:21 ` Andrew Lunn [this message]
2018-11-07 20:45 ` Heiner Kallweit
2018-11-08 7:20 ` Heiner Kallweit
2018-11-08 22:58 ` David Miller
2018-11-08 23:00 ` Florian Fainelli
2018-11-08 23:01 ` Andrew Lunn
2018-11-08 23:04 ` David Miller
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=20181107202156.GD9599@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=netdev@vger.kernel.org \
/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).