netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mlx4_en: Removing HW info from ethtool -i report.
@ 2011-03-24  8:36 Yevgeny Petrilin
  2011-03-24 18:48 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Petrilin @ 2011-03-24  8:36 UTC (permalink / raw)
  To: davem; +Cc: netdev, yevgenyp

Avoiding abuse of ethtool_drvinfo.driver field.
HW specific info can be retrieved using lspci.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
 drivers/net/mlx4/en_ethtool.c |   15 +--------------
 1 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/drivers/net/mlx4/en_ethtool.c b/drivers/net/mlx4/en_ethtool.c
index 62ace6c..d54b7ab 100644
--- a/drivers/net/mlx4/en_ethtool.c
+++ b/drivers/net/mlx4/en_ethtool.c
@@ -45,20 +45,7 @@ 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;
 
-	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->driver, DRV_NAME, 32);
 	strncpy(drvinfo->version, DRV_VERSION " (" DRV_RELDATE ")", 32);
 	sprintf(drvinfo->fw_version, "%d.%d.%d",
 		(u16) (mdev->dev->caps.fw_ver >> 32),
-- 
1.6.0.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-24 18:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24  8:36 [PATCH] mlx4_en: Removing HW info from ethtool -i report Yevgeny Petrilin
2011-03-24 18:48 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).