netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/13] forcedeth: fix stats version feature
@ 2009-03-05 18:01 Ayaz Abdulla
  0 siblings, 0 replies; only message in thread
From: Ayaz Abdulla @ 2009-03-05 18:01 UTC (permalink / raw)
  To: Manfred Spraul, Jeff Garzik, Andrew Morton, David S. Miller,
	nedev

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Newer versions of the stats feature would not encompass all older 
versions. This would result in only retreiving a subset of all available 
stats in HW.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>


[-- Attachment #2: patch-forcedeth-stats --]
[-- Type: text/plain, Size: 1608 bytes --]

--- old/drivers/net/forcedeth.c	2009-03-04 21:55:19.000000000 -0800
+++ new/drivers/net/forcedeth.c	2009-03-04 21:55:10.000000000 -0800
@@ -87,8 +87,8 @@
 #define DEV_HAS_MSI_X              0x000080  /* device supports MSI-X */
 #define DEV_HAS_POWER_CNTRL        0x000100  /* device supports power savings */
 #define DEV_HAS_STATISTICS_V1      0x000200  /* device supports hw statistics version 1 */
-#define DEV_HAS_STATISTICS_V2      0x000400  /* device supports hw statistics version 2 */
-#define DEV_HAS_STATISTICS_V3      0x000800  /* device supports hw statistics version 3 */
+#define DEV_HAS_STATISTICS_V2      0x000600  /* device supports hw statistics version 2 */
+#define DEV_HAS_STATISTICS_V3      0x000e00  /* device supports hw statistics version 3 */
 #define DEV_HAS_TEST_EXTENDED      0x001000  /* device supports extended diagnostic test */
 #define DEV_HAS_MGMT_UNIT          0x002000  /* device supports management unit */
 #define DEV_HAS_CORRECT_MACADDR    0x004000  /* device supports correct mac address order */
@@ -4796,12 +4796,12 @@
 		else
 			return NV_TEST_COUNT_BASE;
 	case ETH_SS_STATS:
-		if (np->driver_data & DEV_HAS_STATISTICS_V1)
-			return NV_DEV_STATISTICS_V1_COUNT;
+		if (np->driver_data & DEV_HAS_STATISTICS_V3)
+			return NV_DEV_STATISTICS_V3_COUNT;
 		else if (np->driver_data & DEV_HAS_STATISTICS_V2)
 			return NV_DEV_STATISTICS_V2_COUNT;
-		else if (np->driver_data & DEV_HAS_STATISTICS_V3)
-			return NV_DEV_STATISTICS_V3_COUNT;
+		else if (np->driver_data & DEV_HAS_STATISTICS_V1)
+			return NV_DEV_STATISTICS_V1_COUNT;
 		else
 			return 0;
 	default:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-05 21:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-05 18:01 [PATCH 1/13] forcedeth: fix stats version feature Ayaz Abdulla

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).