summaryrefslogtreecommitdiff
path: root/drivers/net/mlx4/en_ethtool.c
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2011-03-22 22:38:07 +0000
committerDavid S. Miller <davem@davemloft.net>2011-03-23 12:24:20 -0700
commit725c89997e03d71b09ea3c17c997da0712b9d835 (patch)
treed141987aec9ae90d43e3f44e3facee921ec6f526 /drivers/net/mlx4/en_ethtool.c
parent14c07b1358ede1664652bb9b28d9ace5fe6f7f92 (diff)
mlx4_en: Reporting HW revision in ethtool -i
HW revision is derived from device ID and rev id. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_ethtool.c')
-rw-r--r--drivers/net/mlx4/en_ethtool.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index c1f351f6ae57..62ace6c72b42 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -45,7 +45,20 @@ mlx4_en_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *drvinfo)
struct mlx4_en_priv *priv = netdev_priv(dev);
struct mlx4_en_dev *mdev = priv->mdev;
- sprintf(drvinfo->driver, DRV_NAME " (%s)", mdev->dev->board_id);
+ switch (mdev->dev->rev_id) {
+ case 0xa0:
+ if (dev->dev_id >= MLX4_EN_CX3_LOW_ID && dev->dev_id <= MLX4_EN_CX3_HIGH_ID)
+ sprintf(drvinfo->driver, DRV_NAME " (%s_CX-3)", mdev->dev->board_id);
+ else
+ sprintf(drvinfo->driver, DRV_NAME " (%s_CX)", mdev->dev->board_id);
+ break;
+ case 0xb0:
+ sprintf(drvinfo->driver, DRV_NAME " (%s_CX-2)", mdev->dev->board_id);
+ break;
+ default:
+ sprintf(drvinfo->driver, DRV_NAME " (%s)", mdev->dev->board_id);
+ break;
+ }
strncpy(drvinfo->version, DRV_VERSION " (" DRV_RELDATE ")", 32);
sprintf(drvinfo->fw_version, "%d.%d.%d",
(u16) (mdev->dev->caps.fw_ver >> 32),