]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: phy: mxl-gpy: print firmware in human readable form
authorMichael Walle <michael@walle.cc>
Tue, 12 Jul 2022 13:15:54 +0000 (15:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Jul 2022 13:18:39 +0000 (14:18 +0100)
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@walle.cc>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mxl-gpy.c

index ac62b01c61ed47fd549ac72aeaddd0babe43e189..24bae27eedefa0cfb083b2683b74c0ee078944d7 100644 (file)
@@ -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;
 }