[ofa-general] [PATCH] RDMA/nes: fix fw_ver in /sys

Chien Tung chien.tin.tung at intel.com
Tue Apr 21 18:00:44 PDT 2009


/sys/class/infiniband/nes?/fw_ver is not displaying
firmware version properly (0.0.0).  Fill in the correct
firmware version number.

Signed-off-by: Chien Tung <chien.tin.tung at intel.com>
---
 drivers/infiniband/hw/nes/nes_verbs.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 8b460c2..64d5cfd 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -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));
 }
 
 
-- 
1.5.3.3




More information about the general mailing list