public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Alexander Beregalov <a.beregalov@gmail.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: [PATCH] Mark COMPAT_NET_DEV_OPS option for removal
Date: Sat, 23 May 2009 08:12:21 -0700	[thread overview]
Message-ID: <20090523081221.61709ec5@nehalam> (raw)
In-Reply-To: <20090523074143.445ef830@nehalam>

Mark the flag as deprecated and default off so users won't use it
by default. Make the message that was a informational into a full
warning with backtrace, so any usage gets noticed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/Documentation/feature-removal-schedule.txt	2009-05-23 07:45:26.920460911 -0700
+++ b/Documentation/feature-removal-schedule.txt	2009-05-23 07:48:53.043372890 -0700
@@ -437,3 +437,14 @@ Why:	Superseded by tdfxfb. I2C/DDC suppo
 	driver but this caused driver conflicts.
 Who:	Jean Delvare <khali@linux-fr.org>
 	Krzysztof Helt <krzysztof.h1@wp.pl>
+
+---------------------------
+
+What:   COMPAT_NET_DEV_OPS interface
+When:   December 2009
+Why:    All network drivers in tree have been converted to the net_device_ops
+        interface. The compatiablity interface is no longer needed.
+
+	The interface will maintained for a short period to get out of
+        tree drivers to convert.
+Who:    Stephen Hemminger <shemminger@vayatta.com>
--- a/drivers/net/Kconfig	2009-05-23 07:49:33.004641071 -0700
+++ b/drivers/net/Kconfig	2009-05-23 08:02:53.444272608 -0700
@@ -26,13 +26,12 @@ menuconfig NETDEVICES
 if NETDEVICES
 
 config COMPAT_NET_DEV_OPS
-       default y
-       bool "Enable older network device API compatibility"
+       bool "Enable older network device API compatibility (DEPRECATED)"
+       default n
        ---help---
-          This option enables kernel compatibility with older network devices
-          that do not use net_device_ops interface.
-
-	  If unsure, say Y.
+          This option enables backward compatibility with older network devices
+          that do not use net_device_ops interface. All devices should be
+          converted to the net_device_ops.
 
 config IFB
 	tristate "Intermediate Functional Block support"
--- a/net/core/dev.c	2009-05-23 07:51:58.131254792 -0700
+++ b/net/core/dev.c	2009-05-23 07:58:25.749465521 -0700
@@ -4653,20 +4653,16 @@ int register_netdevice(struct net_device
 	dev->iflink = -1;
 
 #ifdef CONFIG_COMPAT_NET_DEV_OPS
+	WARN(!dev->netdev_ops, "%s: not using net_device_ops\n", dev->name);
 	/* Netdevice_ops API compatibility support.
 	 * This is temporary until all network devices are converted.
 	 */
-	if (dev->netdev_ops) {
+	if (dev->netdev_ops)
 		netdev_resync_ops(dev);
-	} else {
-		char drivername[64];
-		pr_info("%s (%s): not using net_device_ops yet\n",
-			dev->name, netdev_drivername(dev, drivername, 64));
-
+	else
 		/* This works only because net_device_ops and the
 		   compatibility structure are the same. */
 		dev->netdev_ops = (void *) &(dev->init);
-	}
 #endif
 
 	/* Init, if this function is available */

  reply	other threads:[~2009-05-23 15:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-23 14:17 [PATCH] net: remove COMPAT_NET_DEV_OPS Alexander Beregalov
2009-05-23 14:41 ` Stephen Hemminger
2009-05-23 15:12   ` Stephen Hemminger [this message]
2009-05-24 21:34     ` [PATCH] Mark COMPAT_NET_DEV_OPS option for removal David Miller
2009-05-23 16:55   ` [PATCH] net: remove COMPAT_NET_DEV_OPS Christoph Hellwig
2009-05-24 21:32     ` David Miller
2009-05-25 21:43 ` David Miller

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=20090523081221.61709ec5@nehalam \
    --to=shemminger@vyatta.com \
    --cc=a.beregalov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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