[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1335795202.2685.8.camel@bwh-desktop.uk.solarflarecom.com>
Date: Mon, 30 Apr 2012 15:13:22 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Somnath Kotur <somnath.kotur@...lex.com>
CC: <netdev@...r.kernel.org>, Suresh Reddy <Suresh.Reddy@...lex.com>
Subject: Re: [PATCH net-next 5/5] be2net: Fix to allow set/get of debug
levels in the Firmware.
On Mon, 2012-04-30 at 11:35 +0530, Somnath Kotur wrote:
> Suggested-by: Ben Hutchings <bhutchings@...arflare.com>
No, not really.
> Signed-off-by: Suresh Reddy <Suresh.Reddy@...lex.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@...lex.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists