Re: [PATCH NEXT 6/8] qlcnic: add driver debug support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Thursday, April 1, 2010 - 4:02 pm

From: Amit Kumar Salecha <amit.salecha@qlogic.com>
Date: Wed, 31 Mar 2010 05:03:44 -0700


The values used by these interfaces are not something you
can interpret any way you want.

They have defined values (from linux/netdevice.h):

enum {
	NETIF_MSG_DRV		= 0x0001,
	NETIF_MSG_PROBE		= 0x0002,
	NETIF_MSG_LINK		= 0x0004,
	NETIF_MSG_TIMER		= 0x0008,
	NETIF_MSG_IFDOWN	= 0x0010,
	NETIF_MSG_IFUP		= 0x0020,
	NETIF_MSG_RX_ERR	= 0x0040,
	NETIF_MSG_TX_ERR	= 0x0080,
	NETIF_MSG_TX_QUEUED	= 0x0100,
	NETIF_MSG_INTR		= 0x0200,
	NETIF_MSG_TX_DONE	= 0x0400,
	NETIF_MSG_RX_STATUS	= 0x0800,
	NETIF_MSG_PKTDATA	= 0x1000,
	NETIF_MSG_HW		= 0x2000,
	NETIF_MSG_WOL		= 0x4000,
};

And you must respect them in your debug logging macros.

You should also use netdev->msg_enable which is there exactly
for this purpose, and then you can use the netif_msg_*()
helper macros.

Look at how any other driver implements these interfaces.  It's always
better to look at the most popular drivers to see how interfaces are
meant to be used, rather than looking at an interface and trying
to figure out what clever things specific to your driver you can
do with it. :-)

Please either fix this up or eliminate this patch from your
patch set.  Please resubmit this entire set once you've
fixed this problem.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH NEXT 0/8]qlcnic: fix diagnostic tools access, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 1/8] qlcnic: fix fw load from file, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 2/8] qlcnic: handle queue manager access, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 3/8] qlcnic: update oncard memory size check, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 4/8] qlcnic: fix onchip memory access, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 5/8] qlcnic: use IDC defined timeout value, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 6/8] qlcnic: add driver debug support, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 7/8] qlcnic: fix interface attach sequence, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
[PATCH NEXT 8/8] qlcnic: update version to 5.0.1, Amit Kumar Salecha, (Wed Mar 31, 5:03 am)
Re: [PATCH NEXT 6/8] qlcnic: add driver debug support, David Miller, (Thu Apr 1, 4:02 pm)