diff mbox series

[net-next,2/4] net: phy: marvell: fix downshift function naming

Message ID 2cf44878-02e5-3f0f-6eec-cc9d51a18127@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series net: phy: marvell: fix and extend downshift support | expand

Commit Message

Heiner Kallweit Oct. 28, 2019, 7:52 p.m. UTC
I got access to the M88E1111 datasheet, and this PHY version uses
another register for downshift configuration. Therefore change prefix
to m88e1011, aligned with constants like MII_M1011_PHY_SCR.

Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
Reported-by: Chris Healy <Chris.Healy@zii.aero>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/phy/marvell.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

Comments

Andrew Lunn Oct. 28, 2019, 7:57 p.m. UTC | #1
On Mon, Oct 28, 2019 at 08:52:55PM +0100, Heiner Kallweit wrote:
> I got access to the M88E1111 datasheet, and this PHY version uses
> another register for downshift configuration. Therefore change prefix
> to m88e1011, aligned with constants like MII_M1011_PHY_SCR.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> Reported-by: Chris Healy <Chris.Healy@zii.aero>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

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

    Andrew
Florian Fainelli Oct. 29, 2019, 5:12 p.m. UTC | #2
On 10/28/19 12:52 PM, Heiner Kallweit wrote:
> I got access to the M88E1111 datasheet, and this PHY version uses
> another register for downshift configuration. Therefore change prefix
> to m88e1011, aligned with constants like MII_M1011_PHY_SCR.
> 
> Fixes: a3bdfce7bf9c ("net: phy: marvell: support downshift as PHY tunable")
> Reported-by: Chris Healy <Chris.Healy@zii.aero>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Providing a Fixes tag here sounds a bit excessive, but this looking good:

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

Patch

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index e77fc25ba..68ef84c23 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -784,7 +784,7 @@  static int m88e1111_config_init(struct phy_device *phydev)
 	return genphy_soft_reset(phydev);
 }
 
-static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
+static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
 {
 	int val, cnt, enable;
 
@@ -800,7 +800,7 @@  static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
 	return 0;
 }
 
-static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
+static int m88e1011_set_downshift(struct phy_device *phydev, u8 cnt)
 {
 	int val;
 
@@ -820,29 +820,29 @@  static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
 			  val);
 }
 
-static int m88e1111_get_tunable(struct phy_device *phydev,
+static int m88e1011_get_tunable(struct phy_device *phydev,
 				struct ethtool_tunable *tuna, void *data)
 {
 	switch (tuna->id) {
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_get_downshift(phydev, data);
+		return m88e1011_get_downshift(phydev, data);
 	default:
 		return -EOPNOTSUPP;
 	}
 }
 
-static int m88e1111_set_tunable(struct phy_device *phydev,
+static int m88e1011_set_tunable(struct phy_device *phydev,
 				struct ethtool_tunable *tuna, const void *data)
 {
 	switch (tuna->id) {
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_set_downshift(phydev, *(const u8 *)data);
+		return m88e1011_set_downshift(phydev, *(const u8 *)data);
 	default:
 		return -EOPNOTSUPP;
 	}
 }
 
-static void m88e1111_link_change_notify(struct phy_device *phydev)
+static void m88e1011_link_change_notify(struct phy_device *phydev)
 {
 	int status;
 
@@ -875,7 +875,7 @@  static int m88e1116r_config_init(struct phy_device *phydev)
 	if (err < 0)
 		return err;
 
-	err = m88e1111_set_downshift(phydev, 8);
+	err = m88e1011_set_downshift(phydev, 8);
 	if (err < 0)
 		return err;
 
@@ -1177,7 +1177,7 @@  static int m88e1540_get_tunable(struct phy_device *phydev,
 	case ETHTOOL_PHY_FAST_LINK_DOWN:
 		return m88e1540_get_fld(phydev, data);
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_get_downshift(phydev, data);
+		return m88e1011_get_downshift(phydev, data);
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -1190,7 +1190,7 @@  static int m88e1540_set_tunable(struct phy_device *phydev,
 	case ETHTOOL_PHY_FAST_LINK_DOWN:
 		return m88e1540_set_fld(phydev, data);
 	case ETHTOOL_PHY_DOWNSHIFT:
-		return m88e1111_set_downshift(phydev, *(const u8 *)data);
+		return m88e1011_set_downshift(phydev, *(const u8 *)data);
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -2283,9 +2283,9 @@  static struct phy_driver marvell_drivers[] = {
 		.get_sset_count = marvell_get_sset_count,
 		.get_strings = marvell_get_strings,
 		.get_stats = marvell_get_stats,
-		.get_tunable = m88e1111_get_tunable,
-		.set_tunable = m88e1111_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.get_tunable = m88e1011_get_tunable,
+		.set_tunable = m88e1011_set_tunable,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1318S,
@@ -2425,7 +2425,7 @@  static struct phy_driver marvell_drivers[] = {
 		.get_stats = marvell_get_stats,
 		.get_tunable = m88e1540_get_tunable,
 		.set_tunable = m88e1540_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1545,
@@ -2488,7 +2488,7 @@  static struct phy_driver marvell_drivers[] = {
 		.get_stats = marvell_get_stats,
 		.get_tunable = m88e1540_get_tunable,
 		.set_tunable = m88e1540_set_tunable,
-		.link_change_notify = m88e1111_link_change_notify,
+		.link_change_notify = m88e1011_link_change_notify,
 	},
 };