Netdev List
 help / color / mirror / Atom feed
* Re: [-mm patch] is_broadcast_ether_addr() is still required
From: Andrew Morton @ 2005-07-08 20:45 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: bero, linux-kernel, jgarzik, netdev, ipw2100-admin
In-Reply-To: <20050708200704.GH3671@stusta.de>

Adrian Bunk <bunk@stusta.de> wrote:
>
> This patch by Bernhard Rosenkraenzer <bero@arklinux.org> is still 
> required to fix the following compile error:

I think this problem is due to my failure to navigate the miasma of Jeff's
git trees.  I need to go in and look at all his branches and work out
what's missing.

^ permalink raw reply

* Re: [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large)
From: Mitch Williams @ 2005-07-08 21:14 UTC (permalink / raw)
  To: Greg KH
  Cc: Mitch Williams, John W. Linville, Radheka Godse, netdev,
	bonding-devel, fubar, netdev
In-Reply-To: <20050707231451.GA936@kroah.com>

(Adding vger to Cc: list, so as to spread the joy around.)

On Thu, 7 Jul 2005, Greg KH wrote:

> >
> > Moving the individual bond directories to a bonds/ directory
> > is problematic.  Because each bond shows up a just another network
> > interface, they show up in /sys/class/net automatically.  We'd have to
> > make a bunch of changes to the device model to account for bonding, and
> > we'd break the semantics of the /sys/class/net hierarchy.
>
> Why not just put them in /sys/class/bond/ instead?
As Aaron Brown noted in another reply, it's inappropriate for bonding to
do this.  Bonding is really just another network driver, and its
interfaces show up in /sys/class/net courtesy of the device model.  We
don't need to replicate this capability; we just need to extend it a bit.

Adding /sys/class/bond/ would cause a much larger protest that what we're
dealing with now (i.e. pretty much only you).


> > reading of Documentation/filesystems/sysfs.txt indicates that such a usage
> > is "socially acceptable".  (Or at least it was to Patrick Mochel back in
> > January of 2003.)
>
> Pat was just trying to be nice.  I'm not.  :)

Well, if "nice" isn't the policy any more, then the doc needs to change.

> Just don't make them readable.  Lots of sysfs files are write only.

OK, you got me there.  I did some poking and you are absolutely correct.

However, I did a little more poking, and found a bunch of files that have
more than one item in them.  HW resource listings, block device scheduling
stuff, plenty of examples.  Are they socially acceptable?


> > bonding_masters.  This currently is a problem, since sysfs itself does not
> > handle appends properly.
>
> Because you are not supposed to do that.

Sysfs will happily accept O_APPEND opens, and will happily report success
on seek attempts, although neither operation is permitted.  Whether or not
you're supposed to, this behavior is just plain wrong.

^ permalink raw reply

* Re: [PATCH 2.6.13-rc1 8/17] bonding: SYSFS INTERFACE (large)
From: Greg KH @ 2005-07-08 21:31 UTC (permalink / raw)
  To: Mitch Williams
  Cc: John W. Linville, Radheka Godse, netdev, bonding-devel, fubar,
	netdev
In-Reply-To: <Pine.CYG.4.58.0507081352390.1980@mawilli1-desk2.amr.corp.intel.com>

On Fri, Jul 08, 2005 at 02:14:54PM -0700, Mitch Williams wrote:
> (Adding vger to Cc: list, so as to spread the joy around.)
> 
> On Thu, 7 Jul 2005, Greg KH wrote:
> 
> > >
> > > Moving the individual bond directories to a bonds/ directory
> > > is problematic.  Because each bond shows up a just another network
> > > interface, they show up in /sys/class/net automatically.  We'd have to
> > > make a bunch of changes to the device model to account for bonding, and
> > > we'd break the semantics of the /sys/class/net hierarchy.
> >
> > Why not just put them in /sys/class/bond/ instead?
> As Aaron Brown noted in another reply, it's inappropriate for bonding to
> do this.  Bonding is really just another network driver, and its
> interfaces show up in /sys/class/net courtesy of the device model.  We
> don't need to replicate this capability; we just need to extend it a bit.
> 
> Adding /sys/class/bond/ would cause a much larger protest that what we're
> dealing with now (i.e. pretty much only you).

Ok, as I said before, I don't care where you put it, just writting and
reading multiple values at once in sysfs files is not to be tolerated.

> > > reading of Documentation/filesystems/sysfs.txt indicates that such a usage
> > > is "socially acceptable".  (Or at least it was to Patrick Mochel back in
> > > January of 2003.)
> >
> > Pat was just trying to be nice.  I'm not.  :)
> 
> Well, if "nice" isn't the policy any more, then the doc needs to change.

Ok, I will do so.

> However, I did a little more poking, and found a bunch of files that have
> more than one item in them.  HW resource listings, block device scheduling
> stuff, plenty of examples.  Are they socially acceptable?

The block device stuff I understand as they want a single snapshot.
They also can't create multiple files for every value or the 20,000 disk
system admins will complain :)

As for the other ones, have specific examples?

And none of them are "multiple value write", correct?  That, and due to
the fact that your implementation will drop needed data is why I object
to your patch so much.

I'm sure you can understand that desiging in a limitation that could
cause data to be dropped that people really want is not a good thing.

> > > bonding_masters.  This currently is a problem, since sysfs itself does not
> > > handle appends properly.
> >
> > Because you are not supposed to do that.
> 
> Sysfs will happily accept O_APPEND opens, and will happily report success
> on seek attempts, although neither operation is permitted.  Whether or not
> you're supposed to, this behavior is just plain wrong.

Ok, care to resend the patches in different emails?  From what I last
remember, they either were not able to be applied, or some other trival
problem with them.

thanks,

greg k-h

^ permalink raw reply

* [-mm patch] drivers/net/wireless/ipw2200.c: remove division by zero
From: Adrian Bunk @ 2005-07-09  3:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ipw2100-admin, jgarzik, linux-kernel, netdev

gcc correctly complained about a division by zero for HZ < 1000.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 2 Jul 2005

--- linux-2.6.13-rc1-mm1-full/drivers/net/wireless/ipw2200.c.old	2005-07-02 23:14:39.000000000 +0200
+++ linux-2.6.13-rc1-mm1-full/drivers/net/wireless/ipw2200.c	2005-07-02 23:15:39.000000000 +0200
@@ -1170,7 +1170,7 @@
 		HOST_COMPLETE_TIMEOUT);
 	if (rc == 0) {
 		IPW_DEBUG_INFO("Command completion failed out after %dms.\n",
-			       HOST_COMPLETE_TIMEOUT / (HZ / 1000));
+			       (1000 * HOST_COMPLETE_TIMEOUT) / HZ);
 		priv->status &= ~STATUS_HCMD_ACTIVE;
 		return -EIO;
 	}

^ permalink raw reply

* [2.6 patch] fix IP_FIB_HASH kconfig warning
From: Adrian Bunk @ 2005-07-09  3:07 UTC (permalink / raw)
  To: Roman Zippel; +Cc: netdev, linux-kernel
In-Reply-To: <Pine.LNX.4.61.0507042025180.3728@scrub.home>

On Mon, Jul 04, 2005 at 08:27:56PM +0200, Roman Zippel wrote:

>...
> config IP_FIB_HASH  
> 	def_bool ASK_IP_FIB_HASH || !IP_ADVANCED_ROUTER

An updated patch is below.

> bye, Roman

cu
Adrian


<--  snip  -->


This patch fixes the following kconfig warning:
  net/ipv4/Kconfig:92:warning: defaults for choice values not supported

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.13-rc2-mm1-modular/net/ipv4/Kconfig.old	2005-07-08 23:55:31.000000000 +0200
+++ linux-2.6.13-rc2-mm1-modular/net/ipv4/Kconfig	2005-07-08 23:56:23.000000000 +0200
@@ -56,9 +56,9 @@
 choice 
 	prompt "Choose IP: FIB lookup algorithm (choose FIB_HASH if unsure)"
 	depends on IP_ADVANCED_ROUTER
-	default IP_FIB_HASH
+	default ASK_IP_FIB_HASH
 
-config IP_FIB_HASH
+config ASK_IP_FIB_HASH
 	bool "FIB_HASH"
 	---help---
 	Current FIB is very proven and good enough for most users.
@@ -84,12 +84,8 @@
        
 endchoice
 
-# If the user does not enable advanced routing, he gets the safe
-# default of the fib-hash algorithm.
 config IP_FIB_HASH
-	bool
-	depends on !IP_ADVANCED_ROUTER
-	default y
+	def_bool ASK_IP_FIB_HASH || !IP_ADVANCED_ROUTER
 
 config IP_MULTIPLE_TABLES
 	bool "IP: policy routing"

^ permalink raw reply

* [2.6 patch] net/irda/: possible cleanups
From: Adrian Bunk @ 2005-07-09  3:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: irda-users, netdev, linux-kernel

This patch contains the following possible cleanups:
- make the following needlessly global function static:
  - irnet/irnet_ppp.c: irnet_init
- remove the following unneeded EXPORT_SYMBOL's:
  - irlmp.c: sysctl_discovery_timeout
  - irlmp.c: irlmp_reasons
  - irlmp.c: irlmp_dup
  - irqueue.c: hashbin_find_next

Please review which of these changes do make sense and which conflict 
with pending patches.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 30 May 2005
- 7 May 2005

 net/irda/irlmp.c           |    3 ---
 net/irda/irnet/irnet.h     |    3 ---
 net/irda/irnet/irnet_ppp.c |    2 +-
 net/irda/irqueue.c         |    1 -
 4 files changed, 1 insertion(+), 8 deletions(-)

--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h.old	2005-05-05 22:38:59.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet.h	2005-05-05 22:39:12.000000000 +0200
@@ -517,9 +517,6 @@
 	irda_irnet_init(void);		/* Initialise IrDA part of IrNET */
 extern void
 	irda_irnet_cleanup(void);	/* Teardown IrDA part of IrNET */
-/* ---------------------------- MODULE ---------------------------- */
-extern int
-	irnet_init(void);		/* Initialise IrNET module */
 
 /**************************** VARIABLES ****************************/
 
--- linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c.old	2005-05-05 22:39:21.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irnet/irnet_ppp.c	2005-05-05 22:39:29.000000000 +0200
@@ -1107,7 +1107,7 @@
 /*
  * Module main entry point
  */
-int __init
+static int __init
 irnet_init(void)
 {
   int err;
--- linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c.old	2005-05-05 22:46:47.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irlmp.c	2005-05-05 22:50:52.000000000 +0200
@@ -53,7 +53,6 @@
 /* These can be altered by the sysctl interface */
 int  sysctl_discovery         = 0;
 int  sysctl_discovery_timeout = 3; /* 3 seconds by default */
-EXPORT_SYMBOL(sysctl_discovery_timeout);
 int  sysctl_discovery_slots   = 6; /* 6 slots by default */
 int  sysctl_lap_keepalive_time = LM_IDLE_TIMEOUT * 1000 / HZ;
 char sysctl_devname[65];
@@ -67,7 +66,6 @@
 	"LM_INIT_DISCONNECT",
 	"ERROR, NOT USED",
 };
-EXPORT_SYMBOL(irlmp_reasons);
 
 /*
  * Function irlmp_init (void)
@@ -675,7 +673,6 @@
 
 	return new;
 }
-EXPORT_SYMBOL(irlmp_dup);
 
 /*
  * Function irlmp_disconnect_request (handle, userdata)
--- linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c.old	2005-05-05 22:48:55.000000000 +0200
+++ linux-2.6.12-rc3-mm3-full/net/irda/irqueue.c	2005-05-05 22:49:03.000000000 +0200
@@ -822,7 +822,6 @@
 
 	return entry;
 }
-EXPORT_SYMBOL(hashbin_find_next);
 
 /*
  * Function hashbin_get_first (hashbin)

^ permalink raw reply

* [PATCH] forcedeth: Additional ethtool support
From: Manfred Spraul @ 2005-07-10 11:09 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Netdev, renaud.lienhart

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

Hi Jeff,

The attached patch adds ethtool support for -r (restart 
auto-negotiation) and -d (dump registers).
It also contains the PCI_DEVICE changes from Renaud, a bugfix for the 
jumbo frame patch (the packet size limit remained at 1500, even for the 
nics that support jumbo frames) and a cleanup for the selection of the 
jumbo frame capable/incapable nics.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>

[-- Attachment #2: patch-forcedeth-037-ethtool --]
[-- Type: text/plain, Size: 9300 bytes --]

--- 2.6/drivers/net/forcedeth.c	2005-07-10 12:38:53.000000000 +0200
+++ build-2.6/drivers/net/forcedeth.c	2005-07-10 12:51:12.000000000 +0200
@@ -85,7 +85,8 @@
  *	0.33: 16 May 2005: Support for MCP51 added.
  *	0.34: 18 Jun 2005: Add DEV_NEED_LINKTIMER to all nForce nics.
  *	0.35: 26 Jun 2005: Support for MCP55 added.
- *	0.36: 28 Jul 2005: Add jumbo frame support.
+ *	0.36: 28 Jun 2005: Add jumbo frame support.
+ *	0.37: 10 Jul 2005: Additional ethtool support, cleanup of pci id list
  *
  * Known bugs:
  * We suspect that on some hardware no TX done interrupts are generated.
@@ -137,6 +138,7 @@
 #define DEV_IRQMASK_2		0x0004  /* use NVREG_IRQMASK_WANTED_2 for irq mask */
 #define DEV_NEED_TIMERIRQ	0x0008  /* set the timer irq flag in the irq mask */
 #define DEV_NEED_LINKTIMER	0x0010	/* poll link settings. Relies on the timer irq */
+#define DEV_HAS_LARGEDESC	0x0020	/* device supports jumbo frames and needs packet format 2 */
 
 enum {
 	NvRegIrqStatus = 0x000,
@@ -1846,6 +1848,50 @@
 	return 0;
 }
 
+#define FORCEDETH_REGS_VER	1
+#define FORCEDETH_REGS_SIZE	0x400 /* 256 32-bit registers */
+
+static int nv_get_regs_len(struct net_device *dev)
+{
+	return FORCEDETH_REGS_SIZE;
+}
+
+static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	u8 __iomem *base = get_hwbase(dev);
+	u32 *rbuf = (u32 *)buf;
+	int i;
+
+	regs->version = FORCEDETH_REGS_VER;
+	spin_lock_irq(&np->lock);
+	for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++)
+		rbuf[i] = readl(base + i*sizeof(u32));
+	spin_unlock_irq(&np->lock);
+}
+
+static int nv_nway_reset(struct net_device *dev)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	int ret;
+
+	spin_lock_irq(&np->lock);
+	if (np->autoneg) {
+		int bmcr;
+
+		bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
+		bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
+		mii_rw(dev, np->phyaddr, MII_BMCR, bmcr);
+
+		ret = 0;
+	} else {
+		ret = -EINVAL;
+	}
+	spin_unlock_irq(&np->lock);
+
+	return ret;
+}
+
 static struct ethtool_ops ops = {
 	.get_drvinfo = nv_get_drvinfo,
 	.get_link = ethtool_op_get_link,
@@ -1853,6 +1899,9 @@
 	.set_wol = nv_set_wol,
 	.get_settings = nv_get_settings,
 	.set_settings = nv_set_settings,
+	.get_regs_len = nv_get_regs_len,
+	.get_regs = nv_get_regs,
+	.nway_reset = nv_nway_reset,
 };
 
 static int nv_open(struct net_device *dev)
@@ -2092,16 +2141,11 @@
 	}
 
 	/* handle different descriptor versions */
-	if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3 ||    
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_12 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_13) {
-		np->desc_ver = DESC_VER_1;
- 		np->pkt_limit = NV_PKTLIMIT_1;
-	} else {
+	np->desc_ver = DESC_VER_1;
+ 	np->pkt_limit = NV_PKTLIMIT_1;
+	if (id->driver_data & DEV_HAS_LARGEDESC) {
 		np->desc_ver = DESC_VER_2;
- 		np->pkt_limit = NV_PKTLIMIT_1;
+ 		np->pkt_limit = NV_PKTLIMIT_2;
 	}
 
 	err = -ENOMEM;
@@ -2284,109 +2328,74 @@
 
 static struct pci_device_id pci_tbl[] = {
 	{	/* nForce Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_1,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_1),
 		.driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce2 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_2,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_2),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_3,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_3),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_4,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_4),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_5,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_5),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_6,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_6),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_7,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_7),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* CK804 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_8,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_8),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* CK804 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_9,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_9),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP04 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_10,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_10),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP04 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_11,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_11),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP51 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_12,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_12),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* MCP51 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_13,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_13),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* MCP55 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_14,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_14),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP55 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_15,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_15),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{0,},
 };

^ permalink raw reply

* Re: Fwd: Re: GRE tunnel keepalive support?
From: Daniel Roesen @ 2005-07-10 14:15 UTC (permalink / raw)
  To: Ricardo Scop; +Cc: netdev
In-Reply-To: <200506281934.41732.rscop@matrix.com.br>

Hi Ricardo,

On Tue, Jun 28, 2005 at 07:34:41PM -0300, Ricardo Scop wrote:
> Any further development of the subject above? Neither I want to
> duplicate  efforts... ;)
> 
> Please CC to my private address as I'm not yet subscribed to this list.

Nope, didn't get around to do any work on that yet. And am losing
motivation as my immediate use for it is going away soon.


Best regards,
Daniel

-- 
CLUE-RIPE -- Jabber: dr@cluenet.de -- dr@IRCnet -- PGP: 0xA85C8AA0

^ permalink raw reply

* Re: [PATCH] forcedeth: Additional ethtool support
From: Francois Romieu @ 2005-07-10 17:28 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Jeff Garzik, Netdev, renaud.lienhart
In-Reply-To: <42D101EC.6000608@colorfullife.com>

Hi Manfred,

Manfred Spraul <manfred@colorfullife.com> :
[...]
> --- 2.6/drivers/net/forcedeth.c	2005-07-10 12:38:53.000000000 +0200
> +++ build-2.6/drivers/net/forcedeth.c	2005-07-10 12:51:12.000000000 +0200
[...]
> +static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf)
> +{
> +	struct fe_priv *np = get_nvpriv(dev);
> +	u8 __iomem *base = get_hwbase(dev);
> +	u32 *rbuf = (u32 *)buf;

Unneeded cast from void *

> +	int i;
> +
> +	regs->version = FORCEDETH_REGS_VER;
> +	spin_lock_irq(&np->lock);
> +	for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++)
> +		rbuf[i] = readl(base + i*sizeof(u32));

memcpy_fromio ?

[...]
> @@ -2092,16 +2141,11 @@
>  	}
>  
>  	/* handle different descriptor versions */
> -	if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
> -			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
> -			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3 ||    
> -			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_12 ||
> -			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_13) {
> -		np->desc_ver = DESC_VER_1;
> - 		np->pkt_limit = NV_PKTLIMIT_1;
> -	} else {
> +	np->desc_ver = DESC_VER_1;
> + 	np->pkt_limit = NV_PKTLIMIT_1;
   ^^
(nit) a space hides before the tab.

> +	if (id->driver_data & DEV_HAS_LARGEDESC) {
>  		np->desc_ver = DESC_VER_2;
> - 		np->pkt_limit = NV_PKTLIMIT_1;
> + 		np->pkt_limit = NV_PKTLIMIT_2;
   ^^
(nit) a space hides before the tab.

--
Ueimor

^ permalink raw reply

* Re: [PATCH] forcedeth: Additional ethtool support
From: Manfred Spraul @ 2005-07-10 18:17 UTC (permalink / raw)
  To: Francois Romieu; +Cc: Jeff Garzik, Netdev, renaud.lienhart
In-Reply-To: <20050710172833.GA1951@electric-eye.fr.zoreil.com>

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

Francois Romieu wrote:

>>+	int i;
>>+
>>+	regs->version = FORCEDETH_REGS_VER;
>>+	spin_lock_irq(&np->lock);
>>+	for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++)
>>+		rbuf[i] = readl(base + i*sizeof(u32));
>>    
>>
>
>memcpy_fromio ?
>
>  
>
Not for a nic without complete documentation: What if an arch uses 
64-bit reads to read two registers at the same time? Not all nics like 
that, for example IIRC natsemi explicitely mandates 32-bit reads.
x86-64 doesn't, it uses 32-bit reads, but I don't like the idea of using 
memcpy to read registers.

I agree with your other remarks, updated patch attached.

--
    Manfred

[-- Attachment #2: patch-forcedeth-037-ethtool --]
[-- Type: text/plain, Size: 9291 bytes --]

--- 2.6/drivers/net/forcedeth.c	2005-07-10 12:38:53.000000000 +0200
+++ build-2.6/drivers/net/forcedeth.c	2005-07-10 20:10:16.000000000 +0200
@@ -85,7 +85,8 @@
  *	0.33: 16 May 2005: Support for MCP51 added.
  *	0.34: 18 Jun 2005: Add DEV_NEED_LINKTIMER to all nForce nics.
  *	0.35: 26 Jun 2005: Support for MCP55 added.
- *	0.36: 28 Jul 2005: Add jumbo frame support.
+ *	0.36: 28 Jun 2005: Add jumbo frame support.
+ *	0.37: 10 Jul 2005: Additional ethtool support, cleanup of pci id list
  *
  * Known bugs:
  * We suspect that on some hardware no TX done interrupts are generated.
@@ -137,6 +138,7 @@
 #define DEV_IRQMASK_2		0x0004  /* use NVREG_IRQMASK_WANTED_2 for irq mask */
 #define DEV_NEED_TIMERIRQ	0x0008  /* set the timer irq flag in the irq mask */
 #define DEV_NEED_LINKTIMER	0x0010	/* poll link settings. Relies on the timer irq */
+#define DEV_HAS_LARGEDESC	0x0020	/* device supports jumbo frames and needs packet format 2 */
 
 enum {
 	NvRegIrqStatus = 0x000,
@@ -1846,6 +1848,50 @@
 	return 0;
 }
 
+#define FORCEDETH_REGS_VER	1
+#define FORCEDETH_REGS_SIZE	0x400 /* 256 32-bit registers */
+
+static int nv_get_regs_len(struct net_device *dev)
+{
+	return FORCEDETH_REGS_SIZE;
+}
+
+static void nv_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *buf)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	u8 __iomem *base = get_hwbase(dev);
+	u32 *rbuf = buf;
+	int i;
+
+	regs->version = FORCEDETH_REGS_VER;
+	spin_lock_irq(&np->lock);
+	for (i=0;i<FORCEDETH_REGS_SIZE/sizeof(u32);i++)
+		rbuf[i] = readl(base + i*sizeof(u32));
+	spin_unlock_irq(&np->lock);
+}
+
+static int nv_nway_reset(struct net_device *dev)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	int ret;
+
+	spin_lock_irq(&np->lock);
+	if (np->autoneg) {
+		int bmcr;
+
+		bmcr = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
+		bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
+		mii_rw(dev, np->phyaddr, MII_BMCR, bmcr);
+
+		ret = 0;
+	} else {
+		ret = -EINVAL;
+	}
+	spin_unlock_irq(&np->lock);
+
+	return ret;
+}
+
 static struct ethtool_ops ops = {
 	.get_drvinfo = nv_get_drvinfo,
 	.get_link = ethtool_op_get_link,
@@ -1853,6 +1899,9 @@
 	.set_wol = nv_set_wol,
 	.get_settings = nv_get_settings,
 	.set_settings = nv_set_settings,
+	.get_regs_len = nv_get_regs_len,
+	.get_regs = nv_get_regs,
+	.nway_reset = nv_nway_reset,
 };
 
 static int nv_open(struct net_device *dev)
@@ -2092,16 +2141,11 @@
 	}
 
 	/* handle different descriptor versions */
-	if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3 ||    
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_12 ||
-			pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_13) {
-		np->desc_ver = DESC_VER_1;
- 		np->pkt_limit = NV_PKTLIMIT_1;
-	} else {
+	np->desc_ver = DESC_VER_1;
+	np->pkt_limit = NV_PKTLIMIT_1;
+	if (id->driver_data & DEV_HAS_LARGEDESC) {
 		np->desc_ver = DESC_VER_2;
- 		np->pkt_limit = NV_PKTLIMIT_1;
+		np->pkt_limit = NV_PKTLIMIT_2;
 	}
 
 	err = -ENOMEM;
@@ -2284,109 +2328,74 @@
 
 static struct pci_device_id pci_tbl[] = {
 	{	/* nForce Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_1,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_1),
 		.driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce2 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_2,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_2),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_3,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_3),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_4,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_4),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_5,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_5),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_6,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_6),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* nForce3 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_7,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_7),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* CK804 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_8,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_8),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* CK804 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_9,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_9),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP04 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_10,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_10),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP04 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_11,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_11),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP51 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_12,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_12),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* MCP51 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_13,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_13),
 		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
 	},
 	{	/* MCP55 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_14,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_14),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{	/* MCP55 Ethernet Controller */
-		.vendor = PCI_VENDOR_ID_NVIDIA,
-		.device = PCI_DEVICE_ID_NVIDIA_NVENET_15,
-		.subvendor = PCI_ANY_ID,
-		.subdevice = PCI_ANY_ID,
-		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER,
+		PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_15),
+		.driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|
+			DEV_NEED_LINKTIMER|DEV_HAS_LARGEDESC,
 	},
 	{0,},
 };

^ permalink raw reply

* [PATCH 26/82] remove linux/version.h from drivers/net/
From: Olaf Hering @ 2005-07-10 19:35 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: Jeff Garzik, netdev, irda-users
In-Reply-To: <20050710193508.0.PmFpst2252.2247.olh@nectarine.suse.de>


changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason.

remove code for obsolete kernels in acenic, irda, tokenring, typhoon
and wireless.
drivers/net/wan/farsync.c  has fstioc_info->kernelVersion,
according to the comment the content doesnt matter

Signed-off-by: Olaf Hering <olh@suse.de>

drivers/net/acenic.c                            |   11 ----
drivers/net/acenic.h                            |    4 -
drivers/net/b44.c                               |    1
drivers/net/dm9000.c                            |    1
drivers/net/gianfar.c                           |    1
drivers/net/gianfar.h                           |    1
drivers/net/gianfar_ethtool.c                   |    1
drivers/net/gianfar_phy.c                       |    1
drivers/net/hp100.c                             |    1
drivers/net/ibmveth.c                           |    1
drivers/net/irda/sir_kthread.c                  |    4 -
drivers/net/irda/vlsi_ir.h                      |   22 --------
drivers/net/iseries_veth.c                      |    1
drivers/net/mac8390.c                           |    1
drivers/net/mv643xx_eth.h                       |    1
drivers/net/ppp_mppe.c                          |    1
drivers/net/s2io.c                              |    1
drivers/net/sk98lin/h/skdrv1st.h                |    3 -
drivers/net/sk_mca.c                            |    1
drivers/net/sk_mca.h                            |    2
drivers/net/starfire.c                          |    3 -
drivers/net/tokenring/lanstreamer.c             |   59 ------------------------
drivers/net/tokenring/lanstreamer.h             |   14 -----
drivers/net/typhoon.c                           |    9 ---
drivers/net/via-velocity.c                      |    1
drivers/net/wan/farsync.c                       |    2
drivers/net/wireless/hostap/hostap.c            |    1
drivers/net/wireless/hostap/hostap_crypt_ccmp.c |    1
drivers/net/wireless/hostap/hostap_crypt_tkip.c |    1
drivers/net/wireless/hostap/hostap_crypt_wep.c  |    1
drivers/net/wireless/hostap/hostap_cs.c         |    1
drivers/net/wireless/hostap/hostap_hw.c         |    1
drivers/net/wireless/hostap/hostap_pci.c        |    1
drivers/net/wireless/hostap/hostap_plx.c        |    1
drivers/net/wireless/ipw2100.c                  |    1
drivers/net/wireless/ipw2100.h                  |    1
drivers/net/wireless/ipw2200.c                  |    8 ---
drivers/net/wireless/ipw2200.h                  |   10 ----
drivers/net/wireless/orinoco.h                  |    1
drivers/net/wireless/prism54/isl_38xx.c         |    1
drivers/net/wireless/prism54/isl_38xx.h         |    1
drivers/net/wireless/prism54/isl_ioctl.c        |    1
drivers/net/wireless/prism54/islpci_dev.c       |    1
drivers/net/wireless/prism54/islpci_dev.h       |    1
drivers/net/wireless/prism54/islpci_eth.c       |    1
drivers/net/wireless/prism54/islpci_hotplug.c   |    1
46 files changed, 5 insertions(+), 179 deletions(-)

Index: linux-2.6.13-rc2-mm1/drivers/net/acenic.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/acenic.c
+++ linux-2.6.13-rc2-mm1/drivers/net/acenic.c
@@ -53,7 +53,6 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
-#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/ioport.h>
@@ -164,12 +163,6 @@ MODULE_DEVICE_TABLE(pci, acenic_pci_tbl)
#define SET_NETDEV_DEV(net, pdev)	do{} while(0)
#endif

-#if LINUX_VERSION_CODE >= 0x2051c
-#define ace_sync_irq(irq)	synchronize_irq(irq)
-#else
-#define ace_sync_irq(irq)	synchronize_irq()
-#endif
-
#ifndef offset_in_page
#define offset_in_page(ptr)	((unsigned long)(ptr) & ~PAGE_MASK)
#endif
@@ -657,7 +650,7 @@ static void __devexit acenic_remove_one(
* Then release the RX buffers - jumbo buffers were
* already released in ace_close().
*/
-	ace_sync_irq(dev->irq);
+	synchronize_irq(dev->irq);

for (i = 0; i < RX_STD_RING_ENTRIES; i++) {
struct sk_buff *skb = ap->skb->rx_std_skbuff[i].skb;
@@ -2657,7 +2650,7 @@ static int ace_change_mtu(struct net_dev
}
} else {
while (test_and_set_bit(0, &ap->jumbo_refill_busy));
-		ace_sync_irq(dev->irq);
+		synchronize_irq(dev->irq);
ace_set_rxtx_parms(dev, 0);
if (ap->jumbo) {
struct cmd cmd;
Index: linux-2.6.13-rc2-mm1/drivers/net/acenic.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/acenic.h
+++ linux-2.6.13-rc2-mm1/drivers/net/acenic.h
@@ -1,8 +1,6 @@
#ifndef _ACENIC_H_
#define _ACENIC_H_

-#include <linux/config.h>
-
/*
* Generate TX index update each time, when TX ring is closed.
* Normally, this is not useful, because results in more dma (and irqs
@@ -747,7 +745,7 @@ static inline void ace_mask_irq(struct n
else
writel(readl(&regs->HostCtrl) | MASK_INTS, &regs->HostCtrl);

-	ace_sync_irq(dev->irq);
+	synchronize_irq(dev->irq);
}


Index: linux-2.6.13-rc2-mm1/drivers/net/b44.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/b44.c
+++ linux-2.6.13-rc2-mm1/drivers/net/b44.c
@@ -18,7 +18,6 @@
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/init.h>
-#include <linux/version.h>

#include <asm/uaccess.h>
#include <asm/io.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/dm9000.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/dm9000.c
+++ linux-2.6.13-rc2-mm1/drivers/net/dm9000.c
@@ -56,7 +56,6 @@
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/skbuff.h>
-#include <linux/version.h>
#include <linux/spinlock.h>
#include <linux/crc32.h>
#include <linux/mii.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/gianfar.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/gianfar.c
+++ linux-2.6.13-rc2-mm1/drivers/net/gianfar.c
@@ -94,7 +94,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/dma-mapping.h>
#include <linux/crc32.h>

Index: linux-2.6.13-rc2-mm1/drivers/net/gianfar.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/gianfar.h
+++ linux-2.6.13-rc2-mm1/drivers/net/gianfar.h
@@ -43,7 +43,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/crc32.h>
#include <linux/workqueue.h>
#include <linux/ethtool.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/gianfar_ethtool.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/gianfar_ethtool.c
+++ linux-2.6.13-rc2-mm1/drivers/net/gianfar_ethtool.c
@@ -34,7 +34,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/crc32.h>
#include <asm/types.h>
#include <asm/uaccess.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/gianfar_phy.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/gianfar_phy.c
+++ linux-2.6.13-rc2-mm1/drivers/net/gianfar_phy.c
@@ -36,7 +36,6 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/crc32.h>
#include <linux/mii.h>

Index: linux-2.6.13-rc2-mm1/drivers/net/hp100.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/hp100.c
+++ linux-2.6.13-rc2-mm1/drivers/net/hp100.c
@@ -96,7 +96,6 @@

#undef HP100_MULTICAST_FILTER	/* Need to be debugged... */

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/ibmveth.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/ibmveth.c
+++ linux-2.6.13-rc2-mm1/drivers/net/ibmveth.c
@@ -35,7 +35,6 @@

#include <linux/config.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/ioport.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/irda/sir_kthread.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/irda/sir_kthread.c
+++ linux-2.6.13-rc2-mm1/drivers/net/irda/sir_kthread.c
@@ -14,7 +14,6 @@

#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <linux/completion.h>
@@ -140,9 +139,6 @@ static int irda_thread(void *startup)
run_irda_queue();
}

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,35)
-	reparent_to_init();
-#endif
complete_and_exit(&irda_rq_queue.exit, 0);
/* never reached */
return 0;
Index: linux-2.6.13-rc2-mm1/drivers/net/irda/vlsi_ir.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/irda/vlsi_ir.h
+++ linux-2.6.13-rc2-mm1/drivers/net/irda/vlsi_ir.h
@@ -49,26 +49,6 @@ typedef void irqreturn_t;
#define IRQ_RETVAL(x)
#endif

-/* some stuff need to check kernelversion. Not all 2.5 stuff was present
- * in early 2.5.x - the test is merely to separate 2.4 from 2.5
- */
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-
-/* PDE() introduced in 2.5.4 */
-#ifdef CONFIG_PROC_FS
-#define PDE(inode) ((inode)->u.generic_ip)
-#endif
-
-/* irda crc16 calculation exported in 2.5.42 */
-#define irda_calc_crc16(fcs,buf,len)	(GOOD_FCS)
-
-/* we use this for unified pci device name access */
-#define PCIDEV_NAME(pdev)	((pdev)->name)
-
-#else /* 2.5 or later */
-
/* recent 2.5/2.6 stores pci device names at varying places ;-) */
#ifdef CONFIG_PCI_NAMES
/* human readable name */
@@ -78,8 +58,6 @@ typedef void irqreturn_t;
#define PCIDEV_NAME(pdev)	(pci_name(pdev))
#endif

-#endif
-
/* ================================================================ */

/* non-standard PCI registers */
Index: linux-2.6.13-rc2-mm1/drivers/net/iseries_veth.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/iseries_veth.c
+++ linux-2.6.13-rc2-mm1/drivers/net/iseries_veth.c
@@ -57,7 +57,6 @@

#include <linux/config.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/ioport.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/mac8390.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/mac8390.c
+++ linux-2.6.13-rc2-mm1/drivers/net/mac8390.c
@@ -15,7 +15,6 @@
* and fixed access to Sonic Sys card which masquerades as a Farallon
* by rayk@knightsmanor.org */

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/mv643xx_eth.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/mv643xx_eth.h
+++ linux-2.6.13-rc2-mm1/drivers/net/mv643xx_eth.h
@@ -1,7 +1,6 @@
#ifndef __MV643XX_ETH_H__
#define __MV643XX_ETH_H__

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/spinlock.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/s2io.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/s2io.c
+++ linux-2.6.13-rc2-mm1/drivers/net/s2io.c
@@ -54,7 +54,6 @@
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/ethtool.h>
-#include <linux/version.h>
#include <linux/workqueue.h>

#include <asm/io.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/sk98lin/h/skdrv1st.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/sk98lin/h/skdrv1st.h
+++ linux-2.6.13-rc2-mm1/drivers/net/sk98lin/h/skdrv1st.h
@@ -39,9 +39,6 @@
#ifndef __INC_SKDRV1ST_H
#define __INC_SKDRV1ST_H

-/* Check kernel version */
-#include <linux/version.h>
-
typedef struct s_AC	SK_AC;

/* Set card versions */
Index: linux-2.6.13-rc2-mm1/drivers/net/sk_mca.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/sk_mca.c
+++ linux-2.6.13-rc2-mm1/drivers/net/sk_mca.c
@@ -93,7 +93,6 @@ History:
#include <linux/mca-legacy.h>
#include <linux/init.h>
#include <linux/module.h>
-#include <linux/version.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/sk_mca.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/sk_mca.h
+++ linux-2.6.13-rc2-mm1/drivers/net/sk_mca.h
@@ -1,5 +1,3 @@
-#include <linux/version.h>
-
#ifndef _SK_MCA_INCLUDE_
#define _SK_MCA_INCLUDE_

Index: linux-2.6.13-rc2-mm1/drivers/net/starfire.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/starfire.c
+++ linux-2.6.13-rc2-mm1/drivers/net/starfire.c
@@ -143,7 +143,6 @@ TODO:	- fix forced speed/duplexing code
#define DRV_RELDATE	"January 19, 2005"

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
@@ -257,7 +256,7 @@ static int full_duplex[MAX_UNITS] = {0,
* This SUCKS.
* We need a much better method to determine if dma_addr_t is 64-bit.
*/
-#if (defined(__i386__) && defined(CONFIG_HIGHMEM) && (LINUX_VERSION_CODE > 0x20500 || defined(CONFIG_HIGHMEM64G))) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR))
+#if (defined(__i386__) && defined(CONFIG_HIGHMEM)) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR))
/* 64-bit dma_addr_t */
#define ADDR_64BITS	/* This chip uses 64 bit addresses. */
#define cpu_to_dma(x) cpu_to_le64(x)
Index: linux-2.6.13-rc2-mm1/drivers/net/tokenring/lanstreamer.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/tokenring/lanstreamer.c
+++ linux-2.6.13-rc2-mm1/drivers/net/tokenring/lanstreamer.c
@@ -120,7 +120,6 @@
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/spinlock.h>
-#include <linux/version.h>
#include <linux/bitops.h>

#include <net/checksum.h>
@@ -1932,64 +1931,6 @@ static int sprintf_info(char *buffer, st
#endif
#endif

-#if STREAMER_IOCTL && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-static int streamer_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-        int i;
-	struct streamer_private *streamer_priv = (struct streamer_private *) dev->priv;
-	u8 __iomem *streamer_mmio = streamer_priv->streamer_mmio;
-
-	switch(cmd) {
-	case IOCTL_SISR_MASK:
-		writew(SISR_MI, streamer_mmio + SISR_MASK_SUM);
-		break;
-	case IOCTL_SPIN_LOCK_TEST:
-	        printk(KERN_INFO "spin_lock() called.n");
-		spin_lock(&streamer_priv->streamer_lock);
-		spin_unlock(&streamer_priv->streamer_lock);
-		printk(KERN_INFO "spin_unlock() finished.n");
-		break;
-	case IOCTL_PRINT_BDAS:
-	        printk(KERN_INFO "bdas: RXBDA: %x RXLBDA: %x TX2FDA: %x TX2LFDA: %xn",
-		       readw(streamer_mmio + RXBDA),
-		       readw(streamer_mmio + RXLBDA),
-		       readw(streamer_mmio + TX2FDA),
-		       readw(streamer_mmio + TX2LFDA));
-		break;
-	case IOCTL_PRINT_REGISTERS:
-	        printk(KERN_INFO "registers:n");
-		printk(KERN_INFO "SISR: %04x MISR: %04x LISR: %04x BCTL: %04x BMCTL: %04xnmask  %04x mask  %04xn",
-		       readw(streamer_mmio + SISR),
-		       readw(streamer_mmio + MISR_RUM),
-		       readw(streamer_mmio + LISR),
-		       readw(streamer_mmio + BCTL),
-		       readw(streamer_mmio + BMCTL_SUM),
-		       readw(streamer_mmio + SISR_MASK),
-		       readw(streamer_mmio + MISR_MASK));
-		break;
-	case IOCTL_PRINT_RX_BUFS:
-	        printk(KERN_INFO "Print rx bufs:n");
-		for(i=0; i<STREAMER_RX_RING_SIZE; i++)
-		        printk(KERN_INFO "rx_ring %d status: 0x%xn", i,
-			       streamer_priv->streamer_rx_ring[i].status);
-		break;
-	case IOCTL_PRINT_TX_BUFS:
-	        printk(KERN_INFO "Print tx bufs:n");
-		for(i=0; i<STREAMER_TX_RING_SIZE; i++)
-		        printk(KERN_INFO "tx_ring %d status: 0x%xn", i,
-			       streamer_priv->streamer_tx_ring[i].status);
-		break;
-	case IOCTL_RX_CMD:
-	        streamer_rx(dev);
-		printk(KERN_INFO "Sent rx command.n");
-		break;
-	default:
-	        printk(KERN_INFO "Bad ioctl!n");
-	}
-	return 0;
-}
-#endif
-
static struct pci_driver streamer_pci_driver = {
.name     = "lanstreamer",
.id_table = streamer_pci_tbl,
Index: linux-2.6.13-rc2-mm1/drivers/net/tokenring/lanstreamer.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/tokenring/lanstreamer.h
+++ linux-2.6.13-rc2-mm1/drivers/net/tokenring/lanstreamer.h
@@ -60,20 +60,6 @@
*
*/

-#include <linux/version.h>
-
-#if STREAMER_IOCTL && (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <asm/ioctl.h>
-#define IOCTL_PRINT_RX_BUFS   SIOCDEVPRIVATE
-#define IOCTL_PRINT_TX_BUFS   SIOCDEVPRIVATE+1
-#define IOCTL_RX_CMD          SIOCDEVPRIVATE+2
-#define IOCTL_TX_CMD          SIOCDEVPRIVATE+3
-#define IOCTL_PRINT_REGISTERS SIOCDEVPRIVATE+4
-#define IOCTL_PRINT_BDAS      SIOCDEVPRIVATE+5
-#define IOCTL_SPIN_LOCK_TEST  SIOCDEVPRIVATE+6
-#define IOCTL_SISR_MASK       SIOCDEVPRIVATE+7
-#endif
-
/* MAX_INTR - the maximum number of times we can loop
* inside the interrupt function before returning
* control to the OS (maximum value is 256)
Index: linux-2.6.13-rc2-mm1/drivers/net/typhoon.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/typhoon.c
+++ linux-2.6.13-rc2-mm1/drivers/net/typhoon.c
@@ -128,7 +128,6 @@ static const int multicast_filter_limit
#include <asm/uaccess.h>
#include <linux/in6.h>
#include <asm/checksum.h>
-#include <linux/version.h>
#include <linux/dma-mapping.h>

#include "typhoon.h"
@@ -333,12 +332,6 @@ enum state_values {
#define TYPHOON_RESET_TIMEOUT_NOSLEEP	((6 * 1000000) / TYPHOON_UDELAY)
#define TYPHOON_WAIT_TIMEOUT		((1000000 / 2) / TYPHOON_UDELAY)

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)
-#define typhoon_synchronize_irq(x) synchronize_irq()
-#else
-#define typhoon_synchronize_irq(x) synchronize_irq(x)
-#endif
-
#if defined(NETIF_F_TSO)
#define skb_tso_size(x)		(skb_shinfo(x)->tso_size)
#define TSO_NUM_DESCRIPTORS	2
@@ -2173,7 +2166,7 @@ typhoon_close(struct net_device *dev)
printk(KERN_ERR "%s: unable to stop runtimen", dev->name);

/* Make sure there is no irq handler running on a different CPU. */
-	typhoon_synchronize_irq(dev->irq);
+	synchronize_irq(dev->irq);
free_irq(dev->irq, dev);

typhoon_free_rx_rings(tp);
Index: linux-2.6.13-rc2-mm1/drivers/net/via-velocity.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/via-velocity.c
+++ linux-2.6.13-rc2-mm1/drivers/net/via-velocity.c
@@ -61,7 +61,6 @@
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
-#include <linux/version.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <asm/io.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wan/farsync.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wan/farsync.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wan/farsync.c
@@ -17,7 +17,6 @@

#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/pci.h>
#include <linux/ioport.h>
#include <linux/init.h>
@@ -1807,7 +1806,6 @@ gather_conf_info(struct fst_card_info *c
memset(info, 0, sizeof (struct fstioc_info));

i = port->index;
-	info->kernelVersion = LINUX_VERSION_CODE;
info->nports = card->nports;
info->type = card->type;
info->state = card->state;
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/orinoco.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/orinoco.h
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/orinoco.h
@@ -13,7 +13,6 @@
#include <linux/spinlock.h>
#include <linux/netdevice.h>
#include <linux/wireless.h>
-#include <linux/version.h>

#include "hermes.h"

Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_38xx.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/isl_38xx.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_38xx.c
@@ -18,7 +18,6 @@
*
*/

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/delay.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_38xx.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/isl_38xx.h
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_38xx.h
@@ -20,7 +20,6 @@
#ifndef _ISL_38XX_H
#define _ISL_38XX_H

-#include <linux/version.h>
#include <asm/io.h>
#include <asm/byteorder.h>

Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_ioctl.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/isl_ioctl.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/isl_ioctl.c
@@ -20,7 +20,6 @@
*
*/

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/if_arp.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_dev.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/islpci_dev.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_dev.c
@@ -19,7 +19,6 @@
*
*/

-#include <linux/version.h>
#include <linux/module.h>

#include <linux/netdevice.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_dev.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/islpci_dev.h
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_dev.h
@@ -23,7 +23,6 @@
#ifndef _ISLPCI_DEV_H
#define _ISLPCI_DEV_H

-#include <linux/version.h>
#include <linux/netdevice.h>
#include <linux/wireless.h>
#include <net/iw_handler.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_eth.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/islpci_eth.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_eth.c
@@ -17,7 +17,6 @@
*
*/

-#include <linux/version.h>
#include <linux/module.h>

#include <linux/pci.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_hotplug.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/prism54/islpci_hotplug.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -18,7 +18,6 @@
*
*/

-#include <linux/version.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/delay.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/ppp_mppe.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/ppp_mppe.c
+++ linux-2.6.13-rc2-mm1/drivers/net/ppp_mppe.c
@@ -44,7 +44,6 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap.c
@@ -17,7 +17,6 @@
#endif

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_ccmp.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_crypt_ccmp.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_ccmp.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_tkip.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_crypt_tkip.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_tkip.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_wep.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_crypt_wep.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_crypt_wep.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_cs.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_cs.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_cs.c
@@ -1,7 +1,6 @@
#define PRISM2_PCCARD

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/if.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_hw.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_hw.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_hw.c
@@ -31,7 +31,6 @@


#include <linux/config.h>
-#include <linux/version.h>

#include <asm/delay.h>
#include <asm/uaccess.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_pci.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_pci.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_pci.c
@@ -5,7 +5,6 @@
* Andy Warner <andyw@pobox.com> */

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/if.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_plx.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/hostap/hostap_plx.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/hostap/hostap_plx.c
@@ -8,7 +8,6 @@


#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/if.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2100.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/ipw2100.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2100.c
@@ -159,7 +159,6 @@ that only one external action is invoked
#include <linux/stringify.h>
#include <linux/tcp.h>
#include <linux/types.h>
-#include <linux/version.h>
#include <linux/time.h>
#include <linux/firmware.h>
#include <linux/acpi.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2100.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/ipw2100.h
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2100.h
@@ -37,7 +37,6 @@
#include <linux/socket.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#include <linux/version.h>
#include <net/iw_handler.h>	// new driver API

#include <net/ieee80211.h>
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2200.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/ipw2200.c
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2200.c
@@ -7242,11 +7242,7 @@ static int ipw_pci_suspend(struct pci_de
/* Remove the PRESENT state of the device */
netif_device_detach(dev);

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-	pci_save_state(pdev, priv->pm_state);
-#else
pci_save_state(pdev);
-#endif
pci_disable_device(pdev);
pci_set_power_state(pdev, state);

@@ -7263,11 +7259,7 @@ static int ipw_pci_resume(struct pci_dev

pci_set_power_state(pdev, 0);
pci_enable_device(pdev);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-	pci_restore_state(pdev, priv->pm_state);
-#else
pci_restore_state(pdev);
-#endif
/*
* Suspend/Resume resets the PCI configuration space, so we have to
* re-disable the RETRY_TIMEOUT register (0x41) to keep PCI Tx retries
Index: linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2200.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/drivers/net/wireless/ipw2200.h
+++ linux-2.6.13-rc2-mm1/drivers/net/wireless/ipw2200.h
@@ -34,7 +34,6 @@
#include <linux/config.h>
#include <linux/init.h>

-#include <linux/version.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/ethtool.h>
@@ -62,15 +61,6 @@ typedef void irqreturn_t;
#define IRQ_RETVAL(x)
#endif

-#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) )
-#define __iomem
-#endif
-
-#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) )
-#define pci_dma_sync_single_for_cpu	pci_dma_sync_single
-#define pci_dma_sync_single_for_device	pci_dma_sync_single
-#endif
-
#ifndef HAVE_FREE_NETDEV
#define free_netdev(x) kfree(x)
#endif

^ permalink raw reply

* [PATCH 71/82] remove linux/version.h from include/linux/if_wanpipe_common.h
From: Olaf Hering @ 2005-07-10 19:36 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: netdev
In-Reply-To: <20050710193508.0.PmFpst2252.2247.olh@nectarine.suse.de>


changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason.

Signed-off-by: Olaf Hering <olh@suse.de>

include/linux/if_wanpipe_common.h |    2 --
1 files changed, 2 deletions(-)

Index: linux-2.6.13-rc2-mm1/include/linux/if_wanpipe_common.h
===================================================================
--- linux-2.6.13-rc2-mm1.orig/include/linux/if_wanpipe_common.h
+++ linux-2.6.13-rc2-mm1/include/linux/if_wanpipe_common.h
@@ -17,8 +17,6 @@
#ifndef _WANPIPE_SOCK_DRIVER_COMMON_H
#define _WANPIPE_SOCK_DRIVER_COMMON_H

-#include <linux/version.h>
-
typedef struct {
struct net_device *slave;
atomic_t packet_sent;

^ permalink raw reply

* [PATCH 78/82] remove linux/version.h from net/ieee80211/
From: Olaf Hering @ 2005-07-10 19:36 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel; +Cc: Jeff Garzik, netdev
In-Reply-To: <20050710193508.0.PmFpst2252.2247.olh@nectarine.suse.de>


changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason.

Signed-off-by: Olaf Hering <olh@suse.de>

net/ieee80211/ieee80211_crypt.c      |    1 -
net/ieee80211/ieee80211_crypt_ccmp.c |    1 -
net/ieee80211/ieee80211_crypt_tkip.c |    1 -
net/ieee80211/ieee80211_crypt_wep.c  |    1 -
net/ieee80211/ieee80211_module.c     |    1 -
net/ieee80211/ieee80211_rx.c         |    1 -
net/ieee80211/ieee80211_tx.c         |    1 -
net/ieee80211/ieee80211_wx.c         |    1 -
8 files changed, 8 deletions(-)

Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_crypt.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt.c
@@ -12,7 +12,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_ccmp.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_crypt_ccmp.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_tkip.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_crypt_tkip.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_tkip.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_wep.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_crypt_wep.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_crypt_wep.c
@@ -10,7 +10,6 @@
*/

#include <linux/config.h>
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_module.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_module.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_module.c
@@ -46,7 +46,6 @@
#include <linux/slab.h>
#include <linux/tcp.h>
#include <linux/types.h>
-#include <linux/version.h>
#include <linux/wireless.h>
#include <linux/etherdevice.h>
#include <asm/uaccess.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_rx.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_rx.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_rx.c
@@ -29,7 +29,6 @@
#include <linux/slab.h>
#include <linux/tcp.h>
#include <linux/types.h>
-#include <linux/version.h>
#include <linux/wireless.h>
#include <linux/etherdevice.h>
#include <asm/uaccess.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_tx.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_tx.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_tx.c
@@ -39,7 +39,6 @@
#include <linux/slab.h>
#include <linux/tcp.h>
#include <linux/types.h>
-#include <linux/version.h>
#include <linux/wireless.h>
#include <linux/etherdevice.h>
#include <asm/uaccess.h>
Index: linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_wx.c
===================================================================
--- linux-2.6.13-rc2-mm1.orig/net/ieee80211/ieee80211_wx.c
+++ linux-2.6.13-rc2-mm1/net/ieee80211/ieee80211_wx.c
@@ -30,7 +30,6 @@

******************************************************************************/
#include <linux/wireless.h>
-#include <linux/version.h>
#include <linux/kmod.h>
#include <linux/module.h>

^ permalink raw reply

* Re: [PATCH] forcedeth: Additional ethtool support
From: Francois Romieu @ 2005-07-10 23:26 UTC (permalink / raw)
  To: Manfred Spraul; +Cc: Jeff Garzik, Netdev, renaud.lienhart
In-Reply-To: <42D16656.6000207@colorfullife.com>

Manfred Spraul <manfred@colorfullife.com> :
[memcpy_fromio]
> Not for a nic without complete documentation: What if an arch uses 
> 64-bit reads to read two registers at the same time?

So far, no citizen of arch/ does. Afaik it would probably be a bad
idea on pci-x.

> that, for example IIRC natsemi explicitely mandates 32-bit reads.
> x86-64 doesn't, it uses 32-bit reads, but I don't like the idea of using 
> memcpy to read registers.

Ok.

--
Ueimor

^ permalink raw reply

* [KJ] network drivers that still use cli()
From: Brandon Niemczyk @ 2005-07-11  5:00 UTC (permalink / raw)
  To: kernel-janitors; +Cc: netdev

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

the following list of files still use cli().  Are all of these still in
use?

The eventual goal is I'd like to remove the unused drivers and fix the
others.


drivers/net/wan/sdla_x25.c
drivers/net/cris/eth_v10.c
drivers/net/irda/ep7211_ir.c
drivers/net/fec.c
drivers/net/tulip/xircom_tulip_cb.c
drivers/net/hamradio/dmascc.c
drivers/net/oaknet.c
drivers/net/ni52.c



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply

* Message ("Your message dated Mon, 11 Jul 2005 10:09:26...")
From: Sunet/KTH NOC LISTSERV Server (14.3) @ 2005-07-11  9:09 UTC (permalink / raw)
  To: netdev

Your message dated Mon, 11 Jul 2005 10:09:26 +0100 with subject "Returned
mail:  Data format  error" has  been submitted  to the  moderator of  the
MAV-EMAS-ISO list: Jonas Lagneryd <jonas.lagneryd@REGIONVARMLAND.SE>.

^ permalink raw reply

* Re: [PATCH] loop unrolling in net/sched/sch_generic.c
From: David S. Miller @ 2005-07-12  4:02 UTC (permalink / raw)
  To: arnaldo.melo; +Cc: dada1, tgraf, netdev
In-Reply-To: <39e6f6c7050708040877702f6f@mail.gmail.com>

From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
Date: Fri, 8 Jul 2005 08:08:54 -0300

> > struct inet_sock {
> > /* sk and pinet6 has to be the first two members of inet_sock */
> > struct sock sk;
> > #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> > struct ipv6_pinfo *pinet6;
> > #endif
> 
> /me pleads guilty, Dave, any problem with removing this #ifdef? Humm, I'll 
> think about using

Just leave it for now.  If we come up with some spectacularly
nice way to deal with this in the future, we can change it then.

^ permalink raw reply

* [-mm patch] net/ieee80211/: remove pci.h #include's
From: Adrian Bunk @ 2005-07-12 20:27 UTC (permalink / raw)
  To: Andrew Morton; +Cc: jgarzik, jkmaline, hostap, netdev, linux-kernel

I was wondering why editing pci.h triggered the rebuild of three files 
under net/, and as far as I can see, there's no reason for these three 
files to #include pci.h .

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 3 Jul 2005
- 30 May 2005
- 1 May 2005

 net/ieee80211/ieee80211_module.c |    1 -
 net/ieee80211/ieee80211_rx.c     |    1 -
 net/ieee80211/ieee80211_tx.c     |    1 -
 3 files changed, 3 deletions(-)

--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_module.c.old	2005-04-30 23:23:14.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_module.c	2005-04-30 23:23:18.000000000 +0200
@@ -40,7 +40,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
-#include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/skbuff.h>
 #include <linux/slab.h>
--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_tx.c.old	2005-04-30 23:23:25.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_tx.c	2005-04-30 23:23:32.000000000 +0200
@@ -33,7 +33,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
-#include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/skbuff.h>
 #include <linux/slab.h>
--- linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_rx.c.old	2005-04-30 23:23:42.000000000 +0200
+++ linux-2.6.12-rc3-mm1-full/net/ieee80211/ieee80211_rx.c	2005-04-30 23:23:46.000000000 +0200
@@ -23,7 +23,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/netdevice.h>
-#include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/skbuff.h>
 #include <linux/slab.h>

^ permalink raw reply

* Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: Christoph Hellwig @ 2005-07-12 20:27 UTC (permalink / raw)
  To: raghavendra.koushik
  Cc: jgarzik, netdev, ravinandan.arakali, leonid.grossman,
	rapuru.sriram
In-Reply-To: <20050707222741.71C3E89826@linux.site>

> 3. Enable two-buffer mode(for Rx path) automatically for SGI
>    systems. This improves Rx performance dramatically on 
>    SGI systems.

> +/* Enable 2 buffer mode by default for SGI system */
> +#ifdef CONFIG_IA64_SGI_SN2
> +#define CONFIG_2BUFF_MODE
> +#endif

this enabled it only on kernel that are built to only run on SN2
hardware, which is completely useless in practice.  Besides that defining
a CONFIG_ symbol from source files is a big no-go.

What exactly is the 2buff mode, and more specific what are the downsides
of  enabling it on non-SGI hardware?

^ permalink raw reply

* Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: David S. Miller @ 2005-07-12 20:34 UTC (permalink / raw)
  To: hch
  Cc: raghavendra.koushik, jgarzik, netdev, ravinandan.arakali,
	leonid.grossman, rapuru.sriram
In-Reply-To: <20050712202754.GA10768@infradead.org>

From: Christoph Hellwig <hch@infradead.org>
Date: Tue, 12 Jul 2005 21:27:54 +0100

> > +/* Enable 2 buffer mode by default for SGI system */
> > +#ifdef CONFIG_IA64_SGI_SN2
> > +#define CONFIG_2BUFF_MODE
> > +#endif
> 
> this enabled it only on kernel that are built to only run on SN2
> hardware, which is completely useless in practice.  Besides that defining
> a CONFIG_ symbol from source files is a big no-go.

Yes, do this in the Kconfig file instead.

^ permalink raw reply

* RE: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: Leonid Grossman @ 2005-07-12 20:56 UTC (permalink / raw)
  To: 'Christoph Hellwig', raghavendra.koushik
  Cc: jgarzik, netdev, ravinandan.arakali, rapuru.sriram
In-Reply-To: <20050712202754.GA10768@infradead.org>

 

> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org] 
> Sent: Tuesday, July 12, 2005 1:28 PM
> To: raghavendra.koushik@neterion.com
> Cc: jgarzik@pobox.com; netdev@oss.sgi.com; 
> ravinandan.arakali@neterion.com; 
> leonid.grossman@neterion.com; rapuru.sriram@neterion.com
> Subject: Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
> 
> > 3. Enable two-buffer mode(for Rx path) automatically for SGI
> >    systems. This improves Rx performance dramatically on 
> >    SGI systems.
> 
> > +/* Enable 2 buffer mode by default for SGI system */ #ifdef 
> > +CONFIG_IA64_SGI_SN2 #define CONFIG_2BUFF_MODE #endif
> 
> this enabled it only on kernel that are built to only run on 
> SN2 hardware, which is completely useless in practice.  
> Besides that defining a CONFIG_ symbol from source files is a 
> big no-go.
> 
> What exactly is the 2buff mode, and more specific what are 
> the downsides of  enabling it on non-SGI hardware?

In short, this is one of the ASIC modes where headers and payload are
separated by the hardware, and placed in separate receive buffers. (More
details are in the ASIC programming manual that is posted on ns1.s2io.com).
On SGI platforms, the two buffer mode results in a significant rx
performance boost since it allows to achieve both aligned transfers on the
bus and aligned data copies. 
It has been tested on Altix systems quite a bit (the card is OEMed and
shipped by SGI).
On other platforms, we haven't seen significant benefits from header
separation modes (unless they are combined with different features, which is
another story), and we decided not to introduce an extra bus transfer unless
it is clearly justified.
Also, the feature has not been sufficiently tested on other platforms,
For these reasons, it is left as a feature that's specific to SGI chipset -
but it is really beneficial there.

Leonid



> 
> 

^ permalink raw reply

* RE: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: Ravinandan Arakali @ 2005-07-12 21:00 UTC (permalink / raw)
  To: 'David S. Miller', hch
  Cc: raghavendra.koushik, jgarzik, netdev, leonid.grossman,
	rapuru.sriram
In-Reply-To: <20050712.133404.52118192.davem@davemloft.net>

The two-buffer mode was added as a configurable option
to Kconfig file several months ago. Hence the macro
is CONFIG_2BUFF_MODE.

The two-buffer receive mode involves two buffers (128 byte
aligned) for each packet. This mode drastically increases
performance on SGI platforms and hence enabled only for
these platforms. On other platforms, there's no difference
compared to one-buffer mode but the added complexity and
extra memory allocated does not make it worthwhile to
enable this mode for non-SGI platforms. Also, most of 
our QA cycle on non-SGI platforms has been done with
one-buffer mode.

Thanks,
Ravi


> > +/* Enable 2 buffer mode by default for SGI system */
> > +#ifdef CONFIG_IA64_SGI_SN2
> > +#define CONFIG_2BUFF_MODE
> > +#endif
> 
> this enabled it only on kernel that are built to only run on SN2
> hardware, which is completely useless in practice.  Besides that defining
> a CONFIG_ symbol from source files is a big no-go.

Yes, do this in the Kconfig file instead.

^ permalink raw reply

* Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: David S. Miller @ 2005-07-12 21:04 UTC (permalink / raw)
  To: ravinandan.arakali
  Cc: hch, raghavendra.koushik, jgarzik, netdev, leonid.grossman,
	rapuru.sriram
In-Reply-To: <000a01c58724$ca41a7c0$4f10100a@pc.s2io.com>

From: "Ravinandan Arakali" <ravinandan.arakali@neterion.com>
Subject: RE: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
Date: Tue, 12 Jul 2005 14:00:52 -0700

> The two-buffer mode was added as a configurable option
> to Kconfig file several months ago. Hence the macro
> is CONFIG_2BUFF_MODE.

We're saying that you should choose CONFIG_2BUFF_MODE, when
CONFIG_IA64_SGI_SN2 is set, inside the Kconfig file using the
"default" Kconfig directive.

You should never change the setting of CONFIG_* macros in C source.

^ permalink raw reply

* Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: Christoph Hellwig @ 2005-07-12 21:07 UTC (permalink / raw)
  To: David S. Miller
  Cc: ravinandan.arakali, hch, raghavendra.koushik, jgarzik, netdev,
	leonid.grossman, rapuru.sriram
In-Reply-To: <20050712.140411.41107257.davem@davemloft.net>

On Tue, Jul 12, 2005 at 02:04:11PM -0700, David S. Miller wrote:
> From: "Ravinandan Arakali" <ravinandan.arakali@neterion.com>
> Subject: RE: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
> Date: Tue, 12 Jul 2005 14:00:52 -0700
> 
> > The two-buffer mode was added as a configurable option
> > to Kconfig file several months ago. Hence the macro
> > is CONFIG_2BUFF_MODE.
> 
> We're saying that you should choose CONFIG_2BUFF_MODE, when
> CONFIG_IA64_SGI_SN2 is set, inside the Kconfig file using the
> "default" Kconfig directive.

And that doesn't help either, CONFIG_IA64_SGI_SN2 isn't used in practice,
any production Altix with 26 kernels runs CONFIG_IA64_GENERIC kernels.

You have to make this run-time selectable.

^ permalink raw reply

* Re: [PATCH 2.6.12.1 5/12] S2io: Performance improvements
From: Andi Kleen @ 2005-07-12 21:26 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: netdev
In-Reply-To: <20050712210704.GA11622@infradead.org>

Christoph Hellwig <hch@infradead.org> writes:
> 
> And that doesn't help either, CONFIG_IA64_SGI_SN2 isn't used in practice,
> any production Altix with 26 kernels runs CONFIG_IA64_GENERIC kernels.

At least SLES9/ia64 has a SN2 kernel.

-Andi

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox