Commit 1e9aa7ba authored by Michael Walle's avatar Michael Walle Committed by David S. Miller

net: phy: mxl-gpy: rename the FW type field name

Align the firmware field name with the reference manual where it is
called "major".
Signed-off-by: default avatarMichael Walle <michael@walle.cc>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1db85870
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
PHY_IMASK_ANC) PHY_IMASK_ANC)
#define PHY_FWV_REL_MASK BIT(15) #define PHY_FWV_REL_MASK BIT(15)
#define PHY_FWV_TYPE_MASK GENMASK(11, 8) #define PHY_FWV_MAJOR_MASK GENMASK(11, 8)
#define PHY_FWV_MINOR_MASK GENMASK(7, 0) #define PHY_FWV_MINOR_MASK GENMASK(7, 0)
/* SGMII */ /* SGMII */
...@@ -78,12 +78,12 @@ ...@@ -78,12 +78,12 @@
#define WOL_EN BIT(0) #define WOL_EN BIT(0)
struct gpy_priv { struct gpy_priv {
u8 fw_type; u8 fw_major;
u8 fw_minor; u8 fw_minor;
}; };
static const struct { static const struct {
int type; int major;
int minor; int minor;
} ver_need_sgmii_reaneg[] = { } ver_need_sgmii_reaneg[] = {
{7, 0x6D}, {7, 0x6D},
...@@ -222,7 +222,7 @@ static int gpy_probe(struct phy_device *phydev) ...@@ -222,7 +222,7 @@ static int gpy_probe(struct phy_device *phydev)
fw_version = phy_read(phydev, PHY_FWV); fw_version = phy_read(phydev, PHY_FWV);
if (fw_version < 0) if (fw_version < 0)
return fw_version; return fw_version;
priv->fw_type = FIELD_GET(PHY_FWV_TYPE_MASK, fw_version); priv->fw_major = FIELD_GET(PHY_FWV_MAJOR_MASK, fw_version);
priv->fw_minor = FIELD_GET(PHY_FWV_MINOR_MASK, fw_version); priv->fw_minor = FIELD_GET(PHY_FWV_MINOR_MASK, fw_version);
ret = gpy_hwmon_register(phydev); ret = gpy_hwmon_register(phydev);
...@@ -242,7 +242,7 @@ static bool gpy_sgmii_need_reaneg(struct phy_device *phydev) ...@@ -242,7 +242,7 @@ static bool gpy_sgmii_need_reaneg(struct phy_device *phydev)
size_t i; size_t i;
for (i = 0; i < ARRAY_SIZE(ver_need_sgmii_reaneg); i++) { for (i = 0; i < ARRAY_SIZE(ver_need_sgmii_reaneg); i++) {
if (priv->fw_type != ver_need_sgmii_reaneg[i].type) if (priv->fw_major != ver_need_sgmii_reaneg[i].major)
continue; continue;
if (priv->fw_minor < ver_need_sgmii_reaneg[i].minor) if (priv->fw_minor < ver_need_sgmii_reaneg[i].minor)
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment