Patch "net: phy: marvell: Limit errata to 88m1101" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: phy: marvell: Limit errata to 88m1101
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-phy-marvell-limit-errata-to-88m1101.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed May 31 09:13:34 JST 2017
From: Andrew Lunn <[email protected]>
Date: Tue, 23 May 2017 17:49:13 +0200
Subject: net: phy: marvell: Limit errata to 88m1101
From: Andrew Lunn <[email protected]>
[ Upstream commit f2899788353c13891412b273fdff5f02d49aa40f ]
The 88m1101 has an errata when configuring autoneg. However, it was being applied to many other Marvell PHYs as well. Limit its scope to just the 88m1101.
--- drivers/net/phy/marvell.c | 66 +++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 29 deletions(-)
drivers/net/phy/marvell.c +37 -29
@@ -240,34 +240,6 @@ static int marvell_config_aneg(struct ph {int err; -/* The Marvell PHY has an errata which requires -* that certain registers get written in order -* to restart autonegotiation */ - err =phy_write (phydev,MII_BMCR ,BMCR_RESET ); - -if (err <0 ) -return err; - - err =phy_write (phydev,0x1d ,0x1f ); -if (err <0 ) -return err; - - err =phy_write (phydev,0x1e ,0x200c ); -if (err <0 ) -return err; - - err =phy_write (phydev,0x1d ,0x5 ); -if (err <0 ) -return err; - - err =phy_write (phydev,0x1e ,0 ); -if (err <0 ) -return err; - - err =phy_write (phydev,0x1e ,0x100 ); -if (err <0 ) -return err; - err =marvell_set_polarity (phydev, phydev->mdix);if (err <0 )return err;
@@ -301,6 +273,42 @@ static int marvell_config_aneg(struct phreturn 0 ; } +static int m88e1101_config_aneg (struct phy_device *phydev) +{ +int err; + +/* This Marvell PHY has an errata which requires +* that certain registers get written in order +* to restart autonegotiation +*/ + err =phy_write (phydev,MII_BMCR ,BMCR_RESET ); + +if (err <0 ) +return err; + + err =phy_write (phydev,0x1d ,0x1f ); +if (err <0 ) +return err; + + err =phy_write (phydev,0x1e ,0x200c ); +if (err <0 ) +return err; + + err =phy_write (phydev,0x1d ,0x5 ); +if (err <0 ) +return err; + + err =phy_write (phydev,0x1e ,0 ); +if (err <0 ) +return err; + + err =phy_write (phydev,0x1e ,0x100 ); +if (err <0 ) +return err; + +return marvell_config_aneg (phydev); +} +static int m88e1111_config_aneg (struct phy_device *phydev) {int err;
@@ -1491,7 +1499,7 @@ static struct phy_driver marvell_drivers .probe = marvell_probe, .flags = PHY_HAS_INTERRUPT, .config_init = &marvell_config_init, - .config_aneg = &marvell_config_aneg, + .config_aneg = &m88e1101_config_aneg, .read_status = &genphy_read_status, .ack_interrupt = &marvell_ack_interrupt, .config_intr = &marvell_config_intr,
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/net-phy-marvell-limit-errata-to-88m1101.patch