[net-2.6 PATCH 9/10] Neterion: New driver: Ethtool related

Previous thread: [net-2.6 PATCH 2/10] Neterion: New driver: Update Maintainer list by Ramkrishna Vepa on Saturday, March 14, 2009 - 1:20 am. (1 message)

Next thread: [net-2.6 PATCH 8/10] Neterion: New driver: Main entry points by Ramkrishna Vepa on Saturday, March 14, 2009 - 1:21 am. (1 message)
From: Ramkrishna Vepa
Date: Saturday, March 14, 2009 - 1:22 am

This patch implements all ethtool related entry point functions for the driver.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Rastapur Santosh <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
---
diff -urpN patch_8/drivers/net/vxge/vxge-ethtool.c patch_9/drivers/net/vxge/vxge-ethtool.c
--- patch_8/drivers/net/vxge/vxge-ethtool.c	1969-12-31 16:00:00.000000000 -0800
+++ patch_9/drivers/net/vxge/vxge-ethtool.c	2009-03-13 00:15:35.000000000 -0700
@@ -0,0 +1,1450 @@
+/******************************************************************************
+ * This software may be used and distributed according to the terms of
+ * the GNU General Public License (GPL), incorporated herein by reference.
+ * Drivers based on or derived from this code fall under the GPL and must
+ * retain the authorship, copyright and license notice.  This file is not
+ * a complete program and may only be used when the entire operating
+ * system is licensed under the GPL.
+ * See the file COPYING in this distribution for more information.
+ ******************************************************************************/
+/*******************************************************************************
+ * vxge-ethtool.c: Driver for Neterion Inc's X3100 Series 10GbE PCIe I/O
+ *                 Virtualized Server Adapter.
+ * Copyright(c) 2002-2009 Neterion Inc.
+ ******************************************************************************/
+#include<linux/version.h>
+#include<linux/netdevice.h>
+#include<linux/if.h>
+#include<linux/ethtool.h>
+#include <linux/pci.h>
+#include <linux/etherdevice.h>
+
+#include "vxge-ethtool.h"
+
+/*
+ * vxge_ethtool_sset - Sets different link parameters.
+ * @dev: device pointer.
+ * @info: pointer to the structure with parameters given by ethtool to set
+ * link information.
+ *
+ * The function sets different link parameters provided by the user onto
+ * the NIC.
+ * Return value:
+ * 0 on ...
From: Ben Hutchings
Date: Monday, March 16, 2009 - 2:53 pm

Do not use #ifdef here.  You can be sure that these definitions aren't
going away.



Use strlcpy() to ensure null-termination.


Just schedule() will do.


This is the same as ethtool_op_get_tso; just point to that.


These operations are deprecated; you should implement get_strings_count

This is the same as ethtool_op_set_tx_hw_csum; just point to that.


[...]

Don't claim to have tests you don't actually implement.

Ben.

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

--

Previous thread: [net-2.6 PATCH 2/10] Neterion: New driver: Update Maintainer list by Ramkrishna Vepa on Saturday, March 14, 2009 - 1:20 am. (1 message)

Next thread: [net-2.6 PATCH 8/10] Neterion: New driver: Main entry points by Ramkrishna Vepa on Saturday, March 14, 2009 - 1:21 am. (1 message)