Netdev List
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Somnath Kotur <somnath.kotur@emulex.com>
Cc: <netdev@vger.kernel.org>, Suresh Reddy <Suresh.Reddy@emulex.com>
Subject: Re: [PATCH net-next 5/5] be2net: Fix to allow set/get of debug levels in the Firmware.
Date: Mon, 30 Apr 2012 15:13:22 +0100	[thread overview]
Message-ID: <1335795202.2685.8.camel@bwh-desktop.uk.solarflarecom.com> (raw)
In-Reply-To: <a32d6d08-5428-4bfd-85fc-2ac8d560d5d8@exht1.ad.emulex.com>

On Mon, 2012-04-30 at 11:35 +0530, Somnath Kotur wrote:
> Suggested-by: Ben Hutchings <bhutchings@solarflare.com>

No, not really.

> Signed-off-by: Suresh Reddy <Suresh.Reddy@emulex.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
[...]
> +static void be_set_msglevel(struct net_device *netdev, u32 data)
> +{
> +	struct be_adapter *adapter = netdev_priv(netdev);
> +	struct be_dma_mem extfat_cmd;
> +	struct be_fat_conf_params *cfgs;
> +	int status;
> +	int i, j;
> +
> +	if (lancer_chip(adapter)) {
> +		dev_err(&adapter->pdev->dev, "Operation not supported\n");
> +		return;
> +	}
> +
> +	switch (data) {
> +	case TRACE_LEVEL_ALL:
> +	case TRACE_LEVEL_ENTER_FUNCTION:
> +	case TRACE_LEVEL_VERBOSE:
> +	case TRACE_LEVEL_INFO:
> +	case TRACE_LEVEL_TEST:
> +	case TRACE_LEVEL_SHOW:
> +	case TRACE_LEVEL_WARNING:
> +	case TRACE_LEVEL_ERROR:
> +	case TRACE_LEVEL_FATAL:
> +	case TRACE_LEVEL_ALWAYS:
> +	case TRACE_LEVEL_DISABLED:
> +		break;
> +	default:
> +		dev_err(&adapter->pdev->dev, "Invalid message level value\n");
> +		return;
> +	}
[...]

So far as I'm concerned, the message 'level' should be a msg_enable
bitmask as used by the 'netif' logging functions.  This convention
hasn't been consistently implemented in existing drivers and still isn't
documented in <linux/ethtool.h>.  But the ethtool utility interprets it
according to this convention, and that was commented as being intended
since at least 2005 (beginning of git history).

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

      reply	other threads:[~2012-04-30 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30  6:05 [PATCH net-next 5/5] be2net: Fix to allow set/get of debug levels in the Firmware Somnath Kotur
2012-04-30 14:13 ` Ben Hutchings [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=1335795202.2685.8.camel@bwh-desktop.uk.solarflarecom.com \
    --to=bhutchings@solarflare.com \
    --cc=Suresh.Reddy@emulex.com \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@emulex.com \
    /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