diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-03 01:59:37 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-03 01:59:37 -0500 |
commit | 87cfe32375e0b69b999b59bf8287f501df3e43f7 (patch) | |
tree | 2cbc1b1e7bb230afcf4903b6527e3238f689de89 /drivers | |
parent | 8ae5a8a24f7fe797027d481f88c1464b0e47eede (diff) |
[IB] mthca: fix format of FW version
Mellanox has decided that the components of the firmware version are
really meant to be displayed in decimal, e.g. 0x000400070190 is
version 4.7.400. Change the format we use from "%x.%x.%x" to
"%d.%d.%d" to match this convention.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 883d1e5a79bc..45c6328e780c 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -1057,7 +1057,7 @@ static int __devinit mthca_init_one(struct pci_dev *pdev, | |||
1057 | goto err_cmd; | 1057 | goto err_cmd; |
1058 | 1058 | ||
1059 | if (mdev->fw_ver < mthca_hca_table[id->driver_data].latest_fw) { | 1059 | if (mdev->fw_ver < mthca_hca_table[id->driver_data].latest_fw) { |
1060 | mthca_warn(mdev, "HCA FW version %x.%x.%x is old (%x.%x.%x is current).\n", | 1060 | mthca_warn(mdev, "HCA FW version %d.%d.%d is old (%d.%d.%d is current).\n", |
1061 | (int) (mdev->fw_ver >> 32), (int) (mdev->fw_ver >> 16) & 0xffff, | 1061 | (int) (mdev->fw_ver >> 32), (int) (mdev->fw_ver >> 16) & 0xffff, |
1062 | (int) (mdev->fw_ver & 0xffff), | 1062 | (int) (mdev->fw_ver & 0xffff), |
1063 | (int) (mthca_hca_table[id->driver_data].latest_fw >> 32), | 1063 | (int) (mthca_hca_table[id->driver_data].latest_fw >> 32), |
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 1b9477edbd7b..6b0166668269 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -1028,7 +1028,7 @@ static ssize_t show_rev(struct class_device *cdev, char *buf) | |||
1028 | static ssize_t show_fw_ver(struct class_device *cdev, char *buf) | 1028 | static ssize_t show_fw_ver(struct class_device *cdev, char *buf) |
1029 | { | 1029 | { |
1030 | struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev); | 1030 | struct mthca_dev *dev = container_of(cdev, struct mthca_dev, ib_dev.class_dev); |
1031 | return sprintf(buf, "%x.%x.%x\n", (int) (dev->fw_ver >> 32), | 1031 | return sprintf(buf, "%d.%d.%d\n", (int) (dev->fw_ver >> 32), |
1032 | (int) (dev->fw_ver >> 16) & 0xffff, | 1032 | (int) (dev->fw_ver >> 16) & 0xffff, |
1033 | (int) dev->fw_ver & 0xffff); | 1033 | (int) dev->fw_ver & 0xffff); |
1034 | } | 1034 | } |