From 9a1290430c3a104883a122b4e1cec8b17ac71182 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 14 Oct 2003 15:57:51 +0000 Subject: [PATCH] - netconsole.h missed #include - polling support for PCNet32 NIC (vmware4 emulates it) --- .../patches/netconsole-over-netpoll.patch | 39 ++++++++++--------- .../kernel_patches/patches/netpoll-pcnet32.patch | 45 ++++++++++++++++++++++ lustre/kernel_patches/pc/netpoll-pcnet32.pc | 1 + 3 files changed, 66 insertions(+), 19 deletions(-) create mode 100644 lustre/kernel_patches/patches/netpoll-pcnet32.patch create mode 100644 lustre/kernel_patches/pc/netpoll-pcnet32.pc diff --git a/lustre/kernel_patches/patches/netconsole-over-netpoll.patch b/lustre/kernel_patches/patches/netconsole-over-netpoll.patch index ef5965f..c715c84 100644 --- a/lustre/kernel_patches/patches/netconsole-over-netpoll.patch +++ b/lustre/kernel_patches/patches/netconsole-over-netpoll.patch @@ -3,14 +3,14 @@ arch/i386/kernel/irq.c | 12 + drivers/net/Kconfig | 7 + drivers/net/Makefile | 1 - drivers/net/netconsole.c | 216 ++++++++++++++++++++++++++++++++ + drivers/net/netconsole.c | 217 ++++++++++++++++++++++++++++++++ include/asm-i386/netconsole.h | 6 net/Kconfig | 2 net/core/dev.c | 3 - 9 files changed, 310 insertions(+), 2 deletions(-) + 9 files changed, 311 insertions(+), 2 deletions(-) ---- linux-2.6.0-test6/arch/i386/kernel/i386_ksyms.c~netconsole-over-netpoll 2003-10-14 16:58:59.000000000 +0400 -+++ linux-2.6.0-test6-alexey/arch/i386/kernel/i386_ksyms.c 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/arch/i386/kernel/i386_ksyms.c~netconsole-over-netpoll 2003-10-14 17:44:04.000000000 +0400 ++++ linux-2.6.0-test6-alexey/arch/i386/kernel/i386_ksyms.c 2003-10-14 17:45:08.000000000 +0400 @@ -34,7 +34,7 @@ #include #include @@ -33,8 +33,8 @@ #if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE) EXPORT_SYMBOL(ist_info); #endif ---- linux-2.6.0-test6/arch/i386/kernel/irq.c~netconsole-over-netpoll 2003-10-14 16:59:05.000000000 +0400 -+++ linux-2.6.0-test6-alexey/arch/i386/kernel/irq.c 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/arch/i386/kernel/irq.c~netconsole-over-netpoll 2003-10-14 17:45:03.000000000 +0400 ++++ linux-2.6.0-test6-alexey/arch/i386/kernel/irq.c 2003-10-14 17:45:08.000000000 +0400 @@ -45,6 +45,7 @@ #include #include @@ -62,7 +62,7 @@ } --- /dev/null 2003-01-30 13:24:37.000000000 +0300 -+++ linux-2.6.0-test6-alexey/Documentation/networking/netconsole.txt 2003-10-14 17:01:49.000000000 +0400 ++++ linux-2.6.0-test6-alexey/Documentation/networking/netconsole.txt 2003-10-14 17:45:08.000000000 +0400 @@ -0,0 +1,57 @@ + +started by Ingo Molnar , 2001.09.17 @@ -121,8 +121,8 @@ +sending packets. Due to these unique needs, configuration can not +be more automatic, and some fundamental limitations will remain: +only IP networks, UDP packets and ethernet devices are supported. ---- linux-2.6.0-test6/drivers/net/Kconfig~netconsole-over-netpoll 2003-10-14 16:59:01.000000000 +0400 -+++ linux-2.6.0-test6-alexey/drivers/net/Kconfig 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/drivers/net/Kconfig~netconsole-over-netpoll 2003-10-14 17:44:05.000000000 +0400 ++++ linux-2.6.0-test6-alexey/drivers/net/Kconfig 2003-10-14 17:45:08.000000000 +0400 @@ -2444,6 +2444,13 @@ config SHAPER config NET_POLL_CONTROLLER def_bool KGDB @@ -137,8 +137,8 @@ source "drivers/net/wan/Kconfig" source "drivers/net/pcmcia/Kconfig" ---- linux-2.6.0-test6/drivers/net/Makefile~netconsole-over-netpoll 2003-10-14 16:59:16.000000000 +0400 -+++ linux-2.6.0-test6-alexey/drivers/net/Makefile 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/drivers/net/Makefile~netconsole-over-netpoll 2003-10-14 17:45:04.000000000 +0400 ++++ linux-2.6.0-test6-alexey/drivers/net/Makefile 2003-10-14 17:45:08.000000000 +0400 @@ -109,6 +109,7 @@ ifeq ($(CONFIG_SLIP_COMPRESSED),y) endif # Must come after all NICs it might use @@ -148,8 +148,8 @@ obj-$(CONFIG_DUMMY) += dummy.o obj-$(CONFIG_DE600) += de600.o --- /dev/null 2003-01-30 13:24:37.000000000 +0300 -+++ linux-2.6.0-test6-alexey/drivers/net/netconsole.c 2003-10-14 17:01:49.000000000 +0400 -@@ -0,0 +1,216 @@ ++++ linux-2.6.0-test6-alexey/drivers/net/netconsole.c 2003-10-14 17:45:56.000000000 +0400 +@@ -0,0 +1,217 @@ +/* + * linux/drivers/net/netconsole.c + * @@ -202,6 +202,7 @@ +#include +#include +#include ++#include +#include + +MODULE_AUTHOR("Maintainer: Matt Mackall "); @@ -367,16 +368,16 @@ +module_init(init_netconsole); +module_exit(cleanup_netconsole); --- /dev/null 2003-01-30 13:24:37.000000000 +0300 -+++ linux-2.6.0-test6-alexey/include/asm-i386/netconsole.h 2003-10-14 17:01:49.000000000 +0400 ++++ linux-2.6.0-test6-alexey/include/asm-i386/netconsole.h 2003-10-14 17:45:08.000000000 +0400 @@ -0,0 +1,6 @@ +extern unsigned int netconsole_sysrq_req; -+extern void netconsole_do_sysrq(); ++extern void netconsole_do_sysrq(void); +extern unsigned int netif_in_poll; +#ifndef HANDLE_NETCONSOLE +#define HANDLE_NETCONSOLE netconsole_do_sysrq() +#endif ---- linux-2.6.0-test6/net/core/dev.c~netconsole-over-netpoll 2003-10-14 16:59:05.000000000 +0400 -+++ linux-2.6.0-test6-alexey/net/core/dev.c 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/net/core/dev.c~netconsole-over-netpoll 2003-10-14 17:45:03.000000000 +0400 ++++ linux-2.6.0-test6-alexey/net/core/dev.c 2003-10-14 17:45:08.000000000 +0400 @@ -109,6 +109,7 @@ #include /* Note : will define WIRELESS_EXT */ #include @@ -401,8 +402,8 @@ out: local_irq_enable(); preempt_enable(); ---- linux-2.6.0-test6/net/Kconfig~netconsole-over-netpoll 2003-10-14 16:59:05.000000000 +0400 -+++ linux-2.6.0-test6-alexey/net/Kconfig 2003-10-14 17:01:49.000000000 +0400 +--- linux-2.6.0-test6/net/Kconfig~netconsole-over-netpoll 2003-10-14 17:45:03.000000000 +0400 ++++ linux-2.6.0-test6-alexey/net/Kconfig 2003-10-14 17:45:08.000000000 +0400 @@ -671,6 +671,6 @@ source "net/irda/Kconfig" source "net/bluetooth/Kconfig" diff --git a/lustre/kernel_patches/patches/netpoll-pcnet32.patch b/lustre/kernel_patches/patches/netpoll-pcnet32.patch new file mode 100644 index 0000000..f0ad313 --- /dev/null +++ b/lustre/kernel_patches/patches/netpoll-pcnet32.patch @@ -0,0 +1,45 @@ + drivers/net/pcnet32.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+) + +diff -puN drivers/net/pcnet32.c~kgdbeth-pcnet32-support drivers/net/pcnet32.c +--- linux-2.6.0-test6-mm/drivers/net/pcnet32.c~kgdbeth-pcnet32-support 2003-10-06 00:45:54.000000000 +0400 ++++ linux-2.6.0-test6-mm-alexey/drivers/net/pcnet32.c 2003-10-06 00:54:55.000000000 +0400 +@@ -331,6 +331,9 @@ static int pcnet32_init_ring(struct net + static int pcnet32_start_xmit(struct sk_buff *, struct net_device *); + static int pcnet32_rx(struct net_device *); + static void pcnet32_tx_timeout (struct net_device *dev); ++#ifdef CONFIG_NET_POLL_CONTROLLER ++static void pcnet32_rx_poll(struct net_device *); ++#endif + static irqreturn_t pcnet32_interrupt(int, void *, struct pt_regs *); + static int pcnet32_close(struct net_device *); + static struct net_device_stats *pcnet32_get_stats(struct net_device *); +@@ -806,6 +809,10 @@ pcnet32_probe1(unsigned long ioaddr, uns + dev->tx_timeout = pcnet32_tx_timeout; + dev->watchdog_timeo = (5*HZ); + ++#ifdef CONFIG_NET_POLL_CONTROLLER ++ dev->poll_controller = pcnet32_rx_poll; ++#endif ++ + lp->next = pcnet32_dev; + pcnet32_dev = dev; + +@@ -1152,6 +1159,15 @@ pcnet32_start_xmit(struct sk_buff *skb, + return 0; + } + ++#ifdef CONFIG_NET_POLL_CONTROLLER ++static void pcnet32_rx_poll(struct net_device *dev) ++{ ++ disable_irq(dev->irq); ++ pcnet32_interrupt(dev->irq, (void *)dev, 0); ++ enable_irq(dev->irq); ++} ++#endif ++ + /* The PCNET32 interrupt handler. */ + static irqreturn_t + pcnet32_interrupt(int irq, void *dev_id, struct pt_regs * regs) + +_ diff --git a/lustre/kernel_patches/pc/netpoll-pcnet32.pc b/lustre/kernel_patches/pc/netpoll-pcnet32.pc new file mode 100644 index 0000000..005bcf1 --- /dev/null +++ b/lustre/kernel_patches/pc/netpoll-pcnet32.pc @@ -0,0 +1 @@ +drivers/net/pcnet32.c -- 1.8.3.1