netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/11] phylib consolidation
@ 2019-12-17 13:38 Russell King - ARM Linux admin
  2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
                   ` (11 more replies)
  0 siblings, 12 replies; 33+ messages in thread
From: Russell King - ARM Linux admin @ 2019-12-17 13:38 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Hi,

Over the last few releases, there has been a push to clean up and
consolidate the phylib code. Some cases have been missed, and this
series catches those cases.

1. Remove redundant .aneg_done initialisers; calling genphy_aneg_done()
   for clause 22 PHYs is the default when .aneg_done is not set.

2. Some PHY drivers manually set phydev->pause and phydev->asym_pause,
   but we have a helper for this - phy_resolve_aneg_pause(), introduced
   in 2d880b8709c0 ("net: phy: extract pause mode").  Use this in the
   lxt, marvell and uPD60620 drivers.

   Incidentally, this brings up the question whether marvell fiber mode
   is correctly interpreting and advertising the pause parameters.

3. Add a genphy_check_and_restart_aneg() helper, which complements the
   clause 45 version of this. This will be useful for PHY drivers that
   open code this logic (e.g. marvell.c)

4. Add a genphy_read_status_fixed() helper to read the fixed-mode
   status from a clause 22 PHY.  lxt and marvell both contain copies
   of this code, so convert them over.

5. Arrange marvell driver to use genphy_read_lpa() for copper mode.
   This needs some rearrangement of the code in
   marvell_read_status_page_an(), but preserves using the PHY specific
   status register to derive the current negotiation results.

6. Simplify the marvell driver so we can use the
   genphy_read_status_fixed() helper directly rather than
   marvell_read_status_page_fixed().

7. Use positive logic in the marvell driver to determine the link
   state, and get rid of the REGISTER_LINK_STATUS definition; we
   already have a definition for this.

8. The marvell driver reads the PHY specific status register multiple
   times when determining the status: once in marvell_update_link()
   and again in marvell_read_status_page_an(). This is a waste;
   rearrange to read the status register once, and pass its value into
   marvell_read_status_page_an().  We preserve using
   genphy_update_link() for the copper side.

9. The marvell driver was using private clause 37 definitions, but we
   have clause 37 definitions in uapi/linux/mii.h. Use the generic
   definitions.

10. Switch the marvell driver to use phy_modify_changed() to modify
    the fiber advertisement.

11. Switch the marvell driver to use genphy_check_and_restart_aneg()
    introduced above rather than open-coding this functionality.

 drivers/net/phy/lxt.c        |  24 +----
 drivers/net/phy/marvell.c    | 209 ++++++++++++-------------------------------
 drivers/net/phy/mscc.c       |   6 --
 drivers/net/phy/phy_device.c |  98 +++++++++++++-------
 drivers/net/phy/uPD60620.c   |   7 +-
 include/linux/phy.h          |   2 +
 6 files changed, 129 insertions(+), 217 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:35   ` Andrew Lunn
  2019-12-17 17:25   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause() Russell King
                   ` (10 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Remove initialisers that set .aneg_done to genphy_aneg_done - this is
the default for clause 22 PHYs, so the initialiser is redundant.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/mscc.c       | 6 ------
 drivers/net/phy/phy_device.c | 1 -
 2 files changed, 7 deletions(-)

diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c
index 7ada1fd9ca71..374d71c3560b 100644
--- a/drivers/net/phy/mscc.c
+++ b/drivers/net/phy/mscc.c
@@ -2352,7 +2352,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init	= &vsc85xx_config_init,
 	.config_aneg    = &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt	= &vsc85xx_ack_interrupt,
 	.config_intr	= &vsc85xx_config_intr,
@@ -2377,7 +2376,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init    = &vsc85xx_config_init,
 	.config_aneg    = &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt  = &vsc85xx_ack_interrupt,
 	.config_intr    = &vsc85xx_config_intr,
@@ -2402,7 +2400,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init	= &vsc85xx_config_init,
 	.config_aneg	= &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt	= &vsc85xx_ack_interrupt,
 	.config_intr	= &vsc85xx_config_intr,
@@ -2427,7 +2424,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init    = &vsc85xx_config_init,
 	.config_aneg    = &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt  = &vsc85xx_ack_interrupt,
 	.config_intr    = &vsc85xx_config_intr,
@@ -2452,7 +2448,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init    = &vsc8584_config_init,
 	.config_aneg    = &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt  = &vsc85xx_ack_interrupt,
 	.config_intr    = &vsc85xx_config_intr,
@@ -2478,7 +2473,6 @@ static struct phy_driver vsc85xx_driver[] = {
 	.soft_reset	= &genphy_soft_reset,
 	.config_init    = &vsc8584_config_init,
 	.config_aneg    = &vsc85xx_config_aneg,
-	.aneg_done	= &genphy_aneg_done,
 	.read_status	= &vsc85xx_read_status,
 	.ack_interrupt  = &vsc85xx_ack_interrupt,
 	.config_intr    = &vsc85xx_config_intr,
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 7350ea7a8cb6..e9520e065691 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -2452,7 +2452,6 @@ static struct phy_driver genphy_driver = {
 	.name		= "Generic PHY",
 	.soft_reset	= genphy_no_soft_reset,
 	.get_features	= genphy_read_abilities,
-	.aneg_done	= genphy_aneg_done,
 	.suspend	= genphy_suspend,
 	.resume		= genphy_resume,
 	.set_loopback   = genphy_loopback,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
  2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:38   ` Andrew Lunn
  2019-12-17 17:26   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg() Russell King
                   ` (9 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Several drivers code their own version of this, working from the LPA
register, after setting the ethtool link partner advertisement bitmask.
Use the generic function instead.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/lxt.c      | 5 +----
 drivers/net/phy/marvell.c  | 5 +----
 drivers/net/phy/uPD60620.c | 7 +------
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 356bd6472f49..30172852e36e 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -190,10 +190,7 @@ static int lxt973a2_read_status(struct phy_device *phydev)
 				phydev->duplex = DUPLEX_FULL;
 		}
 
-		if (phydev->duplex == DUPLEX_FULL) {
-			phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0;
-			phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0;
-		}
+		phy_resolve_aneg_pause(phydev);
 	} else {
 		int bmcr = phy_read(phydev, MII_BMCR);
 
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index b55b07edcd67..fa1b9c7bbf6c 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1260,10 +1260,7 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 		mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa);
 		mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, lpagb);
 
-		if (phydev->duplex == DUPLEX_FULL) {
-			phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0;
-			phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0;
-		}
+		phy_resolve_aneg_pause(phydev);
 	} else {
 		/* The fiber link is only 1000M capable */
 		fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa);
diff --git a/drivers/net/phy/uPD60620.c b/drivers/net/phy/uPD60620.c
index a32b3fd8a370..38834347a427 100644
--- a/drivers/net/phy/uPD60620.c
+++ b/drivers/net/phy/uPD60620.c
@@ -68,12 +68,7 @@ static int upd60620_read_status(struct phy_device *phydev)
 			mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising,
 						  phy_state);
 
-			if (phydev->duplex == DUPLEX_FULL) {
-				if (phy_state & LPA_PAUSE_CAP)
-					phydev->pause = 1;
-				if (phy_state & LPA_PAUSE_ASYM)
-					phydev->asym_pause = 1;
-			}
+			phy_resolve_aneg_pause(phydev);
 		}
 	}
 	return 0;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
  2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
  2019-12-17 13:39 ` [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause() Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:41   ` Andrew Lunn
  2019-12-17 17:27   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed() Russell King
                   ` (8 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Add a helper for restarting autonegotiation(), similar to the clause 45
variant.  Use it in __genphy_config_aneg()

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phy_device.c | 48 +++++++++++++++++++++++-------------
 include/linux/phy.h          |  1 +
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e9520e065691..e5854508627b 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1736,6 +1736,36 @@ int genphy_restart_aneg(struct phy_device *phydev)
 }
 EXPORT_SYMBOL(genphy_restart_aneg);
 
+/**
+ * genphy_check_and_restart_aneg - Enable and restart auto-negotiation
+ * @phydev: target phy_device struct
+ * @restart: whether aneg restart is requested
+ *
+ * Check, and restart auto-negotiation if needed.
+ */
+int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart)
+{
+	int ret = 0;
+
+	if (!restart) {
+		/* Advertisement hasn't changed, but maybe aneg was never on to
+		 * begin with?  Or maybe phy was isolated?
+		 */
+		ret = phy_read(phydev, MII_BMCR);
+		if (ret < 0)
+			return ret;
+
+		if (!(ret & BMCR_ANENABLE) || (ret & BMCR_ISOLATE))
+			restart = true;
+	}
+
+	if (restart)
+		ret = genphy_restart_aneg(phydev);
+
+	return ret;
+}
+EXPORT_SYMBOL(genphy_check_and_restart_aneg);
+
 /**
  * __genphy_config_aneg - restart auto-negotiation or write BMCR
  * @phydev: target phy_device struct
@@ -1761,23 +1791,7 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed)
 	else if (err)
 		changed = true;
 
-	if (!changed) {
-		/* Advertisement hasn't changed, but maybe aneg was never on to
-		 * begin with?  Or maybe phy was isolated?
-		 */
-		int ctl = phy_read(phydev, MII_BMCR);
-
-		if (ctl < 0)
-			return ctl;
-
-		if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE))
-			changed = true; /* do restart aneg */
-	}
-
-	/* Only restart aneg if we are advertising something different
-	 * than we were before.
-	 */
-	return changed ? genphy_restart_aneg(phydev) : 0;
+	return genphy_check_and_restart_aneg(phydev, changed);
 }
 EXPORT_SYMBOL(__genphy_config_aneg);
 
diff --git a/include/linux/phy.h b/include/linux/phy.h
index f69c0e9a0c7d..dbcd887f9015 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1095,6 +1095,7 @@ void phy_attached_info(struct phy_device *phydev);
 int genphy_read_abilities(struct phy_device *phydev);
 int genphy_setup_forced(struct phy_device *phydev);
 int genphy_restart_aneg(struct phy_device *phydev);
+int genphy_check_and_restart_aneg(struct phy_device *phydev, bool restart);
 int genphy_config_eee_advert(struct phy_device *phydev);
 int __genphy_config_aneg(struct phy_device *phydev, bool changed);
 int genphy_aneg_done(struct phy_device *phydev);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (2 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg() Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:42   ` Andrew Lunn
  2019-12-17 17:27   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa() Russell King
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

There are two drivers and generic code which contain exactly the same
code to read the status of a PHY operating without autonegotiation
enabled. Rather than duplicate this code, provide a helper to read
this information.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/lxt.c        | 19 +++-----------
 drivers/net/phy/marvell.c    | 19 +++-----------
 drivers/net/phy/phy_device.c | 49 ++++++++++++++++++++++++------------
 include/linux/phy.h          |  1 +
 4 files changed, 41 insertions(+), 47 deletions(-)

diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 30172852e36e..fec58ad69e02 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -192,22 +192,9 @@ static int lxt973a2_read_status(struct phy_device *phydev)
 
 		phy_resolve_aneg_pause(phydev);
 	} else {
-		int bmcr = phy_read(phydev, MII_BMCR);
-
-		if (bmcr < 0)
-			return bmcr;
-
-		if (bmcr & BMCR_FULLDPLX)
-			phydev->duplex = DUPLEX_FULL;
-		else
-			phydev->duplex = DUPLEX_HALF;
-
-		if (bmcr & BMCR_SPEED1000)
-			phydev->speed = SPEED_1000;
-		else if (bmcr & BMCR_SPEED100)
-			phydev->speed = SPEED_100;
-		else
-			phydev->speed = SPEED_10;
+		err = genphy_read_status_fixed(phydev);
+		if (err < 0)
+			return err;
 
 		phydev->pause = phydev->asym_pause = 0;
 		linkmode_zero(phydev->lp_advertising);
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index fa1b9c7bbf6c..fa0ec116960e 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1283,22 +1283,11 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 
 static int marvell_read_status_page_fixed(struct phy_device *phydev)
 {
-	int bmcr = phy_read(phydev, MII_BMCR);
-
-	if (bmcr < 0)
-		return bmcr;
-
-	if (bmcr & BMCR_FULLDPLX)
-		phydev->duplex = DUPLEX_FULL;
-	else
-		phydev->duplex = DUPLEX_HALF;
+	int err;
 
-	if (bmcr & BMCR_SPEED1000)
-		phydev->speed = SPEED_1000;
-	else if (bmcr & BMCR_SPEED100)
-		phydev->speed = SPEED_100;
-	else
-		phydev->speed = SPEED_10;
+	err = genphy_read_status_fixed(phydev);
+	if (err < 0)
+		return err;
 
 	phydev->pause = 0;
 	phydev->asym_pause = 0;
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index e5854508627b..86a0f5f77278 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1897,6 +1897,36 @@ int genphy_read_lpa(struct phy_device *phydev)
 }
 EXPORT_SYMBOL(genphy_read_lpa);
 
+/**
+ * genphy_read_status_fixed - read the link parameters for !aneg mode
+ * @phydev: target phy_device struct
+ *
+ * Read the current duplex and speed state for a PHY operating with
+ * autonegotiation disabled.
+ */
+int genphy_read_status_fixed(struct phy_device *phydev)
+{
+	int bmcr = phy_read(phydev, MII_BMCR);
+
+	if (bmcr < 0)
+		return bmcr;
+
+	if (bmcr & BMCR_FULLDPLX)
+		phydev->duplex = DUPLEX_FULL;
+	else
+		phydev->duplex = DUPLEX_HALF;
+
+	if (bmcr & BMCR_SPEED1000)
+		phydev->speed = SPEED_1000;
+	else if (bmcr & BMCR_SPEED100)
+		phydev->speed = SPEED_100;
+	else
+		phydev->speed = SPEED_10;
+
+	return 0;
+}
+EXPORT_SYMBOL(genphy_read_status_fixed);
+
 /**
  * genphy_read_status - check the link status and update current link state
  * @phydev: target phy_device struct
@@ -1931,22 +1961,9 @@ int genphy_read_status(struct phy_device *phydev)
 	if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete) {
 		phy_resolve_aneg_linkmode(phydev);
 	} else if (phydev->autoneg == AUTONEG_DISABLE) {
-		int bmcr = phy_read(phydev, MII_BMCR);
-
-		if (bmcr < 0)
-			return bmcr;
-
-		if (bmcr & BMCR_FULLDPLX)
-			phydev->duplex = DUPLEX_FULL;
-		else
-			phydev->duplex = DUPLEX_HALF;
-
-		if (bmcr & BMCR_SPEED1000)
-			phydev->speed = SPEED_1000;
-		else if (bmcr & BMCR_SPEED100)
-			phydev->speed = SPEED_100;
-		else
-			phydev->speed = SPEED_10;
+		err = genphy_read_status_fixed(phydev);
+		if (err < 0)
+			return err;
 	}
 
 	return 0;
diff --git a/include/linux/phy.h b/include/linux/phy.h
index dbcd887f9015..11d25556f803 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1101,6 +1101,7 @@ int __genphy_config_aneg(struct phy_device *phydev, bool changed);
 int genphy_aneg_done(struct phy_device *phydev);
 int genphy_update_link(struct phy_device *phydev);
 int genphy_read_lpa(struct phy_device *phydev);
+int genphy_read_status_fixed(struct phy_device *phydev);
 int genphy_read_status(struct phy_device *phydev);
 int genphy_suspend(struct phy_device *phydev);
 int genphy_resume(struct phy_device *phydev);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (3 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed() Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:44   ` Andrew Lunn
  2019-12-17 17:30   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier Russell King
                   ` (6 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Rearrange the Marvell PHY driver to use genphy_read_lpa() rather than
open-coding this functionality.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 66 +++++++++++++++++++--------------------
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index fa0ec116960e..18080d9c0cd9 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1219,52 +1219,30 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 {
 	int status;
 	int lpa;
-	int lpagb;
+	int err;
 
 	status = phy_read(phydev, MII_M1011_PHY_STATUS);
 	if (status < 0)
 		return status;
 
-	lpa = phy_read(phydev, MII_LPA);
-	if (lpa < 0)
-		return lpa;
-
-	lpagb = phy_read(phydev, MII_STAT1000);
-	if (lpagb < 0)
-		return lpagb;
-
-	if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
-		phydev->duplex = DUPLEX_FULL;
-	else
-		phydev->duplex = DUPLEX_HALF;
-
-	status = status & MII_M1011_PHY_STATUS_SPD_MASK;
-	phydev->pause = 0;
-	phydev->asym_pause = 0;
-
-	switch (status) {
-	case MII_M1011_PHY_STATUS_1000:
-		phydev->speed = SPEED_1000;
-		break;
-
-	case MII_M1011_PHY_STATUS_100:
-		phydev->speed = SPEED_100;
-		break;
-
-	default:
-		phydev->speed = SPEED_10;
-		break;
-	}
-
 	if (!fiber) {
-		mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa);
-		mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, lpagb);
+		err = genphy_read_lpa(phydev);
+		if (err < 0)
+			return err;
 
+		phydev->pause = 0;
+		phydev->asym_pause = 0;
 		phy_resolve_aneg_pause(phydev);
 	} else {
+		lpa = phy_read(phydev, MII_LPA);
+		if (lpa < 0)
+			return lpa;
+
 		/* The fiber link is only 1000M capable */
 		fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa);
 
+		phydev->pause = 0;
+		phydev->asym_pause = 0;
 		if (phydev->duplex == DUPLEX_FULL) {
 			if (!(lpa & LPA_PAUSE_FIBER)) {
 				phydev->pause = 0;
@@ -1278,6 +1256,26 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 			}
 		}
 	}
+
+	if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
+		phydev->duplex = DUPLEX_FULL;
+	else
+		phydev->duplex = DUPLEX_HALF;
+
+	switch (status & MII_M1011_PHY_STATUS_SPD_MASK) {
+	case MII_M1011_PHY_STATUS_1000:
+		phydev->speed = SPEED_1000;
+		break;
+
+	case MII_M1011_PHY_STATUS_100:
+		phydev->speed = SPEED_100;
+		break;
+
+	default:
+		phydev->speed = SPEED_10;
+		break;
+	}
+
 	return 0;
 }
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (4 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa() Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:45   ` Andrew Lunn
  2019-12-17 17:30   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state Russell King
                   ` (5 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Move the initialisation of the link partner state earlier, inside
marvell_read_status_page(), so we don't have the same initialisation
scattered amongst the other files.  This is in a similar place to
the genphy implementation, so would result in the same behaviour if
a PHY read error occurs.

This allows us to get rid of marvell_read_status_page_fixed(), which
became a pointless wrapper around genphy_read_status_fixed().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 25 +++++--------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 18080d9c0cd9..d57df48b3568 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1230,8 +1230,6 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 		if (err < 0)
 			return err;
 
-		phydev->pause = 0;
-		phydev->asym_pause = 0;
 		phy_resolve_aneg_pause(phydev);
 	} else {
 		lpa = phy_read(phydev, MII_LPA);
@@ -1241,8 +1239,6 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 		/* The fiber link is only 1000M capable */
 		fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa);
 
-		phydev->pause = 0;
-		phydev->asym_pause = 0;
 		if (phydev->duplex == DUPLEX_FULL) {
 			if (!(lpa & LPA_PAUSE_FIBER)) {
 				phydev->pause = 0;
@@ -1279,21 +1275,6 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
 	return 0;
 }
 
-static int marvell_read_status_page_fixed(struct phy_device *phydev)
-{
-	int err;
-
-	err = genphy_read_status_fixed(phydev);
-	if (err < 0)
-		return err;
-
-	phydev->pause = 0;
-	phydev->asym_pause = 0;
-	linkmode_zero(phydev->lp_advertising);
-
-	return 0;
-}
-
 /* marvell_read_status_page
  *
  * Description:
@@ -1319,10 +1300,14 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
 	if (err)
 		return err;
 
+	linkmode_zero(phydev->lp_advertising);
+	phydev->pause = 0;
+	phydev->asym_pause = 0;
+
 	if (phydev->autoneg == AUTONEG_ENABLE)
 		err = marvell_read_status_page_an(phydev, fiber);
 	else
-		err = marvell_read_status_page_fixed(phydev);
+		err = genphy_read_status_fixed(phydev);
 
 	return err;
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (5 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:46   ` Andrew Lunn
  2019-12-17 17:31   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 08/11] net: phy: marvell: consolidate phy status reading Russell King
                   ` (4 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Rather than using negative logic:

	if (there is no link)
		set link = 0
	else
		set link = 1

use the more natural positive logic:

	if (there is link)
		set link = 1
	else
		set link = 0

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index d57df48b3568..4eabb6a26c33 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -168,7 +168,6 @@
 #define ADVERTISE_PAUSE_FIBER		0x180
 #define ADVERTISE_PAUSE_ASYM_FIBER	0x100
 
-#define REGISTER_LINK_STATUS	0x400
 #define NB_FIBER_STATS	1
 
 MODULE_DESCRIPTION("Marvell PHY driver");
@@ -1203,10 +1202,10 @@ static int marvell_update_link(struct phy_device *phydev, int fiber)
 		if (status < 0)
 			return status;
 
-		if ((status & REGISTER_LINK_STATUS) == 0)
-			phydev->link = 0;
-		else
+		if (status & MII_M1011_PHY_STATUS_LINK)
 			phydev->link = 1;
+		else
+			phydev->link = 0;
 	} else {
 		return genphy_update_link(phydev);
 	}
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 08/11] net: phy: marvell: consolidate phy status reading
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (6 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 13:39 ` [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions Russell King
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

marvell_read_status_page_an() always reads the PHY status register, but
marvell_update_link() has already done this.  Rather than wastefully
reading the register twice in quick succession, read it once in
marvell_read_status_page() and use the result for both.

This makes marvell_update_link() rather pointless, so move it into
marvell_read_status_page().

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 60 +++++++++++----------------------------
 1 file changed, 17 insertions(+), 43 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 4eabb6a26c33..b25eee9314a7 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1183,47 +1183,12 @@ static void fiber_lpa_mod_linkmode_lpa_t(unsigned long *advertising, u32 lpa)
 			 advertising, lpa & LPA_FIBER_1000FULL);
 }
 
-/**
- * marvell_update_link - update link status in real time in @phydev
- * @phydev: target phy_device struct
- *
- * Description: Update the value in phydev->link to reflect the
- *   current link value.
- */
-static int marvell_update_link(struct phy_device *phydev, int fiber)
-{
-	int status;
-
-	/* Use the generic register for copper link, or specific
-	 * register for fiber case
-	 */
-	if (fiber) {
-		status = phy_read(phydev, MII_M1011_PHY_STATUS);
-		if (status < 0)
-			return status;
-
-		if (status & MII_M1011_PHY_STATUS_LINK)
-			phydev->link = 1;
-		else
-			phydev->link = 0;
-	} else {
-		return genphy_update_link(phydev);
-	}
-
-	return 0;
-}
-
 static int marvell_read_status_page_an(struct phy_device *phydev,
-				       int fiber)
+				       int fiber, int status)
 {
-	int status;
 	int lpa;
 	int err;
 
-	status = phy_read(phydev, MII_M1011_PHY_STATUS);
-	if (status < 0)
-		return status;
-
 	if (!fiber) {
 		err = genphy_read_lpa(phydev);
 		if (err < 0)
@@ -1284,27 +1249,36 @@ static int marvell_read_status_page_an(struct phy_device *phydev,
  */
 static int marvell_read_status_page(struct phy_device *phydev, int page)
 {
+	int status;
 	int fiber;
 	int err;
 
-	/* Detect and update the link, but return if there
-	 * was an error
+	status = phy_read(phydev, MII_M1011_PHY_STATUS);
+	if (status < 0)
+		return status;
+
+	/* Use the generic register for copper link status,
+	 * and the PHY status register for fiber link status.
 	 */
+	if (page == MII_MARVELL_FIBER_PAGE) {
+		phydev->link = !!(status & MII_M1011_PHY_STATUS_LINK);
+	} else {
+		err = genphy_update_link(phydev);
+		if (err)
+			return err;
+	}
+
 	if (page == MII_MARVELL_FIBER_PAGE)
 		fiber = 1;
 	else
 		fiber = 0;
 
-	err = marvell_update_link(phydev, fiber);
-	if (err)
-		return err;
-
 	linkmode_zero(phydev->lp_advertising);
 	phydev->pause = 0;
 	phydev->asym_pause = 0;
 
 	if (phydev->autoneg == AUTONEG_ENABLE)
-		err = marvell_read_status_page_an(phydev, fiber);
+		err = marvell_read_status_page_an(phydev, fiber, status);
 	else
 		err = genphy_read_status_fixed(phydev);
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (7 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 08/11] net: phy: marvell: consolidate phy status reading Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:47   ` Andrew Lunn
  2019-12-17 17:33   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed() Russell King
                   ` (2 subsequent siblings)
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Use existing clause 37 advertising/link partner definitions rather than
private ones for the advertisement registers.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index b25eee9314a7..2d30653ddf4b 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -156,18 +156,9 @@
 #define MII_88E1510_GEN_CTRL_REG_1_MODE_SGMII	0x1	/* SGMII to copper */
 #define MII_88E1510_GEN_CTRL_REG_1_RESET	0x8000	/* Soft reset */
 
-#define LPA_FIBER_1000HALF	0x40
-#define LPA_FIBER_1000FULL	0x20
-
 #define LPA_PAUSE_FIBER		0x180
 #define LPA_PAUSE_ASYM_FIBER	0x100
 
-#define ADVERTISE_FIBER_1000HALF	0x40
-#define ADVERTISE_FIBER_1000FULL	0x20
-
-#define ADVERTISE_PAUSE_FIBER		0x180
-#define ADVERTISE_PAUSE_ASYM_FIBER	0x100
-
 #define NB_FIBER_STATS	1
 
 MODULE_DESCRIPTION("Marvell PHY driver");
@@ -507,16 +498,15 @@ static inline u32 linkmode_adv_to_fiber_adv_t(unsigned long *advertise)
 	u32 result = 0;
 
 	if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, advertise))
-		result |= ADVERTISE_FIBER_1000HALF;
+		result |= ADVERTISE_1000XHALF;
 	if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, advertise))
-		result |= ADVERTISE_FIBER_1000FULL;
+		result |= ADVERTISE_1000XFULL;
 
 	if (linkmode_test_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT, advertise) &&
 	    linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertise))
-		result |= LPA_PAUSE_ASYM_FIBER;
+		result |= ADVERTISE_1000XPSE_ASYM;
 	else if (linkmode_test_bit(ETHTOOL_LINK_MODE_Pause_BIT, advertise))
-		result |= (ADVERTISE_PAUSE_FIBER
-			   & (~ADVERTISE_PAUSE_ASYM_FIBER));
+		result |= ADVERTISE_1000XPAUSE;
 
 	return result;
 }
@@ -549,8 +539,8 @@ static int marvell_config_aneg_fiber(struct phy_device *phydev)
 		return adv;
 
 	oldadv = adv;
-	adv &= ~(ADVERTISE_FIBER_1000HALF | ADVERTISE_FIBER_1000FULL
-		| LPA_PAUSE_FIBER);
+	adv &= ~(ADVERTISE_1000XHALF | ADVERTISE_1000XFULL |
+		 ADVERTISE_1000XPAUSE | ADVERTISE_1000XPSE_ASYM);
 	adv |= linkmode_adv_to_fiber_adv_t(phydev->advertising);
 
 	if (adv != oldadv) {
@@ -1177,10 +1167,10 @@ static int m88e6390_config_aneg(struct phy_device *phydev)
 static void fiber_lpa_mod_linkmode_lpa_t(unsigned long *advertising, u32 lpa)
 {
 	linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
-			 advertising, lpa & LPA_FIBER_1000HALF);
+			 advertising, lpa & LPA_1000XHALF);
 
 	linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
-			 advertising, lpa & LPA_FIBER_1000FULL);
+			 advertising, lpa & LPA_1000XFULL);
 }
 
 static int marvell_read_status_page_an(struct phy_device *phydev,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (8 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:48   ` Andrew Lunn
  2019-12-17 17:35   ` Florian Fainelli
  2019-12-17 13:39 ` [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg() Russell King
  2019-12-19 20:52 ` [PATCH net-next 00/11] phylib consolidation David Miller
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Use phy_modify_changed() to change the fiber advertisement register
rather than open coding this functionality.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 2d30653ddf4b..c40d49523719 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -524,7 +524,7 @@ static int marvell_config_aneg_fiber(struct phy_device *phydev)
 {
 	int changed = 0;
 	int err;
-	int adv, oldadv;
+	u16 adv;
 
 	if (phydev->autoneg != AUTONEG_ENABLE)
 		return genphy_setup_forced(phydev);
@@ -533,23 +533,17 @@ static int marvell_config_aneg_fiber(struct phy_device *phydev)
 	linkmode_and(phydev->advertising, phydev->advertising,
 		     phydev->supported);
 
-	/* Setup fiber advertisement */
-	adv = phy_read(phydev, MII_ADVERTISE);
-	if (adv < 0)
-		return adv;
-
-	oldadv = adv;
-	adv &= ~(ADVERTISE_1000XHALF | ADVERTISE_1000XFULL |
-		 ADVERTISE_1000XPAUSE | ADVERTISE_1000XPSE_ASYM);
-	adv |= linkmode_adv_to_fiber_adv_t(phydev->advertising);
-
-	if (adv != oldadv) {
-		err = phy_write(phydev, MII_ADVERTISE, adv);
-		if (err < 0)
-			return err;
+	adv = linkmode_adv_to_fiber_adv_t(phydev->advertising);
 
+	/* Setup fiber advertisement */
+	err = phy_modify_changed(phydev, MII_ADVERTISE,
+				 ADVERTISE_1000XHALF | ADVERTISE_1000XFULL |
+				 ADVERTISE_1000XPAUSE | ADVERTISE_1000XPSE_ASYM,
+				 adv);
+	if (err < 0)
+		return err;
+	if (err > 0)
 		changed = 1;
-	}
 
 	if (changed == 0) {
 		/* Advertisement hasn't changed, but maybe aneg was never on to
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg()
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (9 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed() Russell King
@ 2019-12-17 13:39 ` Russell King
  2019-12-17 15:48   ` Andrew Lunn
  2019-12-17 17:36   ` Florian Fainelli
  2019-12-19 20:52 ` [PATCH net-next 00/11] phylib consolidation David Miller
  11 siblings, 2 replies; 33+ messages in thread
From: Russell King @ 2019-12-17 13:39 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev

Use the helper to check and restart autonegotiation for the marvell
fiber page negotiation setting.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/marvell.c | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index c40d49523719..a173c05fdb4c 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -545,26 +545,7 @@ static int marvell_config_aneg_fiber(struct phy_device *phydev)
 	if (err > 0)
 		changed = 1;
 
-	if (changed == 0) {
-		/* Advertisement hasn't changed, but maybe aneg was never on to
-		 * begin with?	Or maybe phy was isolated?
-		 */
-		int ctl = phy_read(phydev, MII_BMCR);
-
-		if (ctl < 0)
-			return ctl;
-
-		if (!(ctl & BMCR_ANENABLE) || (ctl & BMCR_ISOLATE))
-			changed = 1; /* do restart aneg */
-	}
-
-	/* Only restart aneg if we are advertising something different
-	 * than we were before.
-	 */
-	if (changed > 0)
-		changed = genphy_restart_aneg(phydev);
-
-	return changed;
+	return genphy_check_and_restart_aneg(phydev, changed);
 }
 
 static int m88e1510_config_aneg(struct phy_device *phydev)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers
  2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
@ 2019-12-17 15:35   ` Andrew Lunn
  2019-12-17 17:25   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:35 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:00PM +0000, Russell King wrote:
> Remove initialisers that set .aneg_done to genphy_aneg_done - this is
> the default for clause 22 PHYs, so the initialiser is redundant.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause()
  2019-12-17 13:39 ` [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause() Russell King
@ 2019-12-17 15:38   ` Andrew Lunn
  2019-12-17 17:26   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:38 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:06PM +0000, Russell King wrote:
> Several drivers code their own version of this, working from the LPA
> register, after setting the ethtool link partner advertisement bitmask.
> Use the generic function instead.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg()
  2019-12-17 13:39 ` [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg() Russell King
@ 2019-12-17 15:41   ` Andrew Lunn
  2019-12-17 17:27   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:41 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:11PM +0000, Russell King wrote:
> Add a helper for restarting autonegotiation(), similar to the clause 45
> variant.  Use it in __genphy_config_aneg()
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed()
  2019-12-17 13:39 ` [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed() Russell King
@ 2019-12-17 15:42   ` Andrew Lunn
  2019-12-17 17:27   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:42 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:16PM +0000, Russell King wrote:
> There are two drivers and generic code which contain exactly the same
> code to read the status of a PHY operating without autonegotiation
> enabled. Rather than duplicate this code, provide a helper to read
> this information.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa()
  2019-12-17 13:39 ` [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa() Russell King
@ 2019-12-17 15:44   ` Andrew Lunn
  2019-12-17 17:30   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:44 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:21PM +0000, Russell King wrote:
> Rearrange the Marvell PHY driver to use genphy_read_lpa() rather than
> open-coding this functionality.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier
  2019-12-17 13:39 ` [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier Russell King
@ 2019-12-17 15:45   ` Andrew Lunn
  2019-12-17 17:30   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:45 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:26PM +0000, Russell King wrote:
> Move the initialisation of the link partner state earlier, inside
> marvell_read_status_page(), so we don't have the same initialisation
> scattered amongst the other files.  This is in a similar place to
> the genphy implementation, so would result in the same behaviour if
> a PHY read error occurs.
> 
> This allows us to get rid of marvell_read_status_page_fixed(), which
> became a pointless wrapper around genphy_read_status_fixed().
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state
  2019-12-17 13:39 ` [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state Russell King
@ 2019-12-17 15:46   ` Andrew Lunn
  2019-12-17 17:31   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:46 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:31PM +0000, Russell King wrote:
> Rather than using negative logic:
> 
> 	if (there is no link)
> 		set link = 0
> 	else
> 		set link = 1
> 
> use the more natural positive logic:
> 
> 	if (there is link)
> 		set link = 1
> 	else
> 		set link = 0
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions
  2019-12-17 13:39 ` [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions Russell King
@ 2019-12-17 15:47   ` Andrew Lunn
  2019-12-17 17:33   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:47 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:42PM +0000, Russell King wrote:
> Use existing clause 37 advertising/link partner definitions rather than
> private ones for the advertisement registers.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed()
  2019-12-17 13:39 ` [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed() Russell King
@ 2019-12-17 15:48   ` Andrew Lunn
  2019-12-17 17:35   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:48 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:47PM +0000, Russell King wrote:
> Use phy_modify_changed() to change the fiber advertisement register
> rather than open coding this functionality.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg()
  2019-12-17 13:39 ` [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg() Russell King
@ 2019-12-17 15:48   ` Andrew Lunn
  2019-12-17 17:36   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Andrew Lunn @ 2019-12-17 15:48 UTC (permalink / raw)
  To: Russell King; +Cc: Florian Fainelli, Heiner Kallweit, David S. Miller, netdev

On Tue, Dec 17, 2019 at 01:39:52PM +0000, Russell King wrote:
> Use the helper to check and restart autonegotiation for the marvell
> fiber page negotiation setting.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers
  2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
  2019-12-17 15:35   ` Andrew Lunn
@ 2019-12-17 17:25   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:25 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Remove initialisers that set .aneg_done to genphy_aneg_done - this is
> the default for clause 22 PHYs, so the initialiser is redundant.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause()
  2019-12-17 13:39 ` [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause() Russell King
  2019-12-17 15:38   ` Andrew Lunn
@ 2019-12-17 17:26   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:26 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Several drivers code their own version of this, working from the LPA
> register, after setting the ethtool link partner advertisement bitmask.
> Use the generic function instead.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg()
  2019-12-17 13:39 ` [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg() Russell King
  2019-12-17 15:41   ` Andrew Lunn
@ 2019-12-17 17:27   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:27 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Add a helper for restarting autonegotiation(), similar to the clause 45
> variant.  Use it in __genphy_config_aneg()
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed()
  2019-12-17 13:39 ` [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed() Russell King
  2019-12-17 15:42   ` Andrew Lunn
@ 2019-12-17 17:27   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:27 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> There are two drivers and generic code which contain exactly the same
> code to read the status of a PHY operating without autonegotiation
> enabled. Rather than duplicate this code, provide a helper to read
> this information.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa()
  2019-12-17 13:39 ` [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa() Russell King
  2019-12-17 15:44   ` Andrew Lunn
@ 2019-12-17 17:30   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:30 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Rearrange the Marvell PHY driver to use genphy_read_lpa() rather than
> open-coding this functionality.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier
  2019-12-17 13:39 ` [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier Russell King
  2019-12-17 15:45   ` Andrew Lunn
@ 2019-12-17 17:30   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:30 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Move the initialisation of the link partner state earlier, inside
> marvell_read_status_page(), so we don't have the same initialisation
> scattered amongst the other files.  This is in a similar place to
> the genphy implementation, so would result in the same behaviour if
> a PHY read error occurs.
> 
> This allows us to get rid of marvell_read_status_page_fixed(), which
> became a pointless wrapper around genphy_read_status_fixed().
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state
  2019-12-17 13:39 ` [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state Russell King
  2019-12-17 15:46   ` Andrew Lunn
@ 2019-12-17 17:31   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:31 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Rather than using negative logic:
> 
> 	if (there is no link)
> 		set link = 0
> 	else
> 		set link = 1
> 
> use the more natural positive logic:
> 
> 	if (there is link)
> 		set link = 1
> 	else
> 		set link = 0
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions
  2019-12-17 13:39 ` [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions Russell King
  2019-12-17 15:47   ` Andrew Lunn
@ 2019-12-17 17:33   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:33 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Use existing clause 37 advertising/link partner definitions rather than
> private ones for the advertisement registers.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed()
  2019-12-17 13:39 ` [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed() Russell King
  2019-12-17 15:48   ` Andrew Lunn
@ 2019-12-17 17:35   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:35 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Use phy_modify_changed() to change the fiber advertisement register
> rather than open coding this functionality.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg()
  2019-12-17 13:39 ` [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg() Russell King
  2019-12-17 15:48   ` Andrew Lunn
@ 2019-12-17 17:36   ` Florian Fainelli
  1 sibling, 0 replies; 33+ messages in thread
From: Florian Fainelli @ 2019-12-17 17:36 UTC (permalink / raw)
  To: Russell King, Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev

On 12/17/19 5:39 AM, Russell King wrote:
> Use the helper to check and restart autonegotiation for the marvell
> fiber page negotiation setting.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH net-next 00/11] phylib consolidation
  2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
                   ` (10 preceding siblings ...)
  2019-12-17 13:39 ` [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg() Russell King
@ 2019-12-19 20:52 ` David Miller
  11 siblings, 0 replies; 33+ messages in thread
From: David Miller @ 2019-12-19 20:52 UTC (permalink / raw)
  To: linux; +Cc: andrew, f.fainelli, hkallweit1, netdev

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: Tue, 17 Dec 2019 13:38:27 +0000

> Over the last few releases, there has been a push to clean up and
> consolidate the phylib code. Some cases have been missed, and this
> series catches those cases.
 ...

Series applied, thanks Russell.

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2019-12-19 20:53 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 13:38 [PATCH net-next 00/11] phylib consolidation Russell King - ARM Linux admin
2019-12-17 13:39 ` [PATCH net-next 01/11] net: phy: remove redundant .aneg_done initialisers Russell King
2019-12-17 15:35   ` Andrew Lunn
2019-12-17 17:25   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 02/11] net: phy: use phy_resolve_aneg_pause() Russell King
2019-12-17 15:38   ` Andrew Lunn
2019-12-17 17:26   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 03/11] net: phy: add genphy_check_and_restart_aneg() Russell King
2019-12-17 15:41   ` Andrew Lunn
2019-12-17 17:27   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 04/11] net: phy: provide and use genphy_read_status_fixed() Russell King
2019-12-17 15:42   ` Andrew Lunn
2019-12-17 17:27   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 05/11] net: phy: marvell: rearrange to use genphy_read_lpa() Russell King
2019-12-17 15:44   ` Andrew Lunn
2019-12-17 17:30   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 06/11] net: phy: marvell: initialise link partner state earlier Russell King
2019-12-17 15:45   ` Andrew Lunn
2019-12-17 17:30   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 07/11] net: phy: marvell: use positive logic for link state Russell King
2019-12-17 15:46   ` Andrew Lunn
2019-12-17 17:31   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 08/11] net: phy: marvell: consolidate phy status reading Russell King
2019-12-17 13:39 ` [PATCH net-next 09/11] net: phy: marvell: use existing clause 37 definitions Russell King
2019-12-17 15:47   ` Andrew Lunn
2019-12-17 17:33   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 10/11] net: phy: marvell: use phy_modify_changed() Russell King
2019-12-17 15:48   ` Andrew Lunn
2019-12-17 17:35   ` Florian Fainelli
2019-12-17 13:39 ` [PATCH net-next 11/11] net: phy: marvell: use genphy_check_and_restart_aneg() Russell King
2019-12-17 15:48   ` Andrew Lunn
2019-12-17 17:36   ` Florian Fainelli
2019-12-19 20:52 ` [PATCH net-next 00/11] phylib consolidation David Miller

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).