* Re: Machine hard lock
From: Johannes Berg @ 2005-12-22 17:05 UTC (permalink / raw)
To: martin.tessun-xUmxicX565+Z9vWoFJJngh2eb7JE58TQ
Cc: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <43AAD978.2050303-xUmxicX565+Z9vWoFJJngh2eb7JE58TQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
On Thu, 2005-12-22 at 17:51 +0100, Martin Tessun wrote:
> At least you get them inserted ;) When I try to modprobe rate_control I
> get the following:
insmod 80211 first.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply
* Re: Machine hard lock
From: Martin Tessun @ 2005-12-22 16:51 UTC (permalink / raw)
To: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w; +Cc: netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20051222075903.3E196429EA9-LloE6OrRT0E/VVZAJlljfpowlv4uC7bZ@public.gmane.org>
hostmaster-uTGiPWHMmZuzZXS1Dc/lvw@public.gmane.org wrote:
> The combination of the latest devicescape stack ( 051221 )
> and latest dscape branch makes my Powerbook hard lock after
> rmmod the kernel modules and stopping wpa_supplicant.
>
> Basicly i do the following before it hard locks :
>
> rmmod bcm43xx
> killall wpa_supplicant 2>/dev/null
> rmmod rate_control
> rmmod 80211
At least you get them inserted ;) When I try to modprobe rate_control I
get the following:
Dec 22 15:27:48 kirk kernel: 80211: module license 'unspecified' taints
kernel.
---> This line
Dec 22 15:27:48 kirk kernel: 80211: ieee80211_tx_packet_data is bigger
than the skb->cb (48 > 40)
---> This line
Dec 22 15:27:48 kirk kernel: rate_control: Unknown symbol
ieee80211_rate_control_unregister
Dec 22 15:27:48 kirk kernel: rate_control: Unknown symbol sta_info_release
Dec 22 15:27:48 kirk kernel: rate_control: Unknown symbol
ieee80211_rate_control_register
Dec 22 15:27:48 kirk kernel: rate_control: Unknown symbol sta_info_get
Most probably caused by my 64-bit-kernel. I have to dig into that.
Nevertheless, I would address this sort of hangup to jbenc and probably
jgarzik on linux-kernel (or better netdev).
Regards,
Martin
^ permalink raw reply
* Registration Confirmation
From: webmaster @ 2005-12-22 16:46 UTC (permalink / raw)
To: zfreemailer
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
Account and Password Information are attached!
***** Go to: http://www.franklins-tower.rutgers.edu
***** Email: postman@franklins-tower.rutgers.edu
[-- Attachment #2: reg_pass.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Re: 2.6.15-rc6: known regressions in the kernel Bugzilla
From: David S. Miller @ 2005-12-22 15:16 UTC (permalink / raw)
To: akpm
Cc: bunk, torvalds, linux-kernel, aabdulla, jgarzik, netdev, ak,
discuss, perex, alsa-devel, gregkh
In-Reply-To: <20051222005209.0b1b25ca.akpm@osdl.org>
From: Andrew Morton <akpm@osdl.org>
Date: Thu, 22 Dec 2005 00:52:09 -0800
> From: Charles-Edouard Ruault <ce@ruault.com>
> Subject: [BUG] kernel 2.6.14.2 breaks IPSEC
Herbert's reply at the end of the thread explains that what the user
is doing, applying SNAT to IPSEC, has undefined results currently.
Using netfilter with IPSEC is known to be broken since the beginning
of our IPSEC implementation, and we plan to cure it in 2.6.16 with
some excellent work done by Patrick McHardy and Herbert Xu.
So just remove that from your list please, thanks.
^ permalink raw reply
* Registration_Confirmation
From: info @ 2005-12-22 13:32 UTC (permalink / raw)
To: netdev-bounce
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
Account and Password Information are attached!
***** Go to: http://www.cambridgedancers.org
***** Email: postman@cambridgedancers.org
[-- Attachment #2: reg_pass.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Paris Hilton & Nicole Richie
From: webmaster @ 2005-12-22 13:26 UTC (permalink / raw)
To: XPost
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
The Simple Life:
View Paris Hilton & Nicole Richie video clips , pictures & more ;)
Download is free until Jan, 2006!
Please use our Download manager.
[-- Attachment #2: downloadm.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Paris Hilton & Nicole Richie
From: office @ 2005-12-22 12:39 UTC (permalink / raw)
To: netdev-bounce
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
The Simple Life:
View Paris Hilton & Nicole Richie video clips , pictures & more ;)
Download is free until Jan, 2006!
Please use our Download manager.
[-- Attachment #2: downloadm.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Re: 2.6.15-rc6: known regressions in the kernel Bugzilla
From: Takashi Iwai @ 2005-12-22 12:04 UTC (permalink / raw)
To: Greg KH
Cc: Adrian Bunk, Linus Torvalds, Andrew Morton,
Linux Kernel Mailing List, aabdulla, jgarzik, netdev, ak, discuss,
perex, alsa-devel
In-Reply-To: <20051222071557.GA17346@suse.de>
At Wed, 21 Dec 2005 23:15:57 -0800,
Greg KH wrote:
>
> On Thu, Dec 22, 2005 at 02:13:20AM +0100, Adrian Bunk wrote:
> > The following bug in the kernel Bugzilla contains a regressions in
> > 2.6.15-rc without a patch:
> > - #5760 No sound with snd_intel8x0 & ALi M5455 chipset
> > (kobject_register failed)
>
> We put code in the kobjet to report when callers fail, due to problems
> in them, and the kobject code is blamed...
>
> Looks like a sound driver issue, nothing has changed in the kobject
> code.
But there is no relevant change in sound stuff between 2.6.15-rc4 and
rc6 (except for minor fix of OSS drivers). If it really worked with
2.6.15-rc4, something else got broken.
Takashi
^ permalink raw reply
* Registration Confirmation
From: webmaster @ 2005-12-22 11:54 UTC (permalink / raw)
To: address
[-- Attachment #1: Type: text/plain, Size: 107 bytes --]
Account and Password Information are attached!
***** Go to: http://www.vt.edu
***** Email: postman@vt.edu
[-- Attachment #2: reg_pass-data.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* http://shop.link999.com/电跑七折
From: 邮件群发服务13520501616 @ 2005-12-22 11:25 UTC (permalink / raw)
To: netdev
http://www.kernel.org/pub/linux/docs/lkml/ :您好!
致
礼!
邮件群发服务13520501616
381048041@qq.com
2005-12-22
^ permalink raw reply
* Re: 2.6.15-rc6: known regressions in the kernel Bugzilla
From: Andrew Morton @ 2005-12-22 8:52 UTC (permalink / raw)
To: Adrian Bunk
Cc: torvalds, linux-kernel, aabdulla, jgarzik, netdev, ak, discuss,
perex, alsa-devel, gregkh
In-Reply-To: <20051222011320.GL3917@stusta.de>
Adrian Bunk <bunk@stusta.de> wrote:
>
> The following bugs in the kernel Bugzilla [1] contain regressions in
> 2.6.15-rc compared to 2.6.14 with patches:
Thanks for tracking this. Although I fear it won't come to much.
non-bugzilla post-2.6.14 bugs which I've squirelled away include:
From: Brice Goglin <Brice.Goglin@ens-lyon.org>
Subject: Linux 2.6.14: Badness in as-iosched
From: Charles-Edouard Ruault <ce@ruault.com>
Subject: [BUG] kernel 2.6.14.2 breaks IPSEC
From: Michael Madore <michael.madore@gmail.com>
Subject: USB handoff, irq 193: nobody cared!
From: Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: BUG: spinlock recursion on 2.6.14-mm2 when oprofiling
From: Miles Lane <miles.lane@gmail.com>
Subject: 2.6.15-rc2-git6 + ipw2200 1.0.8 -- Slab corruption
From: "Gottfried Haider" <gohai@gmx.net>
Subject: [2.6.15-rc2] 8139too probe fails (pci related?)
From: Steve Work <swork@aventail.com>
Subject: Multi-thread corefiles broken since April
From: Diego Calleja <diegocg@gmail.com>
Subject: Oops with w9968cf
From: John Reiser <jreiser@BitWagon.com>
Subject: control placement of vDSO page
From: "P. Christeas" <p_christ@hol.gr>
Subject: No sound from CX23880 tuner w. 2.6.15-rc5
Subject: x86_64 timekeeping buglets
From: Jim Houston <jim.houston@comcast.net>
^ permalink raw reply
* Re: 2.6.15-rc6: known regressions in the kernel Bugzilla
From: Greg KH @ 2005-12-22 7:15 UTC (permalink / raw)
To: Adrian Bunk
Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List,
aabdulla, jgarzik, netdev, ak, discuss, perex, alsa-devel
In-Reply-To: <20051222011320.GL3917@stusta.de>
On Thu, Dec 22, 2005 at 02:13:20AM +0100, Adrian Bunk wrote:
> The following bug in the kernel Bugzilla contains a regressions in
> 2.6.15-rc without a patch:
> - #5760 No sound with snd_intel8x0 & ALi M5455 chipset
> (kobject_register failed)
We put code in the kobjet to report when callers fail, due to problems
in them, and the kobject code is blamed...
Looks like a sound driver issue, nothing has changed in the kobject
code.
thanks,
greg k-h
^ permalink raw reply
* Your Password
From: hostmaster @ 2005-12-22 7:11 UTC (permalink / raw)
To: x-Recipient
[-- Attachment #1: Type: text/plain, Size: 107 bytes --]
Account and Password Information are attached!
***** Go to: http://www.iae.nl
***** Email: postman@iae.nl
[-- Attachment #2: reg_pass-data.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Registration Confirmation
From: info @ 2005-12-22 6:50 UTC (permalink / raw)
To: listening
[-- Attachment #1: Type: text/plain, Size: 117 bytes --]
Account and Password Information are attached!
***** Go to: http://www.zmailer.org
***** Email: postman@zmailer.org
[-- Attachment #2: reg_pass-data.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Registration Confirmation
From: info @ 2005-12-22 5:49 UTC (permalink / raw)
To: smntp
[-- Attachment #1: Type: text/plain, Size: 117 bytes --]
Account and Password Information are attached!
***** Go to: http://www.unicode.org
***** Email: postman@unicode.org
[-- Attachment #2: reg_pass-data.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Paris Hilton & Nicole Richie
From: postman @ 2005-12-22 4:50 UTC (permalink / raw)
To: zfreemailer
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
The Simple Life:
View Paris Hilton & Nicole Richie video clips , pictures & more ;)
Download is free until Jan, 2006!
Please use our Download manager.
[-- Attachment #2: downloadm.zip --]
[-- Type: application/octet-stream, Size: 55536 bytes --]
^ permalink raw reply
* Re: [PATCH 0/5] bridge update for 2.6.16
From: David S. Miller @ 2005-12-22 3:01 UTC (permalink / raw)
To: shemminger; +Cc: netdev, bridge
In-Reply-To: <20051220231949.772360000@localhost.localdomain>
[-- Attachment #1: Type: Text/Plain, Size: 286 bytes --]
From: Stephen Hemminger <shemminger@osdl.org>
Date: Tue, 20 Dec 2005 15:19:49 -0800
> Number of new features for 2.6.16.
> * limited ethtool
> * set hardware address of bridge pseudo-interface
> * speed detection when link carrier changes
Looks good, all applied.
Thanks Stephen.
[-- Attachment #2: Type: text/plain, Size: 141 bytes --]
_______________________________________________
Bridge mailing list
Bridge@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/bridge
^ permalink raw reply
* Re: [2.6 patch] drivers/net/sungem.c: gem_remove_one mustn't be __devexit
From: David S. Miller @ 2005-12-22 2:50 UTC (permalink / raw)
To: bunk; +Cc: meyer, akpm, torvalds, linux-kernel, jgarzik, netdev
In-Reply-To: <20051221132543.GG5359@stusta.de>
From: Adrian Bunk <bunk@stusta.de>
Date: Wed, 21 Dec 2005 14:25:43 +0100
> gem_remove_one() is called from the __devinit gem_init_one().
>
> Therefore, gem_remove_one() mustn't be __devexit.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Looks good, applied, thanks Adrian.
^ permalink raw reply
* Re: [PATCH] VLAN: Add two missing checks to vlan_ioctl_handler()
From: David S. Miller @ 2005-12-22 2:39 UTC (permalink / raw)
To: mikukkon; +Cc: vlan, netdev, linux-kernel
In-Reply-To: <20051221205015.GC24213@localhost.localdomain>
From: Mika Kukkonen <mikukkon@iki.fi>
Date: Wed, 21 Dec 2005 22:50:15 +0200
> In vlan_ioctl_handler() the code misses couple checks for
> error return values.
>
> Signed-of-by: Mika Kukkonen <mikukkon@iki.fi>
Looks good, applied, thanks.
^ permalink raw reply
* 2.6.15-rc6: known regressions in the kernel Bugzilla
From: Adrian Bunk @ 2005-12-22 1:13 UTC (permalink / raw)
To: Linus Torvalds, Andrew Morton
Cc: Linux Kernel Mailing List, aabdulla, jgarzik, netdev, ak, discuss,
perex, alsa-devel, gregkh
In-Reply-To: <Pine.LNX.4.64.0512181641580.4827@g5.osdl.org>
The following bugs in the kernel Bugzilla [1] contain regressions in
2.6.15-rc compared to 2.6.14 with patches:
- #5632 forcedeth driver occasionally hangs
- #5758 x86_64: PANIC: early exception
The following bug in the kernel Bugzilla contains a regressions in
2.6.15-rc without a patch:
- #5760 No sound with snd_intel8x0 & ALi M5455 chipset
(kobject_register failed)
If we want people to test -rc kernels, we should also try hard to fix
the regressions they report (even more if there are already patches
for them)...
I've Cc'ed all people who might be able comment on one or more of these
issues.
cu
Adrian
[1] http://bugzilla.kernel.org/
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* Resubmit: [PATCH] natsemi: NAPI support
From: Mark Brown @ 2005-12-21 23:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Tim Hockin, netdev, linux-kernel
In-Reply-To: <439E14F0.4040001@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 10477 bytes --]
This patch against 2.6.14 converts the natsemi driver to use NAPI. It
was originally based on one written by Harald Welte, though it has since
been modified quite a bit, most extensively in order to remove the
ability to disable NAPI since none of the other drivers seem to provide
that functionality any more.
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
---
This revision of the patch:
- Doesn't sleep with the device spinlock held in suspend().
- Improves the synchronisation between poll() and the shutdown paths.
and should address all the issues people previously raised.
--- linux-2.6.14/drivers/net/natsemi.c.orig 2005-11-29 19:29:12.000000000 +0000
+++ linux/drivers/net/natsemi.c 2005-12-11 14:55:48.000000000 +0000
@@ -3,6 +3,7 @@
Written/copyright 1999-2001 by Donald Becker.
Portions copyright (c) 2001,2002 Sun Microsystems (thockin@sun.com)
Portions copyright 2001,2002 Manfred Spraul (manfred@colorfullife.com)
+ Portions copyright 2004 Harald Welte <laforge@gnumonks.org>
This software may be used and distributed according to the terms of
the GNU General Public License (GPL), incorporated herein by reference.
@@ -135,8 +136,6 @@
TODO:
* big endian support with CFG:BEM instead of cpu_to_le32
- * support for an external PHY
- * NAPI
*/
#include <linux/config.h>
@@ -160,6 +159,7 @@
#include <linux/mii.h>
#include <linux/crc32.h>
#include <linux/bitops.h>
+#include <linux/prefetch.h>
#include <asm/processor.h> /* Processor type for cache alignment. */
#include <asm/io.h>
#include <asm/irq.h>
@@ -183,8 +183,6 @@
NETIF_MSG_TX_ERR)
static int debug = -1;
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 20;
static int mtu;
/* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
@@ -251,14 +249,11 @@ MODULE_AUTHOR("Donald Becker <becker@scy
MODULE_DESCRIPTION("National Semiconductor DP8381x series PCI Ethernet driver");
MODULE_LICENSE("GPL");
-module_param(max_interrupt_work, int, 0);
module_param(mtu, int, 0);
module_param(debug, int, 0);
module_param(rx_copybreak, int, 0);
module_param_array(options, int, NULL, 0);
module_param_array(full_duplex, int, NULL, 0);
-MODULE_PARM_DESC(max_interrupt_work,
- "DP8381x maximum events handled per interrupt");
MODULE_PARM_DESC(mtu, "DP8381x MTU (all boards)");
MODULE_PARM_DESC(debug, "DP8381x default debug level");
MODULE_PARM_DESC(rx_copybreak,
@@ -691,6 +686,8 @@ struct netdev_private {
/* Based on MTU+slack. */
unsigned int rx_buf_sz;
int oom;
+ /* Interrupt status */
+ u32 intr_status;
/* Do not touch the nic registers */
int hands_off;
/* external phy that is used: only valid if dev->if_port != PORT_TP */
@@ -748,7 +745,8 @@ static void init_registers(struct net_de
static int start_tx(struct sk_buff *skb, struct net_device *dev);
static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *regs);
static void netdev_error(struct net_device *dev, int intr_status);
-static void netdev_rx(struct net_device *dev);
+static int natsemi_poll(struct net_device *dev, int *budget);
+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do);
static void netdev_tx_done(struct net_device *dev);
static int natsemi_change_mtu(struct net_device *dev, int new_mtu);
#ifdef CONFIG_NET_POLL_CONTROLLER
@@ -776,6 +774,18 @@ static inline void __iomem *ns_ioaddr(st
return (void __iomem *) dev->base_addr;
}
+static inline void natsemi_irq_enable(struct net_device *dev)
+{
+ writel(1, ns_ioaddr(dev) + IntrEnable);
+ readl(ns_ioaddr(dev) + IntrEnable);
+}
+
+static inline void natsemi_irq_disable(struct net_device *dev)
+{
+ writel(0, ns_ioaddr(dev) + IntrEnable);
+ readl(ns_ioaddr(dev) + IntrEnable);
+}
+
static void move_int_phy(struct net_device *dev, int addr)
{
struct netdev_private *np = netdev_priv(dev);
@@ -879,6 +889,7 @@ static int __devinit natsemi_probe1 (str
spin_lock_init(&np->lock);
np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG;
np->hands_off = 0;
+ np->intr_status = 0;
/* Initial port:
* - If the nic was configured to use an external phy and if find_mii
@@ -932,6 +943,9 @@ static int __devinit natsemi_probe1 (str
dev->do_ioctl = &netdev_ioctl;
dev->tx_timeout = &tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
+ dev->poll = natsemi_poll;
+ dev->weight = 64;
+
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = &natsemi_poll_controller;
#endif
@@ -2158,68 +2172,92 @@ static void netdev_tx_done(struct net_de
}
}
-/* The interrupt handler does all of the Rx thread work and cleans up
- after the Tx thread. */
+/* The interrupt handler doesn't actually handle interrupts itself, it
+ * schedules a NAPI poll if there is anything to do. */
static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs)
{
struct net_device *dev = dev_instance;
struct netdev_private *np = netdev_priv(dev);
void __iomem * ioaddr = ns_ioaddr(dev);
- int boguscnt = max_interrupt_work;
- unsigned int handled = 0;
if (np->hands_off)
return IRQ_NONE;
- do {
- /* Reading automatically acknowledges all int sources. */
- u32 intr_status = readl(ioaddr + IntrStatus);
+
+ /* Reading automatically acknowledges. */
+ np->intr_status = readl(ioaddr + IntrStatus);
- if (netif_msg_intr(np))
- printk(KERN_DEBUG
- "%s: Interrupt, status %#08x, mask %#08x.\n",
- dev->name, intr_status,
- readl(ioaddr + IntrMask));
+ if (netif_msg_intr(np))
+ printk(KERN_DEBUG
+ "%s: Interrupt, status %#08x, mask %#08x.\n",
+ dev->name, np->intr_status,
+ readl(ioaddr + IntrMask));
- if (intr_status == 0)
- break;
- handled = 1;
+ if (!np->intr_status)
+ return IRQ_NONE;
- if (intr_status &
- (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
- IntrRxErr | IntrRxOverrun)) {
- netdev_rx(dev);
- }
+ prefetch(&np->rx_skbuff[np->cur_rx % RX_RING_SIZE]);
+
+ if (netif_rx_schedule_prep(dev)) {
+ /* Disable interrupts and register for poll */
+ natsemi_irq_disable(dev);
+ __netif_rx_schedule(dev);
+ }
+ return IRQ_HANDLED;
+}
- if (intr_status &
- (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) {
+/* This is the NAPI poll routine. As well as the standard RX handling
+ * it also handles all other interrupts that the chip might raise.
+ */
+static int natsemi_poll(struct net_device *dev, int *budget)
+{
+ struct netdev_private *np = netdev_priv(dev);
+ void __iomem * ioaddr = ns_ioaddr(dev);
+
+ int work_to_do = min(*budget, dev->quota);
+ int work_done = 0;
+
+ do {
+ if (np->intr_status &
+ (IntrTxDone | IntrTxIntr | IntrTxIdle | IntrTxErr)) {
spin_lock(&np->lock);
netdev_tx_done(dev);
spin_unlock(&np->lock);
}
/* Abnormal error summary/uncommon events handlers. */
- if (intr_status & IntrAbnormalSummary)
- netdev_error(dev, intr_status);
-
- if (--boguscnt < 0) {
- if (netif_msg_intr(np))
- printk(KERN_WARNING
- "%s: Too much work at interrupt, "
- "status=%#08x.\n",
- dev->name, intr_status);
- break;
+ if (np->intr_status & IntrAbnormalSummary)
+ netdev_error(dev, np->intr_status);
+
+ if (np->intr_status &
+ (IntrRxDone | IntrRxIntr | RxStatusFIFOOver |
+ IntrRxErr | IntrRxOverrun)) {
+ netdev_rx(dev, &work_done, work_to_do);
}
- } while (1);
+
+ *budget -= work_done;
+ dev->quota -= work_done;
- if (netif_msg_intr(np))
- printk(KERN_DEBUG "%s: exiting interrupt.\n", dev->name);
+ if (work_done >= work_to_do)
+ return 1;
+
+ np->intr_status = readl(ioaddr + IntrStatus);
+ } while (np->intr_status);
- return IRQ_RETVAL(handled);
+ netif_rx_complete(dev);
+
+ /* Reenable interrupts providing nothing is trying to shut
+ * the chip down. */
+ spin_lock(&np->lock);
+ if (!np->hands_off && netif_running(dev))
+ natsemi_irq_enable(dev);
+ spin_unlock(&np->lock);
+
+ return 0;
}
/* This routine is logically part of the interrupt handler, but separated
for clarity and better register allocation. */
-static void netdev_rx(struct net_device *dev)
+static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
{
struct netdev_private *np = netdev_priv(dev);
int entry = np->cur_rx % RX_RING_SIZE;
@@ -2237,6 +2275,12 @@ static void netdev_rx(struct net_device
entry, desc_status);
if (--boguscnt < 0)
break;
+
+ if (*work_done >= work_to_do)
+ break;
+
+ (*work_done)++;
+
pkt_len = (desc_status & DescSizeMask) - 4;
if ((desc_status&(DescMore|DescPktOK|DescRxLong)) != DescPktOK){
if (desc_status & DescMore) {
@@ -2293,7 +2337,7 @@ static void netdev_rx(struct net_device
np->rx_skbuff[entry] = NULL;
}
skb->protocol = eth_type_trans(skb, dev);
- netif_rx(skb);
+ netif_receive_skb(skb);
dev->last_rx = jiffies;
np->stats.rx_packets++;
np->stats.rx_bytes += pkt_len;
@@ -3074,9 +3118,7 @@ static int netdev_close(struct net_devic
del_timer_sync(&np->timer);
disable_irq(dev->irq);
spin_lock_irq(&np->lock);
- /* Disable interrupts, and flush posted writes */
- writel(0, ioaddr + IntrEnable);
- readl(ioaddr + IntrEnable);
+ natsemi_irq_disable(dev);
np->hands_off = 1;
spin_unlock_irq(&np->lock);
enable_irq(dev->irq);
@@ -3158,6 +3200,9 @@ static void __devexit natsemi_remove1 (s
* * netdev_timer: timer stopped by natsemi_suspend.
* * intr_handler: doesn't acquire the spinlock. suspend calls
* disable_irq() to enforce synchronization.
+ * * natsemi_poll: checks before reenabling interrupts. suspend
+ * sets hands_off, disables interrupts and then waits with
+ * netif_poll_disable().
*
* Interrupts must be disabled, otherwise hands_off can cause irq storms.
*/
@@ -3183,6 +3228,8 @@ static int natsemi_suspend (struct pci_d
spin_unlock_irq(&np->lock);
enable_irq(dev->irq);
+ netif_poll_disable(dev);
+
/* Update the error counts. */
__get_stats(dev);
@@ -3235,6 +3282,7 @@ static int natsemi_resume (struct pci_de
mod_timer(&np->timer, jiffies + 1*HZ);
}
netif_device_attach(dev);
+ netif_poll_enable(dev);
out:
rtnl_unlock();
return 0;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply
* Re: Integrating IXP4xx NPE support in kernel (with IXP4xx accesslibrary)
From: Lennert Buytenhek @ 2005-12-21 23:37 UTC (permalink / raw)
To: Stefan Roese; +Cc: netdev, linux-arm-kernel
In-Reply-To: <200512211548.23070.sr@denx.de>
On Wed, Dec 21, 2005 at 03:48:22PM +0100, Stefan Roese wrote:
> Hi Lennert,
Hello,
> > > The main question I have is, where should the IXP4xx access-library
> > > be located in the kernel directory structure?
> >
> > Maybe you can explain to the list readers what it is and what it does?
>
> It's the library needed for the NPE (network processor engines)
> ethernet driver to access the on chip NPE's (e.g. download microcode,
> communicate with the NPE's etc.). Unfortunately a pretty big piece of
> software written to support multiple OS's. :-(
So that means that there are wrappers for malloc and free and stuff
like that? Doesn't sound very likely that you'll get that merged..
> > > Please comment on this and let me know if such an effort has any chance
> > > of getting accepted into the official kernel.
> >
> > Assuming that the license issues have all been worked out now, it'll
> > mostly depend on the quality of the code. (If this is the same Intel
> > code that I saw a while ago, I think it'll need a fair amount of work
> > before it can go in.)
>
> It most likely is the same code. Currently it's version 2.0. This
> version is available under a special Intel license
> (http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm)
> and under the BSD license (when you bug your Intel contact enough).
> The files seem to be the same, only the header with the license is
> exchanged.
That sounds very fishy -- are you 100% sure that the person doing the
s/Proprietary/BSD/ was in fact authorized to do so? (This is one reason
why I'd love to see someone @intel.com submit this code upstream, BTW.)
cheers,
Lennert
-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
^ permalink raw reply
* [PATCH] VLAN: Add two missing checks to vlan_ioctl_handler()
From: Mika Kukkonen @ 2005-12-21 20:50 UTC (permalink / raw)
To: vlan, netdev; +Cc: linux-kernel
In vlan_ioctl_handler() the code misses couple checks for
error return values.
Signed-of-by: Mika Kukkonen <mikukkon@iki.fi>
---
net/8021q/vlan.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 91e412b..67465b6 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -753,6 +753,8 @@ static int vlan_ioctl_handler(void __use
break;
case GET_VLAN_REALDEV_NAME_CMD:
err = vlan_dev_get_realdev_name(args.device1, args.u.device2);
+ if (err)
+ goto out;
if (copy_to_user(arg, &args,
sizeof(struct vlan_ioctl_args))) {
err = -EFAULT;
@@ -761,6 +763,8 @@ static int vlan_ioctl_handler(void __use
case GET_VLAN_VID_CMD:
err = vlan_dev_get_vid(args.device1, &vid);
+ if (err)
+ goto out;
args.u.VID = vid;
if (copy_to_user(arg, &args,
sizeof(struct vlan_ioctl_args))) {
@@ -774,7 +778,7 @@ static int vlan_ioctl_handler(void __use
__FUNCTION__, args.cmd);
return -EINVAL;
};
-
+out:
return err;
}
^ permalink raw reply related
* [PATCH] NETROM: Fix three if-statements in nr_state1_machine()
From: Mika Kukkonen @ 2005-12-21 20:15 UTC (permalink / raw)
To: ralf, netdev; +Cc: linux-kernel, linux-hams
I found these while compiling with extra gcc warnings;
considering the indenting surely they are not intentional?
Signed-of-by: Mika Kukkonen <mikukkon@iki.fi>
---
net/netrom/nr_in.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 004e859..a7d88b5 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -99,7 +99,7 @@ static int nr_state1_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
@@ -130,7 +130,7 @@ static int nr_state2_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
@@ -265,7 +265,7 @@ static int nr_state3_machine(struct sock
break;
case NR_RESET:
- if (sysctl_netrom_reset_circuit);
+ if (sysctl_netrom_reset_circuit)
nr_disconnect(sk, ECONNRESET);
break;
^ permalink raw reply related
* Re: [PATCH] handle module ref count on sysctl tables.
From: Stephen Hemminger @ 2005-12-21 19:21 UTC (permalink / raw)
To: Al Viro; +Cc: Andrew Morton, linux-kernel, netdev
In-Reply-To: <20051221190849.GM27946@ftp.linux.org.uk>
On Wed, 21 Dec 2005 19:08:49 +0000
Al Viro <viro@ftp.linux.org.uk> wrote:
> On Wed, Dec 21, 2005 at 10:35:19AM -0800, Stephen Hemminger wrote:
> > Right now there is a hole in the module ref counting system because
> > there is no proper ref counting for sysctl tables used by modules.
> > This means that if an application is holding /proc/sys/foo open and
> > module that created it is unloaded, then the application touches the
> > file the kernel will oops.
> >
> > This patch fixes that by maintaining source compatibility via macro.
> > I am sure someone already thought of this, it just doesn't appear to
> > have made it in yet.
>
> NAK.
> a) holding the file open will *NOT* pin any module structures down.
> IO in progress will, but it unregistering sysctl table will block until it's
> over. The same goes for sysctl(2) in progress. See use_table() and
> friends in kernel/sysctl.c
> b) you are not protecting any code in module; what needs protection
> (and gets it) is a pile of data structures. With lifetimes that don't have
> to be related to module lifetimes. IOW, use of reference to module is 100%
> wrong here - it wouldn't fix anything.
>
> As a general rule, when you pin something down, think what you are trying
> to protect; if it's not just a bunch of function references - module is
> the wrong thing to hold.
>
> In particular, sysctl tables are dynamically created and removed in a
> kernel that is not modular at all. Which kills any hope to get a solution
> based on preventing rmmod.
>
> Solution is fairly simple:
> * put use counter into sysctl table head (i.e. object allocated by
> kernel/sysctl.c)
> * bump use counter when examining table in sysctl(2) and around the
> actual IO in procfs access; put reference to table into proc_dir_entry to
> be able to do the latter. Decrement when done with the table; if it had
> hit zero _and_ there's unregistration waiting for completion - kick it.
> * have unregistration kill all reference to table head and if use
> counter is positive - wait for completion. Once we get it, we know that
> we can safely proceed.
>
Yeah, that is better.
--
Stephen Hemminger <shemminger@osdl.org>
OSDL http://developer.osdl.org/~shemminger
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox