bnxt_en: fix stored FW_PSID version masks
authorEdwin Peer <edwin.peer@broadcom.com>
Sun, 5 Sep 2021 18:10:55 +0000 (14:10 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Sep 2021 19:43:03 +0000 (20:43 +0100)
The FW_PSID version components are 8 bits wide, not 4.

Fixes: db28b6c77f40 ("bnxt_en: Fix devlink info's stored fw.psid version format.")
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c

index 1423cc6..01c21d7 100644 (file)
@@ -478,8 +478,8 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
        if (BNXT_PF(bp) && !bnxt_hwrm_get_nvm_cfg_ver(bp, &nvm_cfg_ver)) {
                u32 ver = nvm_cfg_ver.vu32;
 
-               sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xf, (ver >> 8) & 0xf,
-                       ver & 0xf);
+               sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xff, (ver >> 8) & 0xff,
+                       ver & 0xff);
                rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED,
                                      DEVLINK_INFO_VERSION_GENERIC_FW_PSID,
                                      buf);