netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: bhutchings@solarflare.com
Cc: yevgenyp@mellanox.co.il, netdev@vger.kernel.org, eugenia@mellanox.co.il
Subject: Re: [PATCH v2 08/16] mlx4_en: Reporting HW revision in ethtool -i
Date: Wed, 23 Mar 2011 12:34:27 -0700 (PDT)	[thread overview]
Message-ID: <20110323.123427.242111674.davem@davemloft.net> (raw)
In-Reply-To: <1300889054.26693.527.camel@localhost>

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 23 Mar 2011 14:04:14 +0000

> On Wed, 2011-03-23 at 10:38 +0200, Yevgeny Petrilin wrote:
>> HW revision is derived from device ID and rev id.
> [...]
>> -	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;
> [...]
> 
> This is an abuse of the ethtool_drvinfo::driver field.
> 
> Your users can use lspci -v, can't they?

Agreed, mlx4 folks please send me a follow-up patch that removes this
conditional string.

The driver string is only meant to identify the software, not the
hardware variant.

      parent reply	other threads:[~2011-03-23 19:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23  8:38 [PATCH v2 08/16] mlx4_en: Reporting HW revision in ethtool -i Yevgeny Petrilin
2011-03-23 14:04 ` Ben Hutchings
2011-03-23 15:10   ` Yevgeny Petrilin
2011-03-23 15:46     ` Ben Hutchings
2011-03-23 15:54       ` Yevgeny Petrilin
2011-03-23 16:08         ` Ben Hutchings
2011-03-23 17:06           ` Stephen Hemminger
2011-03-23 15:58       ` Stephen Hemminger
2011-03-23 19:36     ` David Miller
2011-03-24  3:40     ` Ben Hutchings
2011-03-24  6:26       ` Yevgeny Petrilin
2011-03-23 19:34   ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110323.123427.242111674.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bhutchings@solarflare.com \
    --cc=eugenia@mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=yevgenyp@mellanox.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).