[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220712131554.2737792-5-michael@walle.cc>
Date: Tue, 12 Jul 2022 15:15:54 +0200
From: Michael Walle <michael@...le.cc>
To: Xu Liang <lxu@...linear.com>, Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Michael Walle <michael@...le.cc>
Subject: [PATCH net-next 4/4] net: phy: mxl-gpy: print firmware in human readable form
Now having a major and a minor number, also print the firmware in
human readable form "major.minor". Still keep the 4-digit hexadecimal
representation because that form is used in the firmware changelog
documents. Also, drop the "release" string assuming that most common
case, but make it clearer that the user is running a test version.
Signed-off-by: Michael Walle <michael@...le.cc>
---
drivers/net/phy/mxl-gpy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index ac62b01c61ed..24bae27eedef 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -230,8 +230,9 @@ static int gpy_probe(struct phy_device *phydev)
return ret;
/* Show GPY PHY FW version in dmesg */
- phydev_info(phydev, "Firmware Version: 0x%04X (%s)\n", fw_version,
- (fw_version & PHY_FWV_REL_MASK) ? "release" : "test");
+ phydev_info(phydev, "Firmware Version: %d.%d (0x%04X%s)\n",
+ priv->fw_major, priv->fw_minor, fw_version,
+ fw_version & PHY_FWV_REL_MASK ? "" : " test version");
return 0;
}
--
2.30.2
Powered by blists - more mailing lists