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: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
923223776b
commit
0e4562da9e
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user