Skip to content

Commit 911af5e

Browse files
hkallweitdavem330
authored andcommitted
net: phy: marvell: fix downshift function naming
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: a3bdfce ("net: phy: marvell: support downshift as PHY tunable") Reported-by: Chris Healy <[email protected]> Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f8d975b commit 911af5e

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

drivers/net/phy/marvell.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ static int m88e1111_config_init(struct phy_device *phydev)
784784
return genphy_soft_reset(phydev);
785785
}
786786

787-
static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
787+
static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
788788
{
789789
int val, cnt, enable;
790790

@@ -800,7 +800,7 @@ static int m88e1111_get_downshift(struct phy_device *phydev, u8 *data)
800800
return 0;
801801
}
802802

803-
static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
803+
static int m88e1011_set_downshift(struct phy_device *phydev, u8 cnt)
804804
{
805805
int val;
806806

@@ -820,29 +820,29 @@ static int m88e1111_set_downshift(struct phy_device *phydev, u8 cnt)
820820
val);
821821
}
822822

823-
static int m88e1111_get_tunable(struct phy_device *phydev,
823+
static int m88e1011_get_tunable(struct phy_device *phydev,
824824
struct ethtool_tunable *tuna, void *data)
825825
{
826826
switch (tuna->id) {
827827
case ETHTOOL_PHY_DOWNSHIFT:
828-
return m88e1111_get_downshift(phydev, data);
828+
return m88e1011_get_downshift(phydev, data);
829829
default:
830830
return -EOPNOTSUPP;
831831
}
832832
}
833833

834-
static int m88e1111_set_tunable(struct phy_device *phydev,
834+
static int m88e1011_set_tunable(struct phy_device *phydev,
835835
struct ethtool_tunable *tuna, const void *data)
836836
{
837837
switch (tuna->id) {
838838
case ETHTOOL_PHY_DOWNSHIFT:
839-
return m88e1111_set_downshift(phydev, *(const u8 *)data);
839+
return m88e1011_set_downshift(phydev, *(const u8 *)data);
840840
default:
841841
return -EOPNOTSUPP;
842842
}
843843
}
844844

845-
static void m88e1111_link_change_notify(struct phy_device *phydev)
845+
static void m88e1011_link_change_notify(struct phy_device *phydev)
846846
{
847847
int status;
848848

@@ -875,7 +875,7 @@ static int m88e1116r_config_init(struct phy_device *phydev)
875875
if (err < 0)
876876
return err;
877877

878-
err = m88e1111_set_downshift(phydev, 8);
878+
err = m88e1011_set_downshift(phydev, 8);
879879
if (err < 0)
880880
return err;
881881

@@ -1177,7 +1177,7 @@ static int m88e1540_get_tunable(struct phy_device *phydev,
11771177
case ETHTOOL_PHY_FAST_LINK_DOWN:
11781178
return m88e1540_get_fld(phydev, data);
11791179
case ETHTOOL_PHY_DOWNSHIFT:
1180-
return m88e1111_get_downshift(phydev, data);
1180+
return m88e1011_get_downshift(phydev, data);
11811181
default:
11821182
return -EOPNOTSUPP;
11831183
}
@@ -1190,7 +1190,7 @@ static int m88e1540_set_tunable(struct phy_device *phydev,
11901190
case ETHTOOL_PHY_FAST_LINK_DOWN:
11911191
return m88e1540_set_fld(phydev, data);
11921192
case ETHTOOL_PHY_DOWNSHIFT:
1193-
return m88e1111_set_downshift(phydev, *(const u8 *)data);
1193+
return m88e1011_set_downshift(phydev, *(const u8 *)data);
11941194
default:
11951195
return -EOPNOTSUPP;
11961196
}
@@ -2283,9 +2283,9 @@ static struct phy_driver marvell_drivers[] = {
22832283
.get_sset_count = marvell_get_sset_count,
22842284
.get_strings = marvell_get_strings,
22852285
.get_stats = marvell_get_stats,
2286-
.get_tunable = m88e1111_get_tunable,
2287-
.set_tunable = m88e1111_set_tunable,
2288-
.link_change_notify = m88e1111_link_change_notify,
2286+
.get_tunable = m88e1011_get_tunable,
2287+
.set_tunable = m88e1011_set_tunable,
2288+
.link_change_notify = m88e1011_link_change_notify,
22892289
},
22902290
{
22912291
.phy_id = MARVELL_PHY_ID_88E1318S,
@@ -2425,7 +2425,7 @@ static struct phy_driver marvell_drivers[] = {
24252425
.get_stats = marvell_get_stats,
24262426
.get_tunable = m88e1540_get_tunable,
24272427
.set_tunable = m88e1540_set_tunable,
2428-
.link_change_notify = m88e1111_link_change_notify,
2428+
.link_change_notify = m88e1011_link_change_notify,
24292429
},
24302430
{
24312431
.phy_id = MARVELL_PHY_ID_88E1545,
@@ -2488,7 +2488,7 @@ static struct phy_driver marvell_drivers[] = {
24882488
.get_stats = marvell_get_stats,
24892489
.get_tunable = m88e1540_get_tunable,
24902490
.set_tunable = m88e1540_set_tunable,
2491-
.link_change_notify = m88e1111_link_change_notify,
2491+
.link_change_notify = m88e1011_link_change_notify,
24922492
},
24932493
};
24942494

0 commit comments

Comments
 (0)