Commit 0e4562da authored by Chien Tung's avatar Chien Tung Committed by Roland Dreier

RDMA/nes: Fix fw_ver in /sys

/sys/class/infiniband/nes?/fw_ver is not displaying firmware version
properly (it shows 0.0.0 with the current code).  Fill in the correct
firmware version number.
Signed-off-by: default avatarChien Tung <chien.tin.tung@intel.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 92322377
......@@ -2808,10 +2808,9 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr,
struct nes_vnic *nesvnic = nesibdev->nesvnic;
nes_debug(NES_DBG_INIT, "\n");
return sprintf(buf, "%x.%x.%x\n",
(int)(nesvnic->nesdev->nesadapter->fw_ver >> 32),
(int)(nesvnic->nesdev->nesadapter->fw_ver >> 16) & 0xffff,
(int)(nesvnic->nesdev->nesadapter->fw_ver & 0xffff));
return sprintf(buf, "%u.%u\n",
(nesvnic->nesdev->nesadapter->firmware_version >> 16),
(nesvnic->nesdev->nesadapter->firmware_version & 0x000000ff));
}
......
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