netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 0/5] net: phy: improve and simplify phylib state machine
Date: Wed, 7 Nov 2018 20:41:52 +0100	[thread overview]
Message-ID: <922c223b-7bc0-e0ec-345d-2034b796af91@gmail.com> (raw)

This patch series is based on two axioms:

- During autoneg a PHY always reports the link being down

- Info in clause 22/45 registers doesn't allow to differentiate between
  these two states:
  1. Link is physically down
  2. A link partner is connected and PHY is autonegotiating
  In both cases "link up" and "aneg finished" bits aren't set.
  One consequence is that having separate states PHY_NOLINK and PHY_AN
  isn't needed.

By using these two axioms the state machine can be significantly
simplified.

Heiner Kallweit (5):
  net: phy: remove useless check in state machine case PHY_NOLINK
  net: phy: remove useless check in state machine case PHY_RESUMING
  net: phy: add phy_check_link_status
  net: phy: remove state PHY_AN
  net: phy: use phy_check_link_status in more places in the state machine

 drivers/net/phy/phy.c | 172 +++++++++++-------------------------------
 include/linux/phy.h   |  19 +----
 2 files changed, 46 insertions(+), 145 deletions(-)

-- 
2.19.1

             reply	other threads:[~2018-11-08  5:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 19:41 Heiner Kallweit [this message]
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
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=922c223b-7bc0-e0ec-345d-2034b796af91@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@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).