aboutsummaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorChristian Limpach <Christian.Limpach@xensource.com>2007-01-17 18:41:22 +0000
committerChristian Limpach <Christian.Limpach@xensource.com>2007-01-17 18:41:22 +0000
commit54a12734705f69ef97bd76f67db72367da3b0365 (patch)
tree8c5d9d579a71e2202e682632cbbeafdc966c2675 /patches
parent1e6fbb9393117611170308792f274af181e29215 (diff)
downloadxen-54a12734705f69ef97bd76f67db72367da3b0365.tar.gz
xen-54a12734705f69ef97bd76f67db72367da3b0365.tar.bz2
xen-54a12734705f69ef97bd76f67db72367da3b0365.zip
[linux] Update to linux-2.6.18.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com> --HG-- rename : linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_pre.h => linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch.h rename : patches/linux-2.6.17/blktap-aio-16_03_06.patch => patches/linux-2.6.18/blktap-aio-16_03_06.patch rename : patches/linux-2.6.17/fix-ide-cd-pio-mode.patch => patches/linux-2.6.18/fix-ide-cd-pio-mode.patch rename : patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch => patches/linux-2.6.18/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch rename : patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch => patches/linux-2.6.18/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch rename : patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch => patches/linux-2.6.18/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch rename : patches/linux-2.6.17/i386-mach-io-check-nmi.patch => patches/linux-2.6.18/i386-mach-io-check-nmi.patch rename : patches/linux-2.6.17/ipv6-no-autoconf.patch => patches/linux-2.6.18/ipv6-no-autoconf.patch rename : patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch => patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch rename : patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch => patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch rename : patches/linux-2.6.17/net-csum.patch => patches/linux-2.6.18/net-csum.patch rename : patches/linux-2.6.17/net-gso-5-rcv-mss.patch => patches/linux-2.6.18/net-gso-5-rcv-mss.patch rename : patches/linux-2.6.17/net-gso-6-linear-segmentation.patch => patches/linux-2.6.18/net-gso-6-linear-segmentation.patch rename : patches/linux-2.6.17/pmd-shared.patch => patches/linux-2.6.18/pmd-shared.patch rename : patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch => patches/linux-2.6.18/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch rename : patches/linux-2.6.17/series => patches/linux-2.6.18/series rename : patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch => patches/linux-2.6.18/x86-elfnote-as-preprocessor-macro.patch rename : patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.18/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch rename : patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch => patches/linux-2.6.18/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch rename : patches/linux-2.6.17/xen-hotplug.patch => patches/linux-2.6.18/xen-hotplug.patch rename : patches/linux-2.6.17/xenoprof-generic.patch => patches/linux-2.6.18/xenoprof-generic.patch
Diffstat (limited to 'patches')
-rw-r--r--patches/linux-2.6.17/fix-hz-suspend.patch26
-rw-r--r--patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch46
-rw-r--r--patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch85
-rw-r--r--patches/linux-2.6.17/kasprintf.patch42
-rw-r--r--patches/linux-2.6.17/net-gso-0-base.patch2910
-rw-r--r--patches/linux-2.6.17/net-gso-1-check-dodgy.patch27
-rw-r--r--patches/linux-2.6.17/net-gso-2-checksum-fix.patch459
-rw-r--r--patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch17
-rw-r--r--patches/linux-2.6.17/net-gso-4-kill-warnon.patch27
-rw-r--r--patches/linux-2.6.17/vsnprintf.patch183
-rw-r--r--patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch89
-rw-r--r--patches/linux-2.6.18/blktap-aio-16_03_06.patch (renamed from patches/linux-2.6.17/blktap-aio-16_03_06.patch)34
-rw-r--r--patches/linux-2.6.18/fix-ide-cd-pio-mode.patch (renamed from patches/linux-2.6.17/fix-ide-cd-pio-mode.patch)8
-rw-r--r--patches/linux-2.6.18/fixaddr-top.patch69
-rw-r--r--patches/linux-2.6.18/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch (renamed from patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch)18
-rw-r--r--patches/linux-2.6.18/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch (renamed from patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch)18
-rw-r--r--patches/linux-2.6.18/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch (renamed from patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch)10
-rw-r--r--patches/linux-2.6.18/i386-mach-io-check-nmi.patch (renamed from patches/linux-2.6.17/i386-mach-io-check-nmi.patch)14
-rw-r--r--patches/linux-2.6.18/ipv6-no-autoconf.patch (renamed from patches/linux-2.6.17/ipv6-no-autoconf.patch)10
-rw-r--r--patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch (renamed from patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch)12
-rw-r--r--patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch (renamed from patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch)12
-rw-r--r--patches/linux-2.6.18/net-csum.patch (renamed from patches/linux-2.6.17/net-csum.patch)28
-rw-r--r--patches/linux-2.6.18/net-gso-5-rcv-mss.patch (renamed from patches/linux-2.6.17/net-gso-5-rcv-mss.patch)6
-rw-r--r--patches/linux-2.6.18/net-gso-6-linear-segmentation.patch (renamed from patches/linux-2.6.17/net-gso-6-linear-segmentation.patch)10
-rw-r--r--patches/linux-2.6.18/pmd-shared.patch (renamed from patches/linux-2.6.17/pmd-shared.patch)32
-rw-r--r--patches/linux-2.6.18/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch (renamed from patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch)22
-rw-r--r--patches/linux-2.6.18/series (renamed from patches/linux-2.6.17/series)12
-rw-r--r--patches/linux-2.6.18/x86-elfnote-as-preprocessor-macro.patch (renamed from patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch)6
-rw-r--r--patches/linux-2.6.18/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch (renamed from patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch)24
-rw-r--r--patches/linux-2.6.18/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch (renamed from patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch)20
-rw-r--r--patches/linux-2.6.18/xen-hotplug.patch (renamed from patches/linux-2.6.17/xen-hotplug.patch)10
-rw-r--r--patches/linux-2.6.18/xenoprof-generic.patch (renamed from patches/linux-2.6.17/xenoprof-generic.patch)54
32 files changed, 244 insertions, 4096 deletions
diff --git a/patches/linux-2.6.17/fix-hz-suspend.patch b/patches/linux-2.6.17/fix-hz-suspend.patch
deleted file mode 100644
index d06a658cd8..0000000000
--- a/patches/linux-2.6.17/fix-hz-suspend.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/kernel/timer.c ./kernel/timer.c
---- ../orig-linux-2.6.17/kernel/timer.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./kernel/timer.c 2007-01-08 15:14:52.000000000 +0000
-@@ -557,6 +557,22 @@ found:
- if (time_before(expires, jiffies))
- return jiffies;
-
-+ /*
-+ * It can happen that other CPUs service timer IRQs and increment
-+ * jiffies, but we have not yet got a local timer tick to process
-+ * the timer wheels. In that case, the expiry time can be before
-+ * jiffies, but since the high-resolution timer here is relative to
-+ * jiffies, the default expression when high-resolution timers are
-+ * not active,
-+ *
-+ * time_before(MAX_JIFFY_OFFSET + jiffies, expires)
-+ *
-+ * would falsely evaluate to true. If that is the case, just
-+ * return jiffies so that we can immediately fire the local timer
-+ */
-+ if (time_before(expires, jiffies))
-+ return jiffies;
-+
- if (time_before(hr_expires, expires))
- return hr_expires;
-
diff --git a/patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch b/patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch
deleted file mode 100644
index 0c818c31c8..0000000000
--- a/patches/linux-2.6.17/git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-+++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000
-@@ -189,14 +189,11 @@ NORET_TYPE void machine_kexec(struct kim
- memcpy((void *)reboot_code_buffer, relocate_new_kernel,
- relocate_new_kernel_size);
-
-- /* The segment registers are funny things, they are
-- * automatically loaded from a table, in memory wherever you
-- * set them to a specific selector, but this table is never
-- * accessed again you set the segment to a different selector.
-- *
-- * The more common model is are caches where the behide
-- * the scenes work is done, but is also dropped at arbitrary
-- * times.
-+ /* The segment registers are funny things, they have both a
-+ * visible and an invisible part. Whenever the visible part is
-+ * set to a specific selector, the invisible part is loaded
-+ * with from a table in memory. At no other time is the
-+ * descriptor table in memory accessed.
- *
- * I take advantage of this here by force loading the
- * segments, before I zap the gdt with an invalid value.
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-+++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000
-@@ -207,14 +207,11 @@ NORET_TYPE void machine_kexec(struct kim
- __flush_tlb();
-
-
-- /* The segment registers are funny things, they are
-- * automatically loaded from a table, in memory wherever you
-- * set them to a specific selector, but this table is never
-- * accessed again unless you set the segment to a different selector.
-- *
-- * The more common model are caches where the behide
-- * the scenes work is done, but is also dropped at arbitrary
-- * times.
-+ /* The segment registers are funny things, they have both a
-+ * visible and an invisible part. Whenever the visible part is
-+ * set to a specific selector, the invisible part is loaded
-+ * with from a table in memory. At no other time is the
-+ * descriptor table in memory accessed.
- *
- * I take advantage of this here by force loading the
- * segments, before I zap the gdt with an invalid value.
diff --git a/patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch b/patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch
deleted file mode 100644
index 13114cd4fe..0000000000
--- a/patches/linux-2.6.17/git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-@@ -133,9 +133,9 @@ typedef asmlinkage NORET_TYPE void (*rel
- unsigned long start_address,
- unsigned int has_pae) ATTRIB_NORET;
-
--const extern unsigned char relocate_new_kernel[];
-+extern const unsigned char relocate_new_kernel[];
- extern void relocate_new_kernel_end(void);
--const extern unsigned int relocate_new_kernel_size;
-+extern const unsigned int relocate_new_kernel_size;
-
- /*
- * A architecture hook called to validate the
-diff -pruN ../orig-linux-2.6.17/arch/powerpc/kernel/machine_kexec_32.c ./arch/powerpc/kernel/machine_kexec_32.c
---- ../orig-linux-2.6.17/arch/powerpc/kernel/machine_kexec_32.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/powerpc/kernel/machine_kexec_32.c 2007-01-08 15:01:25.000000000 +0000
-@@ -30,8 +30,8 @@ typedef NORET_TYPE void (*relocate_new_k
- */
- void default_machine_kexec(struct kimage *image)
- {
-- const extern unsigned char relocate_new_kernel[];
-- const extern unsigned int relocate_new_kernel_size;
-+ extern const unsigned char relocate_new_kernel[];
-+ extern const unsigned int relocate_new_kernel_size;
- unsigned long page_list;
- unsigned long reboot_code_buffer, reboot_code_buffer_phys;
- relocate_new_kernel_t rnk;
-diff -pruN ../orig-linux-2.6.17/arch/ppc/kernel/machine_kexec.c ./arch/ppc/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/ppc/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/ppc/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-@@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_k
- unsigned long reboot_code_buffer,
- unsigned long start_address) ATTRIB_NORET;
-
--const extern unsigned char relocate_new_kernel[];
--const extern unsigned int relocate_new_kernel_size;
-+extern const unsigned char relocate_new_kernel[];
-+extern const unsigned int relocate_new_kernel_size;
-
- void machine_shutdown(void)
- {
-diff -pruN ../orig-linux-2.6.17/arch/s390/kernel/machine_kexec.c ./arch/s390/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/s390/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/s390/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-@@ -27,8 +27,8 @@ static void kexec_halt_all_cpus(void *);
-
- typedef void (*relocate_kernel_t) (kimage_entry_t *, unsigned long);
-
--const extern unsigned char relocate_kernel[];
--const extern unsigned long long relocate_kernel_len;
-+extern const unsigned char relocate_kernel[];
-+extern const unsigned long long relocate_kernel_len;
-
- int
- machine_kexec_prepare(struct kimage *image)
-diff -pruN ../orig-linux-2.6.17/arch/sh/kernel/machine_kexec.c ./arch/sh/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/sh/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/sh/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-@@ -25,8 +25,8 @@ typedef NORET_TYPE void (*relocate_new_k
- unsigned long start_address,
- unsigned long vbr_reg) ATTRIB_NORET;
-
--const extern unsigned char relocate_new_kernel[];
--const extern unsigned int relocate_new_kernel_size;
-+extern const unsigned char relocate_new_kernel[];
-+extern const unsigned int relocate_new_kernel_size;
- extern void *gdb_vbr_vector;
-
- /*
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:01:25.000000000 +0000
-@@ -149,8 +149,8 @@ typedef NORET_TYPE void (*relocate_new_k
- unsigned long start_address,
- unsigned long pgtable) ATTRIB_NORET;
-
--const extern unsigned char relocate_new_kernel[];
--const extern unsigned long relocate_new_kernel_size;
-+extern const unsigned char relocate_new_kernel[];
-+extern const unsigned long relocate_new_kernel_size;
-
- int machine_kexec_prepare(struct kimage *image)
- {
diff --git a/patches/linux-2.6.17/kasprintf.patch b/patches/linux-2.6.17/kasprintf.patch
deleted file mode 100644
index 96c56990db..0000000000
--- a/patches/linux-2.6.17/kasprintf.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/include/linux/kernel.h ./include/linux/kernel.h
---- ../orig-linux-2.6.17/include/linux/kernel.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/linux/kernel.h 2007-01-08 15:38:20.000000000 +0000
-@@ -114,6 +114,8 @@ extern int scnprintf(char * buf, size_t
- __attribute__ ((format (printf, 3, 4)));
- extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
- __attribute__ ((format (printf, 3, 0)));
-+extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
-+ __attribute__ ((format (printf, 2, 3)));
-
- extern int sscanf(const char *, const char *, ...)
- __attribute__ ((format (scanf, 2, 3)));
-diff -pruN ../orig-linux-2.6.17/lib/vsprintf.c ./lib/vsprintf.c
---- ../orig-linux-2.6.17/lib/vsprintf.c 2007-01-08 15:38:07.000000000 +0000
-+++ ./lib/vsprintf.c 2007-01-08 15:38:20.000000000 +0000
-@@ -849,3 +849,26 @@ int sscanf(const char * buf, const char
- }
-
- EXPORT_SYMBOL(sscanf);
-+
-+
-+/* Simplified asprintf. */
-+char *kasprintf(gfp_t gfp, const char *fmt, ...)
-+{
-+ va_list ap;
-+ unsigned int len;
-+ char *p;
-+
-+ va_start(ap, fmt);
-+ len = vsnprintf(NULL, 0, fmt, ap);
-+ va_end(ap);
-+
-+ p = kmalloc(len+1, gfp);
-+ if (!p)
-+ return NULL;
-+ va_start(ap, fmt);
-+ vsnprintf(p, len+1, fmt, ap);
-+ va_end(ap);
-+ return p;
-+}
-+
-+EXPORT_SYMBOL(kasprintf);
diff --git a/patches/linux-2.6.17/net-gso-0-base.patch b/patches/linux-2.6.17/net-gso-0-base.patch
deleted file mode 100644
index eb04d8c27a..0000000000
--- a/patches/linux-2.6.17/net-gso-0-base.patch
+++ /dev/null
@@ -1,2910 +0,0 @@
-Index: tmp-linux-2.6.17/Documentation/networking/netdevices.txt
-===================================================================
---- tmp-linux-2.6.17.orig/Documentation/networking/netdevices.txt 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/Documentation/networking/netdevices.txt 2007-01-08 16:48:05.000000000 +0000
-@@ -42,9 +42,9 @@
- Context: nominally process, but don't sleep inside an rwlock
-
- dev->hard_start_xmit:
-- Synchronization: dev->xmit_lock spinlock.
-+ Synchronization: netif_tx_lock spinlock.
- When the driver sets NETIF_F_LLTX in dev->features this will be
-- called without holding xmit_lock. In this case the driver
-+ called without holding netif_tx_lock. In this case the driver
- has to lock by itself when needed. It is recommended to use a try lock
- for this and return -1 when the spin lock fails.
- The locking there should also properly protect against
-@@ -62,12 +62,12 @@
- Only valid when NETIF_F_LLTX is set.
-
- dev->tx_timeout:
-- Synchronization: dev->xmit_lock spinlock.
-+ Synchronization: netif_tx_lock spinlock.
- Context: BHs disabled
- Notes: netif_queue_stopped() is guaranteed true
-
- dev->set_multicast_list:
-- Synchronization: dev->xmit_lock spinlock.
-+ Synchronization: netif_tx_lock spinlock.
- Context: BHs disabled
-
- dev->poll:
-Index: tmp-linux-2.6.17/drivers/block/aoe/aoenet.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/block/aoe/aoenet.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/block/aoe/aoenet.c 2007-01-08 16:48:05.000000000 +0000
-@@ -116,8 +116,7 @@
- skb = skb_share_check(skb, GFP_ATOMIC);
- if (skb == NULL)
- return 0;
-- if (skb_is_nonlinear(skb))
-- if (skb_linearize(skb, GFP_ATOMIC) < 0)
-+ if (skb_linearize(skb) < 0)
- goto exit;
- if (!is_aoe_netif(ifp))
- goto exit;
-Index: tmp-linux-2.6.17/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2007-01-08 16:48:05.000000000 +0000
-@@ -821,7 +821,8 @@
-
- ipoib_mcast_stop_thread(dev, 0);
-
-- spin_lock_irqsave(&dev->xmit_lock, flags);
-+ local_irq_save(flags);
-+ netif_tx_lock(dev);
- spin_lock(&priv->lock);
-
- /*
-@@ -896,7 +897,8 @@
- }
-
- spin_unlock(&priv->lock);
-- spin_unlock_irqrestore(&dev->xmit_lock, flags);
-+ netif_tx_unlock(dev);
-+ local_irq_restore(flags);
-
- /* We have to cancel outside of the spinlock */
- list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
-Index: tmp-linux-2.6.17/drivers/media/dvb/dvb-core/dvb_net.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/media/dvb/dvb-core/dvb_net.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/media/dvb/dvb-core/dvb_net.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1052,7 +1052,7 @@
-
- dvb_net_feed_stop(dev);
- priv->rx_mode = RX_MODE_UNI;
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
-
- if (dev->flags & IFF_PROMISC) {
- dprintk("%s: promiscuous mode\n", dev->name);
-@@ -1077,7 +1077,7 @@
- }
- }
-
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- dvb_net_feed_start(dev);
- }
-
-Index: tmp-linux-2.6.17/drivers/net/8139cp.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/8139cp.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/8139cp.c 2007-01-08 16:48:05.000000000 +0000
-@@ -792,7 +792,7 @@
- entry = cp->tx_head;
- eor = (entry == (CP_TX_RING_SIZE - 1)) ? RingEnd : 0;
- if (dev->features & NETIF_F_TSO)
-- mss = skb_shinfo(skb)->tso_size;
-+ mss = skb_shinfo(skb)->gso_size;
-
- if (skb_shinfo(skb)->nr_frags == 0) {
- struct cp_desc *txd = &cp->tx_ring[entry];
-Index: tmp-linux-2.6.17/drivers/net/bnx2.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/bnx2.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/bnx2.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1638,7 +1638,7 @@
- skb = tx_buf->skb;
- #ifdef BCM_TSO
- /* partial BD completions possible with TSO packets */
-- if (skb_shinfo(skb)->tso_size) {
-+ if (skb_shinfo(skb)->gso_size) {
- u16 last_idx, last_ring_idx;
-
- last_idx = sw_cons +
-@@ -2009,7 +2009,7 @@
- return 1;
- }
-
--/* Called with rtnl_lock from vlan functions and also dev->xmit_lock
-+/* Called with rtnl_lock from vlan functions and also netif_tx_lock
- * from set_multicast.
- */
- static void
-@@ -4252,7 +4252,7 @@
- }
- #endif
-
--/* Called with dev->xmit_lock.
-+/* Called with netif_tx_lock.
- * hard_start_xmit is pseudo-lockless - a lock is only required when
- * the tx queue is full. This way, we get the benefit of lockless
- * operations most of the time without the complexities to handle
-@@ -4290,7 +4290,7 @@
- (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
- }
- #ifdef BCM_TSO
-- if ((mss = skb_shinfo(skb)->tso_size) &&
-+ if ((mss = skb_shinfo(skb)->gso_size) &&
- (skb->len > (bp->dev->mtu + ETH_HLEN))) {
- u32 tcp_opt_len, ip_tcp_len;
-
-Index: tmp-linux-2.6.17/drivers/net/bonding/bond_main.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/bonding/bond_main.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/bonding/bond_main.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1199,8 +1199,7 @@
- }
-
- #define BOND_INTERSECT_FEATURES \
-- (NETIF_F_SG|NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM|\
-- NETIF_F_TSO|NETIF_F_UFO)
-+ (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_TSO | NETIF_F_UFO)
-
- /*
- * Compute the common dev->feature set available to all slaves. Some
-@@ -1218,9 +1217,7 @@
- features &= (slave->dev->features & BOND_INTERSECT_FEATURES);
-
- if ((features & NETIF_F_SG) &&
-- !(features & (NETIF_F_IP_CSUM |
-- NETIF_F_NO_CSUM |
-- NETIF_F_HW_CSUM)))
-+ !(features & NETIF_F_ALL_CSUM))
- features &= ~NETIF_F_SG;
-
- /*
-@@ -4191,7 +4188,7 @@
- */
- bond_dev->features |= NETIF_F_VLAN_CHALLENGED;
-
-- /* don't acquire bond device's xmit_lock when
-+ /* don't acquire bond device's netif_tx_lock when
- * transmitting */
- bond_dev->features |= NETIF_F_LLTX;
-
-Index: tmp-linux-2.6.17/drivers/net/chelsio/sge.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/chelsio/sge.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/chelsio/sge.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1418,7 +1418,7 @@
- struct cpl_tx_pkt *cpl;
-
- #ifdef NETIF_F_TSO
-- if (skb_shinfo(skb)->tso_size) {
-+ if (skb_shinfo(skb)->gso_size) {
- int eth_type;
- struct cpl_tx_pkt_lso *hdr;
-
-@@ -1433,7 +1433,7 @@
- hdr->ip_hdr_words = skb->nh.iph->ihl;
- hdr->tcp_hdr_words = skb->h.th->doff;
- hdr->eth_type_mss = htons(MK_ETH_TYPE_MSS(eth_type,
-- skb_shinfo(skb)->tso_size));
-+ skb_shinfo(skb)->gso_size));
- hdr->len = htonl(skb->len - sizeof(*hdr));
- cpl = (struct cpl_tx_pkt *)hdr;
- sge->stats.tx_lso_pkts++;
-Index: tmp-linux-2.6.17/drivers/net/e1000/e1000_main.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/e1000/e1000_main.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/e1000/e1000_main.c 2007-01-08 16:48:05.000000000 +0000
-@@ -2413,7 +2413,7 @@
- uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
- int err;
-
-- if (skb_shinfo(skb)->tso_size) {
-+ if (skb_shinfo(skb)->gso_size) {
- if (skb_header_cloned(skb)) {
- err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
- if (err)
-@@ -2421,7 +2421,7 @@
- }
-
- hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
-- mss = skb_shinfo(skb)->tso_size;
-+ mss = skb_shinfo(skb)->gso_size;
- if (skb->protocol == ntohs(ETH_P_IP)) {
- skb->nh.iph->tot_len = 0;
- skb->nh.iph->check = 0;
-@@ -2538,7 +2538,7 @@
- * tso gets written back prematurely before the data is fully
- * DMA'd to the controller */
- if (!skb->data_len && tx_ring->last_tx_tso &&
-- !skb_shinfo(skb)->tso_size) {
-+ !skb_shinfo(skb)->gso_size) {
- tx_ring->last_tx_tso = 0;
- size -= 4;
- }
-@@ -2776,7 +2776,7 @@
- }
-
- #ifdef NETIF_F_TSO
-- mss = skb_shinfo(skb)->tso_size;
-+ mss = skb_shinfo(skb)->gso_size;
- /* The controller does a simple calculation to
- * make sure there is enough room in the FIFO before
- * initiating the DMA for each buffer. The calc is:
-@@ -2826,7 +2826,7 @@
- #ifdef NETIF_F_TSO
- /* Controller Erratum workaround */
- if (!skb->data_len && tx_ring->last_tx_tso &&
-- !skb_shinfo(skb)->tso_size)
-+ !skb_shinfo(skb)->gso_size)
- count++;
- #endif
-
-Index: tmp-linux-2.6.17/drivers/net/forcedeth.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/forcedeth.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/forcedeth.c 2007-01-08 16:48:05.000000000 +0000
-@@ -533,9 +533,9 @@
- * critical parts:
- * - rx is (pseudo-) lockless: it relies on the single-threading provided
- * by the arch code for interrupts.
-- * - tx setup is lockless: it relies on dev->xmit_lock. Actual submission
-+ * - tx setup is lockless: it relies on netif_tx_lock. Actual submission
- * needs dev->priv->lock :-(
-- * - set_multicast_list: preparation lockless, relies on dev->xmit_lock.
-+ * - set_multicast_list: preparation lockless, relies on netif_tx_lock.
- */
-
- /* in dev: base, irq */
-@@ -1213,7 +1213,7 @@
-
- /*
- * nv_start_xmit: dev->hard_start_xmit function
-- * Called with dev->xmit_lock held.
-+ * Called with netif_tx_lock held.
- */
- static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
- {
-@@ -1303,8 +1303,8 @@
- np->tx_skbuff[nr] = skb;
-
- #ifdef NETIF_F_TSO
-- if (skb_shinfo(skb)->tso_size)
-- tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->tso_size << NV_TX2_TSO_SHIFT);
-+ if (skb_shinfo(skb)->gso_size)
-+ tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT);
- else
- #endif
- tx_flags_extra = (skb->ip_summed == CHECKSUM_HW ? (NV_TX2_CHECKSUM_L3|NV_TX2_CHECKSUM_L4) : 0);
-@@ -1407,7 +1407,7 @@
-
- /*
- * nv_tx_timeout: dev->tx_timeout function
-- * Called with dev->xmit_lock held.
-+ * Called with netif_tx_lock held.
- */
- static void nv_tx_timeout(struct net_device *dev)
- {
-@@ -1737,7 +1737,7 @@
- * Changing the MTU is a rare event, it shouldn't matter.
- */
- nv_disable_irq(dev);
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- spin_lock(&np->lock);
- /* stop engines */
- nv_stop_rx(dev);
-@@ -1768,7 +1768,7 @@
- nv_start_rx(dev);
- nv_start_tx(dev);
- spin_unlock(&np->lock);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- nv_enable_irq(dev);
- }
- return 0;
-@@ -1803,7 +1803,7 @@
- memcpy(dev->dev_addr, macaddr->sa_data, ETH_ALEN);
-
- if (netif_running(dev)) {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- spin_lock_irq(&np->lock);
-
- /* stop rx engine */
-@@ -1815,7 +1815,7 @@
- /* restart rx engine */
- nv_start_rx(dev);
- spin_unlock_irq(&np->lock);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- } else {
- nv_copy_mac_to_hw(dev);
- }
-@@ -1824,7 +1824,7 @@
-
- /*
- * nv_set_multicast: dev->set_multicast function
-- * Called with dev->xmit_lock held.
-+ * Called with netif_tx_lock held.
- */
- static void nv_set_multicast(struct net_device *dev)
- {
-Index: tmp-linux-2.6.17/drivers/net/hamradio/6pack.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/hamradio/6pack.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/hamradio/6pack.c 2007-01-08 16:48:05.000000000 +0000
-@@ -308,9 +308,9 @@
- {
- struct sockaddr_ax25 *sa = addr;
-
-- spin_lock_irq(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
-- spin_unlock_irq(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
-
- return 0;
- }
-@@ -767,9 +767,9 @@
- break;
- }
-
-- spin_lock_irq(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN);
-- spin_unlock_irq(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
-
- err = 0;
- break;
-Index: tmp-linux-2.6.17/drivers/net/hamradio/mkiss.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/hamradio/mkiss.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/hamradio/mkiss.c 2007-01-08 16:48:05.000000000 +0000
-@@ -357,9 +357,9 @@
- {
- struct sockaddr_ax25 *sa = addr;
-
-- spin_lock_irq(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN);
-- spin_unlock_irq(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
-
- return 0;
- }
-@@ -886,9 +886,9 @@
- break;
- }
-
-- spin_lock_irq(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- memcpy(dev->dev_addr, addr, AX25_ADDR_LEN);
-- spin_unlock_irq(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
-
- err = 0;
- break;
-Index: tmp-linux-2.6.17/drivers/net/ifb.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/ifb.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/ifb.c 2007-01-08 16:48:05.000000000 +0000
-@@ -76,13 +76,13 @@
- dp->st_task_enter++;
- if ((skb = skb_peek(&dp->tq)) == NULL) {
- dp->st_txq_refl_try++;
-- if (spin_trylock(&_dev->xmit_lock)) {
-+ if (netif_tx_trylock(_dev)) {
- dp->st_rxq_enter++;
- while ((skb = skb_dequeue(&dp->rq)) != NULL) {
- skb_queue_tail(&dp->tq, skb);
- dp->st_rx2tx_tran++;
- }
-- spin_unlock(&_dev->xmit_lock);
-+ netif_tx_unlock(_dev);
- } else {
- /* reschedule */
- dp->st_rxq_notenter++;
-@@ -110,7 +110,7 @@
- }
- }
-
-- if (spin_trylock(&_dev->xmit_lock)) {
-+ if (netif_tx_trylock(_dev)) {
- dp->st_rxq_check++;
- if ((skb = skb_peek(&dp->rq)) == NULL) {
- dp->tasklet_pending = 0;
-@@ -118,10 +118,10 @@
- netif_wake_queue(_dev);
- } else {
- dp->st_rxq_rsch++;
-- spin_unlock(&_dev->xmit_lock);
-+ netif_tx_unlock(_dev);
- goto resched;
- }
-- spin_unlock(&_dev->xmit_lock);
-+ netif_tx_unlock(_dev);
- } else {
- resched:
- dp->tasklet_pending = 1;
-Index: tmp-linux-2.6.17/drivers/net/irda/vlsi_ir.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/irda/vlsi_ir.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/irda/vlsi_ir.c 2007-01-08 16:48:05.000000000 +0000
-@@ -959,7 +959,7 @@
- || (now.tv_sec==ready.tv_sec && now.tv_usec>=ready.tv_usec))
- break;
- udelay(100);
-- /* must not sleep here - we are called under xmit_lock! */
-+ /* must not sleep here - called under netif_tx_lock! */
- }
- }
-
-Index: tmp-linux-2.6.17/drivers/net/ixgb/ixgb_main.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/ixgb/ixgb_main.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/ixgb/ixgb_main.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1168,7 +1168,7 @@
- uint16_t ipcse, tucse, mss;
- int err;
-
-- if(likely(skb_shinfo(skb)->tso_size)) {
-+ if(likely(skb_shinfo(skb)->gso_size)) {
- if (skb_header_cloned(skb)) {
- err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
- if (err)
-@@ -1176,7 +1176,7 @@
- }
-
- hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2));
-- mss = skb_shinfo(skb)->tso_size;
-+ mss = skb_shinfo(skb)->gso_size;
- skb->nh.iph->tot_len = 0;
- skb->nh.iph->check = 0;
- skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr,
-Index: tmp-linux-2.6.17/drivers/net/loopback.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/loopback.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/loopback.c 2007-01-08 16:48:05.000000000 +0000
-@@ -74,7 +74,7 @@
- struct iphdr *iph = skb->nh.iph;
- struct tcphdr *th = (struct tcphdr*)(skb->nh.raw + (iph->ihl * 4));
- unsigned int doffset = (iph->ihl + th->doff) * 4;
-- unsigned int mtu = skb_shinfo(skb)->tso_size + doffset;
-+ unsigned int mtu = skb_shinfo(skb)->gso_size + doffset;
- unsigned int offset = 0;
- u32 seq = ntohl(th->seq);
- u16 id = ntohs(iph->id);
-@@ -139,7 +139,7 @@
- #endif
-
- #ifdef LOOPBACK_TSO
-- if (skb_shinfo(skb)->tso_size) {
-+ if (skb_shinfo(skb)->gso_size) {
- BUG_ON(skb->protocol != htons(ETH_P_IP));
- BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
-
-Index: tmp-linux-2.6.17/drivers/net/mv643xx_eth.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/mv643xx_eth.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/mv643xx_eth.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1200,7 +1200,7 @@
- }
-
- if (has_tiny_unaligned_frags(skb)) {
-- if ((skb_linearize(skb, GFP_ATOMIC) != 0)) {
-+ if (__skb_linearize(skb)) {
- stats->tx_dropped++;
- printk(KERN_DEBUG "%s: failed to linearize tiny "
- "unaligned fragment\n", dev->name);
-Index: tmp-linux-2.6.17/drivers/net/natsemi.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/natsemi.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/natsemi.c 2007-01-08 16:48:05.000000000 +0000
-@@ -318,12 +318,12 @@
- The rx process only runs in the interrupt handler. Access from outside
- the interrupt handler is only permitted after disable_irq().
-
--The rx process usually runs under the dev->xmit_lock. If np->intr_tx_reap
-+The rx process usually runs under the netif_tx_lock. If np->intr_tx_reap
- is set, then access is permitted under spin_lock_irq(&np->lock).
-
- Thus configuration functions that want to access everything must call
- disable_irq(dev->irq);
-- spin_lock_bh(dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- spin_lock_irq(&np->lock);
-
- IV. Notes
-Index: tmp-linux-2.6.17/drivers/net/r8169.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/r8169.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/r8169.c 2007-01-08 16:48:05.000000000 +0000
-@@ -2171,7 +2171,7 @@
- static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev)
- {
- if (dev->features & NETIF_F_TSO) {
-- u32 mss = skb_shinfo(skb)->tso_size;
-+ u32 mss = skb_shinfo(skb)->gso_size;
-
- if (mss)
- return LargeSend | ((mss & MSSMask) << MSSShift);
-Index: tmp-linux-2.6.17/drivers/net/s2io.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/s2io.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/s2io.c 2007-01-08 16:48:05.000000000 +0000
-@@ -3564,8 +3564,8 @@
- txdp->Control_1 = 0;
- txdp->Control_2 = 0;
- #ifdef NETIF_F_TSO
-- mss = skb_shinfo(skb)->tso_size;
-- if (mss) {
-+ mss = skb_shinfo(skb)->gso_size;
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) {
- txdp->Control_1 |= TXD_TCP_LSO_EN;
- txdp->Control_1 |= TXD_TCP_LSO_MSS(mss);
- }
-@@ -3585,10 +3585,10 @@
- }
-
- frg_len = skb->len - skb->data_len;
-- if (skb_shinfo(skb)->ufo_size) {
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) {
- int ufo_size;
-
-- ufo_size = skb_shinfo(skb)->ufo_size;
-+ ufo_size = skb_shinfo(skb)->gso_size;
- ufo_size &= ~7;
- txdp->Control_1 |= TXD_UFO_EN;
- txdp->Control_1 |= TXD_UFO_MSS(ufo_size);
-@@ -3614,7 +3614,7 @@
- txdp->Host_Control = (unsigned long) skb;
- txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len);
-
-- if (skb_shinfo(skb)->ufo_size)
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4)
- txdp->Control_1 |= TXD_UFO_EN;
-
- frg_cnt = skb_shinfo(skb)->nr_frags;
-@@ -3629,12 +3629,12 @@
- (sp->pdev, frag->page, frag->page_offset,
- frag->size, PCI_DMA_TODEVICE);
- txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
-- if (skb_shinfo(skb)->ufo_size)
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4)
- txdp->Control_1 |= TXD_UFO_EN;
- }
- txdp->Control_1 |= TXD_GATHER_CODE_LAST;
-
-- if (skb_shinfo(skb)->ufo_size)
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4)
- frg_cnt++; /* as Txd0 was used for inband header */
-
- tx_fifo = mac_control->tx_FIFO_start[queue];
-@@ -3648,7 +3648,7 @@
- if (mss)
- val64 |= TX_FIFO_SPECIAL_FUNC;
- #endif
-- if (skb_shinfo(skb)->ufo_size)
-+ if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4)
- val64 |= TX_FIFO_SPECIAL_FUNC;
- writeq(val64, &tx_fifo->List_Control);
-
-Index: tmp-linux-2.6.17/drivers/net/sky2.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/sky2.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/sky2.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1160,7 +1160,7 @@
- count = sizeof(dma_addr_t) / sizeof(u32);
- count += skb_shinfo(skb)->nr_frags * count;
-
-- if (skb_shinfo(skb)->tso_size)
-+ if (skb_shinfo(skb)->gso_size)
- ++count;
-
- if (skb->ip_summed == CHECKSUM_HW)
-@@ -1232,7 +1232,7 @@
- }
-
- /* Check for TCP Segmentation Offload */
-- mss = skb_shinfo(skb)->tso_size;
-+ mss = skb_shinfo(skb)->gso_size;
- if (mss != 0) {
- /* just drop the packet if non-linear expansion fails */
- if (skb_header_cloned(skb) &&
-Index: tmp-linux-2.6.17/drivers/net/tg3.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/tg3.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/tg3.c 2007-01-08 16:48:53.000000000 +0000
-@@ -3743,7 +3743,7 @@
- #if TG3_TSO_SUPPORT != 0
- mss = 0;
- if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
-- (mss = skb_shinfo(skb)->tso_size) != 0) {
-+ (mss = skb_shinfo(skb)->gso_size) != 0) {
- int tcp_opt_len, ip_tcp_len;
-
- if (skb_header_cloned(skb) &&
-@@ -3871,7 +3871,7 @@
- #if TG3_TSO_SUPPORT != 0
- mss = 0;
- if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
-- (mss = skb_shinfo(skb)->tso_size) != 0) {
-+ (mss = skb_shinfo(skb)->gso_size) != 0) {
- int tcp_opt_len, ip_tcp_len;
-
- if (skb_header_cloned(skb) &&
-Index: tmp-linux-2.6.17/drivers/net/tulip/winbond-840.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/tulip/winbond-840.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/tulip/winbond-840.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1605,11 +1605,11 @@
- * - get_stats:
- * spin_lock_irq(np->lock), doesn't touch hw if not present
- * - hard_start_xmit:
-- * netif_stop_queue + spin_unlock_wait(&dev->xmit_lock);
-+ * synchronize_irq + netif_tx_disable;
- * - tx_timeout:
-- * netif_device_detach + spin_unlock_wait(&dev->xmit_lock);
-+ * netif_device_detach + netif_tx_disable;
- * - set_multicast_list
-- * netif_device_detach + spin_unlock_wait(&dev->xmit_lock);
-+ * netif_device_detach + netif_tx_disable;
- * - interrupt handler
- * doesn't touch hw if not present, synchronize_irq waits for
- * running instances of the interrupt handler.
-@@ -1635,11 +1635,10 @@
- netif_device_detach(dev);
- update_csr6(dev, 0);
- iowrite32(0, ioaddr + IntrEnable);
-- netif_stop_queue(dev);
- spin_unlock_irq(&np->lock);
-
-- spin_unlock_wait(&dev->xmit_lock);
- synchronize_irq(dev->irq);
-+ netif_tx_disable(dev);
-
- np->stats.rx_missed_errors += ioread32(ioaddr + RxMissed) & 0xffff;
-
-Index: tmp-linux-2.6.17/drivers/net/typhoon.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/typhoon.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/typhoon.c 2007-01-08 16:48:05.000000000 +0000
-@@ -340,7 +340,7 @@
- #endif
-
- #if defined(NETIF_F_TSO)
--#define skb_tso_size(x) (skb_shinfo(x)->tso_size)
-+#define skb_tso_size(x) (skb_shinfo(x)->gso_size)
- #define TSO_NUM_DESCRIPTORS 2
- #define TSO_OFFLOAD_ON TYPHOON_OFFLOAD_TCP_SEGMENT
- #else
-Index: tmp-linux-2.6.17/drivers/net/via-velocity.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/via-velocity.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/via-velocity.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1899,6 +1899,13 @@
-
- int pktlen = skb->len;
-
-+#ifdef VELOCITY_ZERO_COPY_SUPPORT
-+ if (skb_shinfo(skb)->nr_frags > 6 && __skb_linearize(skb)) {
-+ kfree_skb(skb);
-+ return 0;
-+ }
-+#endif
-+
- spin_lock_irqsave(&vptr->lock, flags);
-
- index = vptr->td_curr[qnum];
-@@ -1914,8 +1921,6 @@
- */
- if (pktlen < ETH_ZLEN) {
- /* Cannot occur until ZC support */
-- if(skb_linearize(skb, GFP_ATOMIC))
-- return 0;
- pktlen = ETH_ZLEN;
- memcpy(tdinfo->buf, skb->data, skb->len);
- memset(tdinfo->buf + skb->len, 0, ETH_ZLEN - skb->len);
-@@ -1933,7 +1938,6 @@
- int nfrags = skb_shinfo(skb)->nr_frags;
- tdinfo->skb = skb;
- if (nfrags > 6) {
-- skb_linearize(skb, GFP_ATOMIC);
- memcpy(tdinfo->buf, skb->data, skb->len);
- tdinfo->skb_dma[0] = tdinfo->buf_dma;
- td_ptr->tdesc0.pktsize =
-Index: tmp-linux-2.6.17/drivers/net/wireless/orinoco.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/net/wireless/orinoco.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/net/wireless/orinoco.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1833,7 +1833,9 @@
- /* Set promiscuity / multicast*/
- priv->promiscuous = 0;
- priv->mc_count = 0;
-- __orinoco_set_multicast_list(dev); /* FIXME: what about the xmit_lock */
-+
-+ /* FIXME: what about netif_tx_lock */
-+ __orinoco_set_multicast_list(dev);
-
- return 0;
- }
-Index: tmp-linux-2.6.17/drivers/s390/net/qeth_eddp.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_eddp.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/s390/net/qeth_eddp.c 2007-01-08 16:48:05.000000000 +0000
-@@ -420,7 +420,7 @@
- }
- tcph = eddp->skb->h.th;
- while (eddp->skb_offset < eddp->skb->len) {
-- data_len = min((int)skb_shinfo(eddp->skb)->tso_size,
-+ data_len = min((int)skb_shinfo(eddp->skb)->gso_size,
- (int)(eddp->skb->len - eddp->skb_offset));
- /* prepare qdio hdr */
- if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){
-@@ -515,20 +515,20 @@
-
- QETH_DBF_TEXT(trace, 5, "eddpcanp");
- /* can we put multiple skbs in one page? */
-- skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->tso_size + hdr_len);
-+ skbs_per_page = PAGE_SIZE / (skb_shinfo(skb)->gso_size + hdr_len);
- if (skbs_per_page > 1){
-- ctx->num_pages = (skb_shinfo(skb)->tso_segs + 1) /
-+ ctx->num_pages = (skb_shinfo(skb)->gso_segs + 1) /
- skbs_per_page + 1;
- ctx->elements_per_skb = 1;
- } else {
- /* no -> how many elements per skb? */
-- ctx->elements_per_skb = (skb_shinfo(skb)->tso_size + hdr_len +
-+ ctx->elements_per_skb = (skb_shinfo(skb)->gso_size + hdr_len +
- PAGE_SIZE) >> PAGE_SHIFT;
- ctx->num_pages = ctx->elements_per_skb *
-- (skb_shinfo(skb)->tso_segs + 1);
-+ (skb_shinfo(skb)->gso_segs + 1);
- }
- ctx->num_elements = ctx->elements_per_skb *
-- (skb_shinfo(skb)->tso_segs + 1);
-+ (skb_shinfo(skb)->gso_segs + 1);
- }
-
- static inline struct qeth_eddp_context *
-Index: tmp-linux-2.6.17/drivers/s390/net/qeth_main.c
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_main.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/s390/net/qeth_main.c 2007-01-08 16:48:05.000000000 +0000
-@@ -4417,7 +4417,7 @@
- struct qeth_eddp_context *ctx = NULL;
- int tx_bytes = skb->len;
- unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
-- unsigned short tso_size = skb_shinfo(skb)->tso_size;
-+ unsigned short gso_size = skb_shinfo(skb)->gso_size;
- int rc;
-
- QETH_DBF_TEXT(trace, 6, "sendpkt");
-@@ -4453,7 +4453,7 @@
- queue = card->qdio.out_qs
- [qeth_get_priority_queue(card, skb, ipv, cast_type)];
-
-- if (skb_shinfo(skb)->tso_size)
-+ if (skb_shinfo(skb)->gso_size)
- large_send = card->options.large_send;
-
- /*are we able to do TSO ? If so ,prepare and send it from here */
-@@ -4500,7 +4500,7 @@
- card->stats.tx_packets++;
- card->stats.tx_bytes += tx_bytes;
- #ifdef CONFIG_QETH_PERF_STATS
-- if (tso_size &&
-+ if (gso_size &&
- !(large_send == QETH_LARGE_SEND_NO)) {
- card->perf_stats.large_send_bytes += tx_bytes;
- card->perf_stats.large_send_cnt++;
-Index: tmp-linux-2.6.17/drivers/s390/net/qeth_tso.h
-===================================================================
---- tmp-linux-2.6.17.orig/drivers/s390/net/qeth_tso.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/drivers/s390/net/qeth_tso.h 2007-01-08 16:48:05.000000000 +0000
-@@ -51,7 +51,7 @@
- hdr->ext.hdr_version = 1;
- hdr->ext.hdr_len = 28;
- /*insert non-fix values */
-- hdr->ext.mss = skb_shinfo(skb)->tso_size;
-+ hdr->ext.mss = skb_shinfo(skb)->gso_size;
- hdr->ext.dg_hdr_len = (__u16)(iph->ihl*4 + tcph->doff*4);
- hdr->ext.payload_len = (__u16)(skb->len - hdr->ext.dg_hdr_len -
- sizeof(struct qeth_hdr_tso));
-Index: tmp-linux-2.6.17/include/linux/ethtool.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/linux/ethtool.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/linux/ethtool.h 2007-01-08 16:48:05.000000000 +0000
-@@ -408,6 +408,8 @@
- #define ETHTOOL_GPERMADDR 0x00000020 /* Get permanent hardware address */
- #define ETHTOOL_GUFO 0x00000021 /* Get UFO enable (ethtool_value) */
- #define ETHTOOL_SUFO 0x00000022 /* Set UFO enable (ethtool_value) */
-+#define ETHTOOL_GGSO 0x00000023 /* Get GSO enable (ethtool_value) */
-+#define ETHTOOL_SGSO 0x00000024 /* Set GSO enable (ethtool_value) */
-
- /* compatibility with older code */
- #define SPARC_ETH_GSET ETHTOOL_GSET
-Index: tmp-linux-2.6.17/include/linux/netdevice.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/linux/netdevice.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/linux/netdevice.h 2007-01-08 16:48:05.000000000 +0000
-@@ -232,6 +232,7 @@
- __LINK_STATE_RX_SCHED,
- __LINK_STATE_LINKWATCH_PENDING,
- __LINK_STATE_DORMANT,
-+ __LINK_STATE_QDISC_RUNNING,
- };
-
-
-@@ -307,9 +308,17 @@
- #define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
- #define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
- #define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
--#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */
-+#define NETIF_F_GSO 2048 /* Enable software GSO. */
- #define NETIF_F_LLTX 4096 /* LockLess TX */
--#define NETIF_F_UFO 8192 /* Can offload UDP Large Send*/
-+
-+ /* Segmentation offload features */
-+#define NETIF_F_GSO_SHIFT 16
-+#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
-+#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
-+#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
-+
-+#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
-+#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
-
- struct net_device *next_sched;
-
-@@ -398,6 +407,9 @@
- struct list_head qdisc_list;
- unsigned long tx_queue_len; /* Max frames per queue allowed */
-
-+ /* Partially transmitted GSO packet. */
-+ struct sk_buff *gso_skb;
-+
- /* ingress path synchronizer */
- spinlock_t ingress_lock;
- struct Qdisc *qdisc_ingress;
-@@ -406,7 +418,7 @@
- * One part is mostly used on xmit path (device)
- */
- /* hard_start_xmit synchronizer */
-- spinlock_t xmit_lock ____cacheline_aligned_in_smp;
-+ spinlock_t _xmit_lock ____cacheline_aligned_in_smp;
- /* cpu id of processor entered to hard_start_xmit or -1,
- if nobody entered there.
- */
-@@ -532,6 +544,8 @@
- struct net_device *,
- struct packet_type *,
- struct net_device *);
-+ struct sk_buff *(*gso_segment)(struct sk_buff *skb,
-+ int features);
- void *af_packet_priv;
- struct list_head list;
- };
-@@ -679,7 +693,8 @@
- extern int dev_set_mtu(struct net_device *, int);
- extern int dev_set_mac_address(struct net_device *,
- struct sockaddr *);
--extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
-+extern int dev_hard_start_xmit(struct sk_buff *skb,
-+ struct net_device *dev);
-
- extern void dev_init(void);
-
-@@ -889,11 +904,43 @@
- clear_bit(__LINK_STATE_RX_SCHED, &dev->state);
- }
-
-+static inline void netif_tx_lock(struct net_device *dev)
-+{
-+ spin_lock(&dev->_xmit_lock);
-+ dev->xmit_lock_owner = smp_processor_id();
-+}
-+
-+static inline void netif_tx_lock_bh(struct net_device *dev)
-+{
-+ spin_lock_bh(&dev->_xmit_lock);
-+ dev->xmit_lock_owner = smp_processor_id();
-+}
-+
-+static inline int netif_tx_trylock(struct net_device *dev)
-+{
-+ int err = spin_trylock(&dev->_xmit_lock);
-+ if (!err)
-+ dev->xmit_lock_owner = smp_processor_id();
-+ return err;
-+}
-+
-+static inline void netif_tx_unlock(struct net_device *dev)
-+{
-+ dev->xmit_lock_owner = -1;
-+ spin_unlock(&dev->_xmit_lock);
-+}
-+
-+static inline void netif_tx_unlock_bh(struct net_device *dev)
-+{
-+ dev->xmit_lock_owner = -1;
-+ spin_unlock_bh(&dev->_xmit_lock);
-+}
-+
- static inline void netif_tx_disable(struct net_device *dev)
- {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- netif_stop_queue(dev);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- }
-
- /* These functions live elsewhere (drivers/net/net_init.c, but related) */
-@@ -921,6 +968,7 @@
- extern int weight_p;
- extern int netdev_set_master(struct net_device *dev, struct net_device *master);
- extern int skb_checksum_help(struct sk_buff *skb, int inward);
-+extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
- #ifdef CONFIG_BUG
- extern void netdev_rx_csum_fault(struct net_device *dev);
- #else
-@@ -940,6 +988,18 @@
-
- extern void linkwatch_run_queue(void);
-
-+static inline int skb_gso_ok(struct sk_buff *skb, int features)
-+{
-+ int feature = skb_shinfo(skb)->gso_size ?
-+ skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
-+ return (features & feature) == feature;
-+}
-+
-+static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
-+{
-+ return !skb_gso_ok(skb, dev->features);
-+}
-+
- #endif /* __KERNEL__ */
-
- #endif /* _LINUX_DEV_H */
-Index: tmp-linux-2.6.17/include/linux/skbuff.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/linux/skbuff.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/linux/skbuff.h 2007-01-08 16:48:05.000000000 +0000
-@@ -134,9 +134,10 @@
- struct skb_shared_info {
- atomic_t dataref;
- unsigned short nr_frags;
-- unsigned short tso_size;
-- unsigned short tso_segs;
-- unsigned short ufo_size;
-+ unsigned short gso_size;
-+ /* Warning: this field is not always filled in (UFO)! */
-+ unsigned short gso_segs;
-+ unsigned short gso_type;
- unsigned int ip6_frag_id;
- struct sk_buff *frag_list;
- skb_frag_t frags[MAX_SKB_FRAGS];
-@@ -168,6 +169,14 @@
- SKB_FCLONE_CLONE,
- };
-
-+enum {
-+ SKB_GSO_TCPV4 = 1 << 0,
-+ SKB_GSO_UDPV4 = 1 << 1,
-+
-+ /* This indicates the skb is from an untrusted source. */
-+ SKB_GSO_DODGY = 1 << 2,
-+};
-+
- /**
- * struct sk_buff - socket buffer
- * @next: Next buffer in list
-@@ -1161,18 +1170,34 @@
- return 0;
- }
-
-+static inline int __skb_linearize(struct sk_buff *skb)
-+{
-+ return __pskb_pull_tail(skb, skb->data_len) ? 0 : -ENOMEM;
-+}
-+
- /**
- * skb_linearize - convert paged skb to linear one
- * @skb: buffer to linarize
-- * @gfp: allocation mode
- *
- * If there is no free memory -ENOMEM is returned, otherwise zero
- * is returned and the old skb data released.
- */
--extern int __skb_linearize(struct sk_buff *skb, gfp_t gfp);
--static inline int skb_linearize(struct sk_buff *skb, gfp_t gfp)
-+static inline int skb_linearize(struct sk_buff *skb)
-+{
-+ return skb_is_nonlinear(skb) ? __skb_linearize(skb) : 0;
-+}
-+
-+/**
-+ * skb_linearize_cow - make sure skb is linear and writable
-+ * @skb: buffer to process
-+ *
-+ * If there is no free memory -ENOMEM is returned, otherwise zero
-+ * is returned and the old skb data released.
-+ */
-+static inline int skb_linearize_cow(struct sk_buff *skb)
- {
-- return __skb_linearize(skb, gfp);
-+ return skb_is_nonlinear(skb) || skb_cloned(skb) ?
-+ __skb_linearize(skb) : 0;
- }
-
- /**
-@@ -1269,6 +1294,7 @@
- struct sk_buff *skb1, const u32 len);
-
- extern void skb_release_data(struct sk_buff *skb);
-+extern struct sk_buff *skb_segment(struct sk_buff *skb, int features);
-
- static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
- int len, void *buffer)
-Index: tmp-linux-2.6.17/include/net/pkt_sched.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/net/pkt_sched.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/net/pkt_sched.h 2007-01-08 16:48:05.000000000 +0000
-@@ -218,12 +218,13 @@
- struct rtattr *tab);
- extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
-
--extern int qdisc_restart(struct net_device *dev);
-+extern void __qdisc_run(struct net_device *dev);
-
- static inline void qdisc_run(struct net_device *dev)
- {
-- while (!netif_queue_stopped(dev) && qdisc_restart(dev) < 0)
-- /* NOTHING */;
-+ if (!netif_queue_stopped(dev) &&
-+ !test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
-+ __qdisc_run(dev);
- }
-
- extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
-Index: tmp-linux-2.6.17/include/net/protocol.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/net/protocol.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/net/protocol.h 2007-01-08 16:48:05.000000000 +0000
-@@ -37,6 +37,8 @@
- struct net_protocol {
- int (*handler)(struct sk_buff *skb);
- void (*err_handler)(struct sk_buff *skb, u32 info);
-+ struct sk_buff *(*gso_segment)(struct sk_buff *skb,
-+ int features);
- int no_policy;
- };
-
-Index: tmp-linux-2.6.17/include/net/sock.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/net/sock.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/net/sock.h 2007-01-08 16:48:05.000000000 +0000
-@@ -1032,9 +1032,13 @@
- {
- __sk_dst_set(sk, dst);
- sk->sk_route_caps = dst->dev->features;
-+ if (sk->sk_route_caps & NETIF_F_GSO)
-+ sk->sk_route_caps |= NETIF_F_TSO;
- if (sk->sk_route_caps & NETIF_F_TSO) {
- if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len)
- sk->sk_route_caps &= ~NETIF_F_TSO;
-+ else
-+ sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
- }
- }
-
-Index: tmp-linux-2.6.17/include/net/tcp.h
-===================================================================
---- tmp-linux-2.6.17.orig/include/net/tcp.h 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/include/net/tcp.h 2007-01-08 16:48:05.000000000 +0000
-@@ -565,13 +565,13 @@
- */
- static inline int tcp_skb_pcount(const struct sk_buff *skb)
- {
-- return skb_shinfo(skb)->tso_segs;
-+ return skb_shinfo(skb)->gso_segs;
- }
-
- /* This is valid iff tcp_skb_pcount() > 1. */
- static inline int tcp_skb_mss(const struct sk_buff *skb)
- {
-- return skb_shinfo(skb)->tso_size;
-+ return skb_shinfo(skb)->gso_size;
- }
-
- static inline void tcp_dec_pcount_approx(__u32 *count,
-@@ -1076,6 +1076,8 @@
-
- extern int tcp_v4_destroy_sock(struct sock *sk);
-
-+extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
-+
- #ifdef CONFIG_PROC_FS
- extern int tcp4_proc_init(void);
- extern void tcp4_proc_exit(void);
-Index: tmp-linux-2.6.17/net/atm/clip.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/atm/clip.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/atm/clip.c 2007-01-08 16:48:05.000000000 +0000
-@@ -98,7 +98,7 @@
- printk(KERN_CRIT "!clip_vcc->entry (clip_vcc %p)\n", clip_vcc);
- return;
- }
-- spin_lock_bh(&entry->neigh->dev->xmit_lock); /* block clip_start_xmit() */
-+ netif_tx_lock_bh(entry->neigh->dev); /* block clip_start_xmit() */
- entry->neigh->used = jiffies;
- for (walk = &entry->vccs; *walk; walk = &(*walk)->next)
- if (*walk == clip_vcc) {
-@@ -122,7 +122,7 @@
- printk(KERN_CRIT "ATMARP: unlink_clip_vcc failed (entry %p, vcc "
- "0x%p)\n", entry, clip_vcc);
- out:
-- spin_unlock_bh(&entry->neigh->dev->xmit_lock);
-+ netif_tx_unlock_bh(entry->neigh->dev);
- }
-
- /* The neighbour entry n->lock is held. */
-Index: tmp-linux-2.6.17/net/bridge/br_device.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/bridge/br_device.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/bridge/br_device.c 2007-01-08 16:48:05.000000000 +0000
-@@ -145,9 +145,9 @@
- struct net_bridge *br = netdev_priv(dev);
-
- if (data)
-- br->feature_mask |= NETIF_F_IP_CSUM;
-+ br->feature_mask |= NETIF_F_NO_CSUM;
- else
-- br->feature_mask &= ~NETIF_F_IP_CSUM;
-+ br->feature_mask &= ~NETIF_F_ALL_CSUM;
-
- br_features_recompute(br);
- return 0;
-@@ -184,6 +184,6 @@
- dev->set_mac_address = br_set_mac_address;
- dev->priv_flags = IFF_EBRIDGE;
-
-- dev->features = NETIF_F_SG | NETIF_F_FRAGLIST
-- | NETIF_F_HIGHDMA | NETIF_F_TSO | NETIF_F_IP_CSUM;
-+ dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
-+ NETIF_F_TSO | NETIF_F_NO_CSUM | NETIF_F_GSO_ROBUST;
- }
-Index: tmp-linux-2.6.17/net/bridge/br_forward.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/bridge/br_forward.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/bridge/br_forward.c 2007-01-08 16:48:05.000000000 +0000
-@@ -38,7 +38,7 @@
- int br_dev_queue_push_xmit(struct sk_buff *skb)
- {
- /* drop mtu oversized packets except tso */
-- if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->tso_size)
-+ if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->gso_size)
- kfree_skb(skb);
- else {
- #ifdef CONFIG_BRIDGE_NETFILTER
-Index: tmp-linux-2.6.17/net/bridge/br_if.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/bridge/br_if.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/bridge/br_if.c 2007-01-08 16:48:05.000000000 +0000
-@@ -372,17 +372,28 @@
- struct net_bridge_port *p;
- unsigned long features, checksum;
-
-- features = br->feature_mask &~ NETIF_F_IP_CSUM;
-- checksum = br->feature_mask & NETIF_F_IP_CSUM;
-+ checksum = br->feature_mask & NETIF_F_ALL_CSUM ? NETIF_F_NO_CSUM : 0;
-+ features = br->feature_mask & ~NETIF_F_ALL_CSUM;
-
- list_for_each_entry(p, &br->port_list, list) {
-- if (!(p->dev->features
-- & (NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM)))
-+ unsigned long feature = p->dev->features;
-+
-+ if (checksum & NETIF_F_NO_CSUM && !(feature & NETIF_F_NO_CSUM))
-+ checksum ^= NETIF_F_NO_CSUM | NETIF_F_HW_CSUM;
-+ if (checksum & NETIF_F_HW_CSUM && !(feature & NETIF_F_HW_CSUM))
-+ checksum ^= NETIF_F_HW_CSUM | NETIF_F_IP_CSUM;
-+ if (!(feature & NETIF_F_IP_CSUM))
- checksum = 0;
-- features &= p->dev->features;
-+
-+ if (feature & NETIF_F_GSO)
-+ feature |= NETIF_F_TSO;
-+ feature |= NETIF_F_GSO;
-+
-+ features &= feature;
- }
-
-- br->dev->features = features | checksum | NETIF_F_LLTX;
-+ br->dev->features = features | checksum | NETIF_F_LLTX |
-+ NETIF_F_GSO_ROBUST;
- }
-
- /* called with RTNL */
-Index: tmp-linux-2.6.17/net/bridge/br_netfilter.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/bridge/br_netfilter.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/bridge/br_netfilter.c 2007-01-08 16:48:05.000000000 +0000
-@@ -769,7 +769,7 @@
- {
- if (skb->protocol == htons(ETH_P_IP) &&
- skb->len > skb->dev->mtu &&
-- !(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size))
-+ !skb_shinfo(skb)->gso_size)
- return ip_fragment(skb, br_dev_queue_push_xmit);
- else
- return br_dev_queue_push_xmit(skb);
-Index: tmp-linux-2.6.17/net/core/dev.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/dev.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/dev.c 2007-01-08 16:48:05.000000000 +0000
-@@ -115,6 +115,7 @@
- #include <net/iw_handler.h>
- #include <asm/current.h>
- #include <linux/audit.h>
-+#include <linux/err.h>
-
- /*
- * The list of packet types we will receive (as opposed to discard)
-@@ -1041,7 +1042,7 @@
- * taps currently in use.
- */
-
--void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
-+static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev)
- {
- struct packet_type *ptype;
-
-@@ -1179,6 +1180,45 @@
- return ret;
- }
-
-+/**
-+ * skb_gso_segment - Perform segmentation on skb.
-+ * @skb: buffer to segment
-+ * @features: features for the output path (see dev->features)
-+ *
-+ * This function segments the given skb and returns a list of segments.
-+ *
-+ * It may return NULL if the skb requires no segmentation. This is
-+ * only possible when GSO is used for verifying header integrity.
-+ */
-+struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT);
-+ struct packet_type *ptype;
-+ int type = skb->protocol;
-+
-+ BUG_ON(skb_shinfo(skb)->frag_list);
-+ BUG_ON(skb->ip_summed != CHECKSUM_HW);
-+
-+ skb->mac.raw = skb->data;
-+ skb->mac_len = skb->nh.raw - skb->data;
-+ __skb_pull(skb, skb->mac_len);
-+
-+ rcu_read_lock();
-+ list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) {
-+ if (ptype->type == type && !ptype->dev && ptype->gso_segment) {
-+ segs = ptype->gso_segment(skb, features);
-+ break;
-+ }
-+ }
-+ rcu_read_unlock();
-+
-+ __skb_push(skb, skb->data - skb->mac.raw);
-+
-+ return segs;
-+}
-+
-+EXPORT_SYMBOL(skb_gso_segment);
-+
- /* Take action when hardware reception checksum errors are detected. */
- #ifdef CONFIG_BUG
- void netdev_rx_csum_fault(struct net_device *dev)
-@@ -1215,75 +1255,107 @@
- #define illegal_highdma(dev, skb) (0)
- #endif
-
--/* Keep head the same: replace data */
--int __skb_linearize(struct sk_buff *skb, gfp_t gfp_mask)
-+struct dev_gso_cb {
-+ void (*destructor)(struct sk_buff *skb);
-+};
-+
-+#define DEV_GSO_CB(skb) ((struct dev_gso_cb *)(skb)->cb)
-+
-+static void dev_gso_skb_destructor(struct sk_buff *skb)
- {
-- unsigned int size;
-- u8 *data;
-- long offset;
-- struct skb_shared_info *ninfo;
-- int headerlen = skb->data - skb->head;
-- int expand = (skb->tail + skb->data_len) - skb->end;
--
-- if (skb_shared(skb))
-- BUG();
--
-- if (expand <= 0)
-- expand = 0;
--
-- size = skb->end - skb->head + expand;
-- size = SKB_DATA_ALIGN(size);
-- data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
-- if (!data)
-- return -ENOMEM;
--
-- /* Copy entire thing */
-- if (skb_copy_bits(skb, -headerlen, data, headerlen + skb->len))
-- BUG();
--
-- /* Set up shinfo */
-- ninfo = (struct skb_shared_info*)(data + size);
-- atomic_set(&ninfo->dataref, 1);
-- ninfo->tso_size = skb_shinfo(skb)->tso_size;
-- ninfo->tso_segs = skb_shinfo(skb)->tso_segs;
-- ninfo->nr_frags = 0;
-- ninfo->frag_list = NULL;
--
-- /* Offset between the two in bytes */
-- offset = data - skb->head;
--
-- /* Free old data. */
-- skb_release_data(skb);
--
-- skb->head = data;
-- skb->end = data + size;
--
-- /* Set up new pointers */
-- skb->h.raw += offset;
-- skb->nh.raw += offset;
-- skb->mac.raw += offset;
-- skb->tail += offset;
-- skb->data += offset;
-+ struct dev_gso_cb *cb;
-
-- /* We are no longer a clone, even if we were. */
-- skb->cloned = 0;
-+ do {
-+ struct sk_buff *nskb = skb->next;
-
-- skb->tail += skb->data_len;
-- skb->data_len = 0;
-+ skb->next = nskb->next;
-+ nskb->next = NULL;
-+ kfree_skb(nskb);
-+ } while (skb->next);
-+
-+ cb = DEV_GSO_CB(skb);
-+ if (cb->destructor)
-+ cb->destructor(skb);
-+}
-+
-+/**
-+ * dev_gso_segment - Perform emulated hardware segmentation on skb.
-+ * @skb: buffer to segment
-+ *
-+ * This function segments the given skb and stores the list of segments
-+ * in skb->next.
-+ */
-+static int dev_gso_segment(struct sk_buff *skb)
-+{
-+ struct net_device *dev = skb->dev;
-+ struct sk_buff *segs;
-+ int features = dev->features & ~(illegal_highdma(dev, skb) ?
-+ NETIF_F_SG : 0);
-+
-+ segs = skb_gso_segment(skb, features);
-+
-+ /* Verifying header integrity only. */
-+ if (!segs)
-+ return 0;
-+
-+ if (unlikely(IS_ERR(segs)))
-+ return PTR_ERR(segs);
-+
-+ skb->next = segs;
-+ DEV_GSO_CB(skb)->destructor = skb->destructor;
-+ skb->destructor = dev_gso_skb_destructor;
-+ return 0;
-+}
-+
-+int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
-+{
-+ if (likely(!skb->next)) {
-+ if (netdev_nit)
-+ dev_queue_xmit_nit(skb, dev);
-+
-+ if (netif_needs_gso(dev, skb)) {
-+ if (unlikely(dev_gso_segment(skb)))
-+ goto out_kfree_skb;
-+ if (skb->next)
-+ goto gso;
-+ }
-+
-+ return dev->hard_start_xmit(skb, dev);
-+ }
-+
-+gso:
-+ do {
-+ struct sk_buff *nskb = skb->next;
-+ int rc;
-+
-+ skb->next = nskb->next;
-+ nskb->next = NULL;
-+ rc = dev->hard_start_xmit(nskb, dev);
-+ if (unlikely(rc)) {
-+ nskb->next = skb->next;
-+ skb->next = nskb;
-+ return rc;
-+ }
-+ if (unlikely(netif_queue_stopped(dev) && skb->next))
-+ return NETDEV_TX_BUSY;
-+ } while (skb->next);
-+
-+ skb->destructor = DEV_GSO_CB(skb)->destructor;
-+
-+out_kfree_skb:
-+ kfree_skb(skb);
- return 0;
- }
-
- #define HARD_TX_LOCK(dev, cpu) { \
- if ((dev->features & NETIF_F_LLTX) == 0) { \
-- spin_lock(&dev->xmit_lock); \
-- dev->xmit_lock_owner = cpu; \
-+ netif_tx_lock(dev); \
- } \
- }
-
- #define HARD_TX_UNLOCK(dev) { \
- if ((dev->features & NETIF_F_LLTX) == 0) { \
-- dev->xmit_lock_owner = -1; \
-- spin_unlock(&dev->xmit_lock); \
-+ netif_tx_unlock(dev); \
- } \
- }
-
-@@ -1319,9 +1391,13 @@
- struct Qdisc *q;
- int rc = -ENOMEM;
-
-+ /* GSO will handle the following emulations directly. */
-+ if (netif_needs_gso(dev, skb))
-+ goto gso;
-+
- if (skb_shinfo(skb)->frag_list &&
- !(dev->features & NETIF_F_FRAGLIST) &&
-- __skb_linearize(skb, GFP_ATOMIC))
-+ __skb_linearize(skb))
- goto out_kfree_skb;
-
- /* Fragmented skb is linearized if device does not support SG,
-@@ -1330,25 +1406,26 @@
- */
- if (skb_shinfo(skb)->nr_frags &&
- (!(dev->features & NETIF_F_SG) || illegal_highdma(dev, skb)) &&
-- __skb_linearize(skb, GFP_ATOMIC))
-+ __skb_linearize(skb))
- goto out_kfree_skb;
-
- /* If packet is not checksummed and device does not support
- * checksumming for this protocol, complete checksumming here.
- */
- if (skb->ip_summed == CHECKSUM_HW &&
-- (!(dev->features & (NETIF_F_HW_CSUM | NETIF_F_NO_CSUM)) &&
-+ (!(dev->features & NETIF_F_GEN_CSUM) &&
- (!(dev->features & NETIF_F_IP_CSUM) ||
- skb->protocol != htons(ETH_P_IP))))
- if (skb_checksum_help(skb, 0))
- goto out_kfree_skb;
-
-+gso:
- spin_lock_prefetch(&dev->queue_lock);
-
- /* Disable soft irqs for various locks below. Also
- * stops preemption for RCU.
- */
-- local_bh_disable();
-+ rcu_read_lock_bh();
-
- /* Updates of qdisc are serialized by queue_lock.
- * The struct Qdisc which is pointed to by qdisc is now a
-@@ -1382,8 +1459,8 @@
- /* The device has no queue. Common case for software devices:
- loopback, all the sorts of tunnels...
-
-- Really, it is unlikely that xmit_lock protection is necessary here.
-- (f.e. loopback and IP tunnels are clean ignoring statistics
-+ Really, it is unlikely that netif_tx_lock protection is necessary
-+ here. (f.e. loopback and IP tunnels are clean ignoring statistics
- counters.)
- However, it is possible, that they rely on protection
- made by us here.
-@@ -1399,11 +1476,8 @@
- HARD_TX_LOCK(dev, cpu);
-
- if (!netif_queue_stopped(dev)) {
-- if (netdev_nit)
-- dev_queue_xmit_nit(skb, dev);
--
- rc = 0;
-- if (!dev->hard_start_xmit(skb, dev)) {
-+ if (!dev_hard_start_xmit(skb, dev)) {
- HARD_TX_UNLOCK(dev);
- goto out;
- }
-@@ -1422,13 +1496,13 @@
- }
-
- rc = -ENETDOWN;
-- local_bh_enable();
-+ rcu_read_unlock_bh();
-
- out_kfree_skb:
- kfree_skb(skb);
- return rc;
- out:
-- local_bh_enable();
-+ rcu_read_unlock_bh();
- return rc;
- }
-
-@@ -2785,7 +2859,7 @@
- BUG_ON(dev->reg_state != NETREG_UNINITIALIZED);
-
- spin_lock_init(&dev->queue_lock);
-- spin_lock_init(&dev->xmit_lock);
-+ spin_lock_init(&dev->_xmit_lock);
- dev->xmit_lock_owner = -1;
- #ifdef CONFIG_NET_CLS_ACT
- spin_lock_init(&dev->ingress_lock);
-@@ -2829,9 +2903,7 @@
-
- /* Fix illegal SG+CSUM combinations. */
- if ((dev->features & NETIF_F_SG) &&
-- !(dev->features & (NETIF_F_IP_CSUM |
-- NETIF_F_NO_CSUM |
-- NETIF_F_HW_CSUM))) {
-+ !(dev->features & NETIF_F_ALL_CSUM)) {
- printk("%s: Dropping NETIF_F_SG since no checksum feature.\n",
- dev->name);
- dev->features &= ~NETIF_F_SG;
-@@ -3371,7 +3443,6 @@
- EXPORT_SYMBOL(__dev_get_by_index);
- EXPORT_SYMBOL(__dev_get_by_name);
- EXPORT_SYMBOL(__dev_remove_pack);
--EXPORT_SYMBOL(__skb_linearize);
- EXPORT_SYMBOL(dev_valid_name);
- EXPORT_SYMBOL(dev_add_pack);
- EXPORT_SYMBOL(dev_alloc_name);
-Index: tmp-linux-2.6.17/net/core/dev_mcast.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/dev_mcast.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/dev_mcast.c 2007-01-08 16:48:05.000000000 +0000
-@@ -62,7 +62,7 @@
- * Device mc lists are changed by bh at least if IPv6 is enabled,
- * so that it must be bh protected.
- *
-- * We block accesses to device mc filters with dev->xmit_lock.
-+ * We block accesses to device mc filters with netif_tx_lock.
- */
-
- /*
-@@ -93,9 +93,9 @@
-
- void dev_mc_upload(struct net_device *dev)
- {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- __dev_mc_upload(dev);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- }
-
- /*
-@@ -107,7 +107,7 @@
- int err = 0;
- struct dev_mc_list *dmi, **dmip;
-
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
-
- for (dmip = &dev->mc_list; (dmi = *dmip) != NULL; dmip = &dmi->next) {
- /*
-@@ -139,13 +139,13 @@
- */
- __dev_mc_upload(dev);
-
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- return 0;
- }
- }
- err = -ENOENT;
- done:
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- return err;
- }
-
-@@ -160,7 +160,7 @@
-
- dmi1 = kmalloc(sizeof(*dmi), GFP_ATOMIC);
-
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) {
- if (memcmp(dmi->dmi_addr, addr, dmi->dmi_addrlen) == 0 &&
- dmi->dmi_addrlen == alen) {
-@@ -176,7 +176,7 @@
- }
-
- if ((dmi = dmi1) == NULL) {
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- return -ENOMEM;
- }
- memcpy(dmi->dmi_addr, addr, alen);
-@@ -189,11 +189,11 @@
-
- __dev_mc_upload(dev);
-
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- return 0;
-
- done:
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- kfree(dmi1);
- return err;
- }
-@@ -204,7 +204,7 @@
-
- void dev_mc_discard(struct net_device *dev)
- {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
-
- while (dev->mc_list != NULL) {
- struct dev_mc_list *tmp = dev->mc_list;
-@@ -215,7 +215,7 @@
- }
- dev->mc_count = 0;
-
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- }
-
- #ifdef CONFIG_PROC_FS
-@@ -250,7 +250,7 @@
- struct dev_mc_list *m;
- struct net_device *dev = v;
-
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- for (m = dev->mc_list; m; m = m->next) {
- int i;
-
-@@ -262,7 +262,7 @@
-
- seq_putc(seq, '\n');
- }
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- return 0;
- }
-
-Index: tmp-linux-2.6.17/net/core/ethtool.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/ethtool.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/ethtool.c 2007-01-08 16:48:05.000000000 +0000
-@@ -30,7 +30,7 @@
-
- u32 ethtool_op_get_tx_csum(struct net_device *dev)
- {
-- return (dev->features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM)) != 0;
-+ return (dev->features & NETIF_F_ALL_CSUM) != 0;
- }
-
- int ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
-@@ -551,9 +551,7 @@
- return -EFAULT;
-
- if (edata.data &&
-- !(dev->features & (NETIF_F_IP_CSUM |
-- NETIF_F_NO_CSUM |
-- NETIF_F_HW_CSUM)))
-+ !(dev->features & NETIF_F_ALL_CSUM))
- return -EINVAL;
-
- return __ethtool_set_sg(dev, edata.data);
-@@ -561,7 +559,7 @@
-
- static int ethtool_get_tso(struct net_device *dev, char __user *useraddr)
- {
-- struct ethtool_value edata = { ETHTOOL_GTSO };
-+ struct ethtool_value edata = { ETHTOOL_GUFO };
-
- if (!dev->ethtool_ops->get_tso)
- return -EOPNOTSUPP;
-@@ -615,6 +613,29 @@
- return dev->ethtool_ops->set_ufo(dev, edata.data);
- }
-
-+static int ethtool_get_gso(struct net_device *dev, char __user *useraddr)
-+{
-+ struct ethtool_value edata = { ETHTOOL_GGSO };
-+
-+ edata.data = dev->features & NETIF_F_GSO;
-+ if (copy_to_user(useraddr, &edata, sizeof(edata)))
-+ return -EFAULT;
-+ return 0;
-+}
-+
-+static int ethtool_set_gso(struct net_device *dev, char __user *useraddr)
-+{
-+ struct ethtool_value edata;
-+
-+ if (copy_from_user(&edata, useraddr, sizeof(edata)))
-+ return -EFAULT;
-+ if (edata.data)
-+ dev->features |= NETIF_F_GSO;
-+ else
-+ dev->features &= ~NETIF_F_GSO;
-+ return 0;
-+}
-+
- static int ethtool_self_test(struct net_device *dev, char __user *useraddr)
- {
- struct ethtool_test test;
-@@ -906,6 +927,12 @@
- case ETHTOOL_SUFO:
- rc = ethtool_set_ufo(dev, useraddr);
- break;
-+ case ETHTOOL_GGSO:
-+ rc = ethtool_get_gso(dev, useraddr);
-+ break;
-+ case ETHTOOL_SGSO:
-+ rc = ethtool_set_gso(dev, useraddr);
-+ break;
- default:
- rc = -EOPNOTSUPP;
- }
-Index: tmp-linux-2.6.17/net/core/netpoll.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/netpoll.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/netpoll.c 2007-01-08 16:48:05.000000000 +0000
-@@ -273,24 +273,21 @@
-
- do {
- npinfo->tries--;
-- spin_lock(&np->dev->xmit_lock);
-- np->dev->xmit_lock_owner = smp_processor_id();
-+ netif_tx_lock(np->dev);
-
- /*
- * network drivers do not expect to be called if the queue is
- * stopped.
- */
- if (netif_queue_stopped(np->dev)) {
-- np->dev->xmit_lock_owner = -1;
-- spin_unlock(&np->dev->xmit_lock);
-+ netif_tx_unlock(np->dev);
- netpoll_poll(np);
- udelay(50);
- continue;
- }
-
- status = np->dev->hard_start_xmit(skb, np->dev);
-- np->dev->xmit_lock_owner = -1;
-- spin_unlock(&np->dev->xmit_lock);
-+ netif_tx_unlock(np->dev);
-
- /* success */
- if(!status) {
-Index: tmp-linux-2.6.17/net/core/pktgen.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/pktgen.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/pktgen.c 2007-01-08 16:48:05.000000000 +0000
-@@ -2897,7 +2897,7 @@
- }
- }
-
-- spin_lock_bh(&odev->xmit_lock);
-+ netif_tx_lock_bh(odev);
- if (!netif_queue_stopped(odev)) {
-
- atomic_inc(&(pkt_dev->skb->users));
-@@ -2942,7 +2942,7 @@
- pkt_dev->next_tx_ns = 0;
- }
-
-- spin_unlock_bh(&odev->xmit_lock);
-+ netif_tx_unlock_bh(odev);
-
- /* If pkt_dev->count is zero, then run forever */
- if ((pkt_dev->count != 0) && (pkt_dev->sofar >= pkt_dev->count)) {
-Index: tmp-linux-2.6.17/net/core/skbuff.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/core/skbuff.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/core/skbuff.c 2007-01-08 16:48:05.000000000 +0000
-@@ -172,9 +172,9 @@
- shinfo = skb_shinfo(skb);
- atomic_set(&shinfo->dataref, 1);
- shinfo->nr_frags = 0;
-- shinfo->tso_size = 0;
-- shinfo->tso_segs = 0;
-- shinfo->ufo_size = 0;
-+ shinfo->gso_size = 0;
-+ shinfo->gso_segs = 0;
-+ shinfo->gso_type = 0;
- shinfo->ip6_frag_id = 0;
- shinfo->frag_list = NULL;
-
-@@ -238,8 +238,9 @@
-
- atomic_set(&(skb_shinfo(skb)->dataref), 1);
- skb_shinfo(skb)->nr_frags = 0;
-- skb_shinfo(skb)->tso_size = 0;
-- skb_shinfo(skb)->tso_segs = 0;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 0;
-+ skb_shinfo(skb)->gso_type = 0;
- skb_shinfo(skb)->frag_list = NULL;
- out:
- return skb;
-@@ -527,8 +528,9 @@
- new->tc_index = old->tc_index;
- #endif
- atomic_set(&new->users, 1);
-- skb_shinfo(new)->tso_size = skb_shinfo(old)->tso_size;
-- skb_shinfo(new)->tso_segs = skb_shinfo(old)->tso_segs;
-+ skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size;
-+ skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
-+ skb_shinfo(new)->gso_type = skb_shinfo(old)->gso_type;
- }
-
- /**
-@@ -1826,6 +1828,133 @@
-
- EXPORT_SYMBOL_GPL(skb_pull_rcsum);
-
-+/**
-+ * skb_segment - Perform protocol segmentation on skb.
-+ * @skb: buffer to segment
-+ * @features: features for the output path (see dev->features)
-+ *
-+ * This function performs segmentation on the given skb. It returns
-+ * the segment at the given position. It returns NULL if there are
-+ * no more segments to generate, or when an error is encountered.
-+ */
-+struct sk_buff *skb_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = NULL;
-+ struct sk_buff *tail = NULL;
-+ unsigned int mss = skb_shinfo(skb)->gso_size;
-+ unsigned int doffset = skb->data - skb->mac.raw;
-+ unsigned int offset = doffset;
-+ unsigned int headroom;
-+ unsigned int len;
-+ int sg = features & NETIF_F_SG;
-+ int nfrags = skb_shinfo(skb)->nr_frags;
-+ int err = -ENOMEM;
-+ int i = 0;
-+ int pos;
-+
-+ __skb_push(skb, doffset);
-+ headroom = skb_headroom(skb);
-+ pos = skb_headlen(skb);
-+
-+ do {
-+ struct sk_buff *nskb;
-+ skb_frag_t *frag;
-+ int hsize, nsize;
-+ int k;
-+ int size;
-+
-+ len = skb->len - offset;
-+ if (len > mss)
-+ len = mss;
-+
-+ hsize = skb_headlen(skb) - offset;
-+ if (hsize < 0)
-+ hsize = 0;
-+ nsize = hsize + doffset;
-+ if (nsize > len + doffset || !sg)
-+ nsize = len + doffset;
-+
-+ nskb = alloc_skb(nsize + headroom, GFP_ATOMIC);
-+ if (unlikely(!nskb))
-+ goto err;
-+
-+ if (segs)
-+ tail->next = nskb;
-+ else
-+ segs = nskb;
-+ tail = nskb;
-+
-+ nskb->dev = skb->dev;
-+ nskb->priority = skb->priority;
-+ nskb->protocol = skb->protocol;
-+ nskb->dst = dst_clone(skb->dst);
-+ memcpy(nskb->cb, skb->cb, sizeof(skb->cb));
-+ nskb->pkt_type = skb->pkt_type;
-+ nskb->mac_len = skb->mac_len;
-+
-+ skb_reserve(nskb, headroom);
-+ nskb->mac.raw = nskb->data;
-+ nskb->nh.raw = nskb->data + skb->mac_len;
-+ nskb->h.raw = nskb->nh.raw + (skb->h.raw - skb->nh.raw);
-+ memcpy(skb_put(nskb, doffset), skb->data, doffset);
-+
-+ if (!sg) {
-+ nskb->csum = skb_copy_and_csum_bits(skb, offset,
-+ skb_put(nskb, len),
-+ len, 0);
-+ continue;
-+ }
-+
-+ frag = skb_shinfo(nskb)->frags;
-+ k = 0;
-+
-+ nskb->ip_summed = CHECKSUM_HW;
-+ nskb->csum = skb->csum;
-+ memcpy(skb_put(nskb, hsize), skb->data + offset, hsize);
-+
-+ while (pos < offset + len) {
-+ BUG_ON(i >= nfrags);
-+
-+ *frag = skb_shinfo(skb)->frags[i];
-+ get_page(frag->page);
-+ size = frag->size;
-+
-+ if (pos < offset) {
-+ frag->page_offset += offset - pos;
-+ frag->size -= offset - pos;
-+ }
-+
-+ k++;
-+
-+ if (pos + size <= offset + len) {
-+ i++;
-+ pos += size;
-+ } else {
-+ frag->size -= pos + size - (offset + len);
-+ break;
-+ }
-+
-+ frag++;
-+ }
-+
-+ skb_shinfo(nskb)->nr_frags = k;
-+ nskb->data_len = len - hsize;
-+ nskb->len += nskb->data_len;
-+ nskb->truesize += nskb->data_len;
-+ } while ((offset += len) < skb->len);
-+
-+ return segs;
-+
-+err:
-+ while ((skb = segs)) {
-+ segs = skb->next;
-+ kfree(skb);
-+ }
-+ return ERR_PTR(err);
-+}
-+
-+EXPORT_SYMBOL_GPL(skb_segment);
-+
- void __init skb_init(void)
- {
- skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
-Index: tmp-linux-2.6.17/net/decnet/dn_nsp_in.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/decnet/dn_nsp_in.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/decnet/dn_nsp_in.c 2007-01-08 16:48:05.000000000 +0000
-@@ -801,8 +801,7 @@
- * We linearize everything except data segments here.
- */
- if (cb->nsp_flags & ~0x60) {
-- if (unlikely(skb_is_nonlinear(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0)
-+ if (unlikely(skb_linearize(skb)))
- goto free_out;
- }
-
-Index: tmp-linux-2.6.17/net/decnet/dn_route.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/decnet/dn_route.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/decnet/dn_route.c 2007-01-08 16:48:05.000000000 +0000
-@@ -629,8 +629,7 @@
- padlen);
-
- if (flags & DN_RT_PKT_CNTL) {
-- if (unlikely(skb_is_nonlinear(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0)
-+ if (unlikely(skb_linearize(skb)))
- goto dump_it;
-
- switch(flags & DN_RT_CNTL_MSK) {
-Index: tmp-linux-2.6.17/net/ipv4/af_inet.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/af_inet.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/af_inet.c 2007-01-08 16:48:05.000000000 +0000
-@@ -68,6 +68,7 @@
- */
-
- #include <linux/config.h>
-+#include <linux/err.h>
- #include <linux/errno.h>
- #include <linux/types.h>
- #include <linux/socket.h>
-@@ -1096,6 +1097,54 @@
-
- EXPORT_SYMBOL(inet_sk_rebuild_header);
-
-+static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EINVAL);
-+ struct iphdr *iph;
-+ struct net_protocol *ops;
-+ int proto;
-+ int ihl;
-+ int id;
-+
-+ if (!pskb_may_pull(skb, sizeof(*iph)))
-+ goto out;
-+
-+ iph = skb->nh.iph;
-+ ihl = iph->ihl * 4;
-+ if (ihl < sizeof(*iph))
-+ goto out;
-+
-+ if (!pskb_may_pull(skb, ihl))
-+ goto out;
-+
-+ skb->h.raw = __skb_pull(skb, ihl);
-+ iph = skb->nh.iph;
-+ id = ntohs(iph->id);
-+ proto = iph->protocol & (MAX_INET_PROTOS - 1);
-+ segs = ERR_PTR(-EPROTONOSUPPORT);
-+
-+ rcu_read_lock();
-+ ops = rcu_dereference(inet_protos[proto]);
-+ if (ops && ops->gso_segment)
-+ segs = ops->gso_segment(skb, features);
-+ rcu_read_unlock();
-+
-+ if (!segs || unlikely(IS_ERR(segs)))
-+ goto out;
-+
-+ skb = segs;
-+ do {
-+ iph = skb->nh.iph;
-+ iph->id = htons(id++);
-+ iph->tot_len = htons(skb->len - skb->mac_len);
-+ iph->check = 0;
-+ iph->check = ip_fast_csum(skb->nh.raw, iph->ihl);
-+ } while ((skb = skb->next));
-+
-+out:
-+ return segs;
-+}
-+
- #ifdef CONFIG_IP_MULTICAST
- static struct net_protocol igmp_protocol = {
- .handler = igmp_rcv,
-@@ -1105,6 +1154,7 @@
- static struct net_protocol tcp_protocol = {
- .handler = tcp_v4_rcv,
- .err_handler = tcp_v4_err,
-+ .gso_segment = tcp_tso_segment,
- .no_policy = 1,
- };
-
-@@ -1150,6 +1200,7 @@
- static struct packet_type ip_packet_type = {
- .type = __constant_htons(ETH_P_IP),
- .func = ip_rcv,
-+ .gso_segment = inet_gso_segment,
- };
-
- static int __init inet_init(void)
-Index: tmp-linux-2.6.17/net/ipv4/ip_output.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/ip_output.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/ip_output.c 2007-01-08 16:48:05.000000000 +0000
-@@ -210,8 +210,7 @@
- return dst_output(skb);
- }
- #endif
-- if (skb->len > dst_mtu(skb->dst) &&
-- !(skb_shinfo(skb)->ufo_size || skb_shinfo(skb)->tso_size))
-+ if (skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size)
- return ip_fragment(skb, ip_finish_output2);
- else
- return ip_finish_output2(skb);
-@@ -362,7 +361,7 @@
- }
-
- ip_select_ident_more(iph, &rt->u.dst, sk,
-- (skb_shinfo(skb)->tso_segs ?: 1) - 1);
-+ (skb_shinfo(skb)->gso_segs ?: 1) - 1);
-
- /* Add an IP checksum. */
- ip_send_check(iph);
-@@ -743,7 +742,8 @@
- (length - transhdrlen));
- if (!err) {
- /* specify the length of each IP datagram fragment*/
-- skb_shinfo(skb)->ufo_size = (mtu - fragheaderlen);
-+ skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
-+ skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4;
- __skb_queue_tail(&sk->sk_write_queue, skb);
-
- return 0;
-@@ -839,7 +839,7 @@
- */
- if (transhdrlen &&
- length + fragheaderlen <= mtu &&
-- rt->u.dst.dev->features&(NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM) &&
-+ rt->u.dst.dev->features & NETIF_F_ALL_CSUM &&
- !exthdrlen)
- csummode = CHECKSUM_HW;
-
-@@ -1086,14 +1086,16 @@
-
- inet->cork.length += size;
- if ((sk->sk_protocol == IPPROTO_UDP) &&
-- (rt->u.dst.dev->features & NETIF_F_UFO))
-- skb_shinfo(skb)->ufo_size = (mtu - fragheaderlen);
-+ (rt->u.dst.dev->features & NETIF_F_UFO)) {
-+ skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
-+ skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4;
-+ }
-
-
- while (size > 0) {
- int i;
-
-- if (skb_shinfo(skb)->ufo_size)
-+ if (skb_shinfo(skb)->gso_size)
- len = size;
- else {
-
-Index: tmp-linux-2.6.17/net/ipv4/ipcomp.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/ipcomp.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/ipcomp.c 2007-01-08 16:48:05.000000000 +0000
-@@ -84,7 +84,7 @@
- static int ipcomp_input(struct xfrm_state *x, struct sk_buff *skb)
- {
- u8 nexthdr;
-- int err = 0;
-+ int err = -ENOMEM;
- struct iphdr *iph;
- union {
- struct iphdr iph;
-@@ -92,11 +92,8 @@
- } tmp_iph;
-
-
-- if ((skb_is_nonlinear(skb) || skb_cloned(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0) {
-- err = -ENOMEM;
-+ if (skb_linearize_cow(skb))
- goto out;
-- }
-
- skb->ip_summed = CHECKSUM_NONE;
-
-@@ -171,10 +168,8 @@
- goto out_ok;
- }
-
-- if ((skb_is_nonlinear(skb) || skb_cloned(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0) {
-+ if (skb_linearize_cow(skb))
- goto out_ok;
-- }
-
- err = ipcomp_compress(x, skb);
- iph = skb->nh.iph;
-Index: tmp-linux-2.6.17/net/ipv4/tcp.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/tcp.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/tcp.c 2007-01-08 16:48:05.000000000 +0000
-@@ -258,6 +258,7 @@
- #include <linux/random.h>
- #include <linux/bootmem.h>
- #include <linux/cache.h>
-+#include <linux/err.h>
-
- #include <net/icmp.h>
- #include <net/tcp.h>
-@@ -571,7 +572,7 @@
- skb->ip_summed = CHECKSUM_HW;
- tp->write_seq += copy;
- TCP_SKB_CB(skb)->end_seq += copy;
-- skb_shinfo(skb)->tso_segs = 0;
-+ skb_shinfo(skb)->gso_segs = 0;
-
- if (!copied)
- TCP_SKB_CB(skb)->flags &= ~TCPCB_FLAG_PSH;
-@@ -622,14 +623,10 @@
- ssize_t res;
- struct sock *sk = sock->sk;
-
--#define TCP_ZC_CSUM_FLAGS (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
--
- if (!(sk->sk_route_caps & NETIF_F_SG) ||
-- !(sk->sk_route_caps & TCP_ZC_CSUM_FLAGS))
-+ !(sk->sk_route_caps & NETIF_F_ALL_CSUM))
- return sock_no_sendpage(sock, page, offset, size, flags);
-
--#undef TCP_ZC_CSUM_FLAGS
--
- lock_sock(sk);
- TCP_CHECK_TIMER(sk);
- res = do_tcp_sendpages(sk, &page, offset, size, flags);
-@@ -726,9 +723,7 @@
- /*
- * Check whether we can use HW checksum.
- */
-- if (sk->sk_route_caps &
-- (NETIF_F_IP_CSUM | NETIF_F_NO_CSUM |
-- NETIF_F_HW_CSUM))
-+ if (sk->sk_route_caps & NETIF_F_ALL_CSUM)
- skb->ip_summed = CHECKSUM_HW;
-
- skb_entail(sk, tp, skb);
-@@ -824,7 +819,7 @@
-
- tp->write_seq += copy;
- TCP_SKB_CB(skb)->end_seq += copy;
-- skb_shinfo(skb)->tso_segs = 0;
-+ skb_shinfo(skb)->gso_segs = 0;
-
- from += copy;
- copied += copy;
-@@ -2071,6 +2066,71 @@
- EXPORT_SYMBOL(compat_tcp_getsockopt);
- #endif
-
-+struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
-+{
-+ struct sk_buff *segs = ERR_PTR(-EINVAL);
-+ struct tcphdr *th;
-+ unsigned thlen;
-+ unsigned int seq;
-+ unsigned int delta;
-+ unsigned int oldlen;
-+ unsigned int len;
-+
-+ if (!pskb_may_pull(skb, sizeof(*th)))
-+ goto out;
-+
-+ th = skb->h.th;
-+ thlen = th->doff * 4;
-+ if (thlen < sizeof(*th))
-+ goto out;
-+
-+ if (!pskb_may_pull(skb, thlen))
-+ goto out;
-+
-+ segs = NULL;
-+ if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
-+ goto out;
-+
-+ oldlen = (u16)~skb->len;
-+ __skb_pull(skb, thlen);
-+
-+ segs = skb_segment(skb, features);
-+ if (IS_ERR(segs))
-+ goto out;
-+
-+ len = skb_shinfo(skb)->gso_size;
-+ delta = htonl(oldlen + (thlen + len));
-+
-+ skb = segs;
-+ th = skb->h.th;
-+ seq = ntohl(th->seq);
-+
-+ do {
-+ th->fin = th->psh = 0;
-+
-+ th->check = ~csum_fold(th->check + delta);
-+ if (skb->ip_summed != CHECKSUM_HW)
-+ th->check = csum_fold(csum_partial(skb->h.raw, thlen,
-+ skb->csum));
-+
-+ seq += len;
-+ skb = skb->next;
-+ th = skb->h.th;
-+
-+ th->seq = htonl(seq);
-+ th->cwr = 0;
-+ } while (skb->next);
-+
-+ delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
-+ th->check = ~csum_fold(th->check + delta);
-+ if (skb->ip_summed != CHECKSUM_HW)
-+ th->check = csum_fold(csum_partial(skb->h.raw, thlen,
-+ skb->csum));
-+
-+out:
-+ return segs;
-+}
-+
- extern void __skb_cb_too_small_for_tcp(int, int);
- extern struct tcp_congestion_ops tcp_reno;
-
-Index: tmp-linux-2.6.17/net/ipv4/tcp_input.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/tcp_input.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/tcp_input.c 2007-01-08 16:48:05.000000000 +0000
-@@ -1072,7 +1072,7 @@
- else
- pkt_len = (end_seq -
- TCP_SKB_CB(skb)->seq);
-- if (tcp_fragment(sk, skb, pkt_len, skb_shinfo(skb)->tso_size))
-+ if (tcp_fragment(sk, skb, pkt_len, skb_shinfo(skb)->gso_size))
- break;
- pcount = tcp_skb_pcount(skb);
- }
-Index: tmp-linux-2.6.17/net/ipv4/tcp_output.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/tcp_output.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv4/tcp_output.c 2007-01-08 16:48:05.000000000 +0000
-@@ -511,15 +511,17 @@
- /* Avoid the costly divide in the normal
- * non-TSO case.
- */
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
- } else {
- unsigned int factor;
-
- factor = skb->len + (mss_now - 1);
- factor /= mss_now;
-- skb_shinfo(skb)->tso_segs = factor;
-- skb_shinfo(skb)->tso_size = mss_now;
-+ skb_shinfo(skb)->gso_segs = factor;
-+ skb_shinfo(skb)->gso_size = mss_now;
-+ skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4;
- }
- }
-
-@@ -910,7 +912,7 @@
-
- if (!tso_segs ||
- (tso_segs > 1 &&
-- skb_shinfo(skb)->tso_size != mss_now)) {
-+ tcp_skb_mss(skb) != mss_now)) {
- tcp_set_skb_tso_segs(sk, skb, mss_now);
- tso_segs = tcp_skb_pcount(skb);
- }
-@@ -1720,8 +1722,9 @@
- tp->snd_una == (TCP_SKB_CB(skb)->end_seq - 1)) {
- if (!pskb_trim(skb, 0)) {
- TCP_SKB_CB(skb)->seq = TCP_SKB_CB(skb)->end_seq - 1;
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
- skb->ip_summed = CHECKSUM_NONE;
- skb->csum = 0;
- }
-@@ -1926,8 +1929,9 @@
- skb->csum = 0;
- TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_FIN);
- TCP_SKB_CB(skb)->sacked = 0;
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
-
- /* FIN eats a sequence byte, write_seq advanced by tcp_queue_skb(). */
- TCP_SKB_CB(skb)->seq = tp->write_seq;
-@@ -1959,8 +1963,9 @@
- skb->csum = 0;
- TCP_SKB_CB(skb)->flags = (TCPCB_FLAG_ACK | TCPCB_FLAG_RST);
- TCP_SKB_CB(skb)->sacked = 0;
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
-
- /* Send it off. */
- TCP_SKB_CB(skb)->seq = tcp_acceptable_seq(sk, tp);
-@@ -2043,8 +2048,9 @@
- TCP_SKB_CB(skb)->seq = tcp_rsk(req)->snt_isn;
- TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(skb)->seq + 1;
- TCP_SKB_CB(skb)->sacked = 0;
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
- th->seq = htonl(TCP_SKB_CB(skb)->seq);
- th->ack_seq = htonl(tcp_rsk(req)->rcv_isn + 1);
- if (req->rcv_wnd == 0) { /* ignored for retransmitted syns */
-@@ -2148,8 +2154,9 @@
- TCP_SKB_CB(buff)->flags = TCPCB_FLAG_SYN;
- TCP_ECN_send_syn(sk, tp, buff);
- TCP_SKB_CB(buff)->sacked = 0;
-- skb_shinfo(buff)->tso_segs = 1;
-- skb_shinfo(buff)->tso_size = 0;
-+ skb_shinfo(buff)->gso_segs = 1;
-+ skb_shinfo(buff)->gso_size = 0;
-+ skb_shinfo(buff)->gso_type = 0;
- buff->csum = 0;
- TCP_SKB_CB(buff)->seq = tp->write_seq++;
- TCP_SKB_CB(buff)->end_seq = tp->write_seq;
-@@ -2253,8 +2260,9 @@
- buff->csum = 0;
- TCP_SKB_CB(buff)->flags = TCPCB_FLAG_ACK;
- TCP_SKB_CB(buff)->sacked = 0;
-- skb_shinfo(buff)->tso_segs = 1;
-- skb_shinfo(buff)->tso_size = 0;
-+ skb_shinfo(buff)->gso_segs = 1;
-+ skb_shinfo(buff)->gso_size = 0;
-+ skb_shinfo(buff)->gso_type = 0;
-
- /* Send it off, this clears delayed acks for us. */
- TCP_SKB_CB(buff)->seq = TCP_SKB_CB(buff)->end_seq = tcp_acceptable_seq(sk, tp);
-@@ -2289,8 +2297,9 @@
- skb->csum = 0;
- TCP_SKB_CB(skb)->flags = TCPCB_FLAG_ACK;
- TCP_SKB_CB(skb)->sacked = urgent;
-- skb_shinfo(skb)->tso_segs = 1;
-- skb_shinfo(skb)->tso_size = 0;
-+ skb_shinfo(skb)->gso_segs = 1;
-+ skb_shinfo(skb)->gso_size = 0;
-+ skb_shinfo(skb)->gso_type = 0;
-
- /* Use a previous sequence. This should cause the other
- * end to send an ack. Don't queue or clone SKB, just
-Index: tmp-linux-2.6.17/net/ipv4/xfrm4_output.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv4/xfrm4_output.c 2007-01-08 16:48:05.000000000 +0000
-+++ tmp-linux-2.6.17/net/ipv4/xfrm4_output.c 2007-01-08 16:48:05.000000000 +0000
-@@ -9,6 +9,8 @@
- */
-
- #include <linux/compiler.h>
-+#include <linux/if_ether.h>
-+#include <linux/kernel.h>
- #include <linux/skbuff.h>
- #include <linux/spinlock.h>
- #include <linux/netfilter_ipv4.h>
-@@ -158,16 +160,10 @@
- goto out_exit;
- }
-
--static int xfrm4_output_finish(struct sk_buff *skb)
-+static int xfrm4_output_finish2(struct sk_buff *skb)
- {
- int err;
-
--#ifdef CONFIG_NETFILTER
-- if (!skb->dst->xfrm) {
-- IPCB(skb)->flags |= IPSKB_REROUTED;
-- return dst_output(skb);
-- }
--#endif
- while (likely((err = xfrm4_output_one(skb)) == 0)) {
- nf_reset(skb);
-
-@@ -180,7 +176,7 @@
- return dst_output(skb);
-
- err = nf_hook(PF_INET, NF_IP_POST_ROUTING, &skb, NULL,
-- skb->dst->dev, xfrm4_output_finish);
-+ skb->dst->dev, xfrm4_output_finish2);
- if (unlikely(err != 1))
- break;
- }
-@@ -188,6 +184,48 @@
- return err;
- }
-
-+static int xfrm4_output_finish(struct sk_buff *skb)
-+{
-+ struct sk_buff *segs;
-+
-+#ifdef CONFIG_NETFILTER
-+ if (!skb->dst->xfrm) {
-+ IPCB(skb)->flags |= IPSKB_REROUTED;
-+ return dst_output(skb);
-+ }
-+#endif
-+
-+ if (!skb_shinfo(skb)->gso_size)
-+ return xfrm4_output_finish2(skb);
-+
-+ skb->protocol = htons(ETH_P_IP);
-+ segs = skb_gso_segment(skb, 0);
-+ kfree_skb(skb);
-+ if (unlikely(IS_ERR(segs)))
-+ return PTR_ERR(segs);
-+
-+ do {
-+ struct sk_buff *nskb = segs->next;
-+ int err;
-+
-+ segs->next = NULL;
-+ err = xfrm4_output_finish2(segs);
-+
-+ if (unlikely(err)) {
-+ while ((segs = nskb)) {
-+ nskb = segs->next;
-+ segs->next = NULL;
-+ kfree_skb(segs);
-+ }
-+ return err;
-+ }
-+
-+ segs = nskb;
-+ } while (segs);
-+
-+ return 0;
-+}
-+
- int xfrm4_output(struct sk_buff *skb)
- {
- return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, skb->dst->dev,
-Index: tmp-linux-2.6.17/net/ipv6/ip6_output.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv6/ip6_output.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv6/ip6_output.c 2007-01-08 16:48:05.000000000 +0000
-@@ -147,7 +147,7 @@
-
- int ip6_output(struct sk_buff *skb)
- {
-- if ((skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->ufo_size) ||
-+ if ((skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size) ||
- dst_allfrag(skb->dst))
- return ip6_fragment(skb, ip6_output2);
- else
-@@ -830,8 +830,9 @@
- struct frag_hdr fhdr;
-
- /* specify the length of each IP datagram fragment*/
-- skb_shinfo(skb)->ufo_size = (mtu - fragheaderlen) -
-- sizeof(struct frag_hdr);
-+ skb_shinfo(skb)->gso_size = mtu - fragheaderlen -
-+ sizeof(struct frag_hdr);
-+ skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4;
- ipv6_select_ident(skb, &fhdr);
- skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
- __skb_queue_tail(&sk->sk_write_queue, skb);
-Index: tmp-linux-2.6.17/net/ipv6/ipcomp6.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv6/ipcomp6.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv6/ipcomp6.c 2007-01-08 16:48:05.000000000 +0000
-@@ -65,7 +65,7 @@
-
- static int ipcomp6_input(struct xfrm_state *x, struct sk_buff *skb)
- {
-- int err = 0;
-+ int err = -ENOMEM;
- u8 nexthdr = 0;
- int hdr_len = skb->h.raw - skb->nh.raw;
- unsigned char *tmp_hdr = NULL;
-@@ -76,11 +76,8 @@
- struct crypto_tfm *tfm;
- int cpu;
-
-- if ((skb_is_nonlinear(skb) || skb_cloned(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0) {
-- err = -ENOMEM;
-+ if (skb_linearize_cow(skb))
- goto out;
-- }
-
- skb->ip_summed = CHECKSUM_NONE;
-
-@@ -159,10 +156,8 @@
- goto out_ok;
- }
-
-- if ((skb_is_nonlinear(skb) || skb_cloned(skb)) &&
-- skb_linearize(skb, GFP_ATOMIC) != 0) {
-+ if (skb_linearize_cow(skb))
- goto out_ok;
-- }
-
- /* compression */
- plen = skb->len - hdr_len;
-Index: tmp-linux-2.6.17/net/ipv6/xfrm6_output.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/ipv6/xfrm6_output.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/ipv6/xfrm6_output.c 2007-01-08 16:48:05.000000000 +0000
-@@ -151,7 +151,7 @@
- goto out_exit;
- }
-
--static int xfrm6_output_finish(struct sk_buff *skb)
-+static int xfrm6_output_finish2(struct sk_buff *skb)
- {
- int err;
-
-@@ -167,7 +167,7 @@
- return dst_output(skb);
-
- err = nf_hook(PF_INET6, NF_IP6_POST_ROUTING, &skb, NULL,
-- skb->dst->dev, xfrm6_output_finish);
-+ skb->dst->dev, xfrm6_output_finish2);
- if (unlikely(err != 1))
- break;
- }
-@@ -175,6 +175,41 @@
- return err;
- }
-
-+static int xfrm6_output_finish(struct sk_buff *skb)
-+{
-+ struct sk_buff *segs;
-+
-+ if (!skb_shinfo(skb)->gso_size)
-+ return xfrm6_output_finish2(skb);
-+
-+ skb->protocol = htons(ETH_P_IP);
-+ segs = skb_gso_segment(skb, 0);
-+ kfree_skb(skb);
-+ if (unlikely(IS_ERR(segs)))
-+ return PTR_ERR(segs);
-+
-+ do {
-+ struct sk_buff *nskb = segs->next;
-+ int err;
-+
-+ segs->next = NULL;
-+ err = xfrm6_output_finish2(segs);
-+
-+ if (unlikely(err)) {
-+ while ((segs = nskb)) {
-+ nskb = segs->next;
-+ segs->next = NULL;
-+ kfree_skb(segs);
-+ }
-+ return err;
-+ }
-+
-+ segs = nskb;
-+ } while (segs);
-+
-+ return 0;
-+}
-+
- int xfrm6_output(struct sk_buff *skb)
- {
- return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb, NULL, skb->dst->dev,
-Index: tmp-linux-2.6.17/net/sched/sch_generic.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/sched/sch_generic.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/sched/sch_generic.c 2007-01-08 16:48:05.000000000 +0000
-@@ -72,9 +72,9 @@
- dev->queue_lock serializes queue accesses for this device
- AND dev->qdisc pointer itself.
-
-- dev->xmit_lock serializes accesses to device driver.
-+ netif_tx_lock serializes accesses to device driver.
-
-- dev->queue_lock and dev->xmit_lock are mutually exclusive,
-+ dev->queue_lock and netif_tx_lock are mutually exclusive,
- if one is grabbed, another must be free.
- */
-
-@@ -90,14 +90,17 @@
- NOTE: Called under dev->queue_lock with locally disabled BH.
- */
-
--int qdisc_restart(struct net_device *dev)
-+static inline int qdisc_restart(struct net_device *dev)
- {
- struct Qdisc *q = dev->qdisc;
- struct sk_buff *skb;
-
- /* Dequeue packet */
-- if ((skb = q->dequeue(q)) != NULL) {
-+ if (((skb = dev->gso_skb)) || ((skb = q->dequeue(q)))) {
- unsigned nolock = (dev->features & NETIF_F_LLTX);
-+
-+ dev->gso_skb = NULL;
-+
- /*
- * When the driver has LLTX set it does its own locking
- * in start_xmit. No need to add additional overhead by
-@@ -108,7 +111,7 @@
- * will be requeued.
- */
- if (!nolock) {
-- if (!spin_trylock(&dev->xmit_lock)) {
-+ if (!netif_tx_trylock(dev)) {
- collision:
- /* So, someone grabbed the driver. */
-
-@@ -126,8 +129,6 @@
- __get_cpu_var(netdev_rx_stat).cpu_collision++;
- goto requeue;
- }
-- /* Remember that the driver is grabbed by us. */
-- dev->xmit_lock_owner = smp_processor_id();
- }
-
- {
-@@ -136,14 +137,11 @@
-
- if (!netif_queue_stopped(dev)) {
- int ret;
-- if (netdev_nit)
-- dev_queue_xmit_nit(skb, dev);
-
-- ret = dev->hard_start_xmit(skb, dev);
-+ ret = dev_hard_start_xmit(skb, dev);
- if (ret == NETDEV_TX_OK) {
- if (!nolock) {
-- dev->xmit_lock_owner = -1;
-- spin_unlock(&dev->xmit_lock);
-+ netif_tx_unlock(dev);
- }
- spin_lock(&dev->queue_lock);
- return -1;
-@@ -157,8 +155,7 @@
- /* NETDEV_TX_BUSY - we need to requeue */
- /* Release the driver */
- if (!nolock) {
-- dev->xmit_lock_owner = -1;
-- spin_unlock(&dev->xmit_lock);
-+ netif_tx_unlock(dev);
- }
- spin_lock(&dev->queue_lock);
- q = dev->qdisc;
-@@ -175,7 +172,10 @@
- */
-
- requeue:
-- q->ops->requeue(skb, q);
-+ if (skb->next)
-+ dev->gso_skb = skb;
-+ else
-+ q->ops->requeue(skb, q);
- netif_schedule(dev);
- return 1;
- }
-@@ -183,11 +183,23 @@
- return q->q.qlen;
- }
-
-+void __qdisc_run(struct net_device *dev)
-+{
-+ if (unlikely(dev->qdisc == &noop_qdisc))
-+ goto out;
-+
-+ while (qdisc_restart(dev) < 0 && !netif_queue_stopped(dev))
-+ /* NOTHING */;
-+
-+out:
-+ clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
-+}
-+
- static void dev_watchdog(unsigned long arg)
- {
- struct net_device *dev = (struct net_device *)arg;
-
-- spin_lock(&dev->xmit_lock);
-+ netif_tx_lock(dev);
- if (dev->qdisc != &noop_qdisc) {
- if (netif_device_present(dev) &&
- netif_running(dev) &&
-@@ -203,7 +215,7 @@
- dev_hold(dev);
- }
- }
-- spin_unlock(&dev->xmit_lock);
-+ netif_tx_unlock(dev);
-
- dev_put(dev);
- }
-@@ -227,17 +239,17 @@
-
- static void dev_watchdog_up(struct net_device *dev)
- {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- __netdev_watchdog_up(dev);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- }
-
- static void dev_watchdog_down(struct net_device *dev)
- {
-- spin_lock_bh(&dev->xmit_lock);
-+ netif_tx_lock_bh(dev);
- if (del_timer(&dev->watchdog_timer))
- dev_put(dev);
-- spin_unlock_bh(&dev->xmit_lock);
-+ netif_tx_unlock_bh(dev);
- }
-
- void netif_carrier_on(struct net_device *dev)
-@@ -579,10 +591,17 @@
-
- dev_watchdog_down(dev);
-
-- while (test_bit(__LINK_STATE_SCHED, &dev->state))
-+ /* Wait for outstanding dev_queue_xmit calls. */
-+ synchronize_rcu();
-+
-+ /* Wait for outstanding qdisc_run calls. */
-+ while (test_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
- yield();
-
-- spin_unlock_wait(&dev->xmit_lock);
-+ if (dev->gso_skb) {
-+ kfree_skb(dev->gso_skb);
-+ dev->gso_skb = NULL;
-+ }
- }
-
- void dev_init_scheduler(struct net_device *dev)
-@@ -624,6 +643,5 @@
- EXPORT_SYMBOL(qdisc_alloc);
- EXPORT_SYMBOL(qdisc_destroy);
- EXPORT_SYMBOL(qdisc_reset);
--EXPORT_SYMBOL(qdisc_restart);
- EXPORT_SYMBOL(qdisc_lock_tree);
- EXPORT_SYMBOL(qdisc_unlock_tree);
-Index: tmp-linux-2.6.17/net/sched/sch_teql.c
-===================================================================
---- tmp-linux-2.6.17.orig/net/sched/sch_teql.c 2006-06-18 02:49:35.000000000 +0100
-+++ tmp-linux-2.6.17/net/sched/sch_teql.c 2007-01-08 16:48:05.000000000 +0000
-@@ -302,20 +302,17 @@
-
- switch (teql_resolve(skb, skb_res, slave)) {
- case 0:
-- if (spin_trylock(&slave->xmit_lock)) {
-- slave->xmit_lock_owner = smp_processor_id();
-+ if (netif_tx_trylock(slave)) {
- if (!netif_queue_stopped(slave) &&
- slave->hard_start_xmit(skb, slave) == 0) {
-- slave->xmit_lock_owner = -1;
-- spin_unlock(&slave->xmit_lock);
-+ netif_tx_unlock(slave);
- master->slaves = NEXT_SLAVE(q);
- netif_wake_queue(dev);
- master->stats.tx_packets++;
- master->stats.tx_bytes += len;
- return 0;
- }
-- slave->xmit_lock_owner = -1;
-- spin_unlock(&slave->xmit_lock);
-+ netif_tx_unlock(slave);
- }
- if (netif_queue_stopped(dev))
- busy = 1;
diff --git a/patches/linux-2.6.17/net-gso-1-check-dodgy.patch b/patches/linux-2.6.17/net-gso-1-check-dodgy.patch
deleted file mode 100644
index 21ccb5987b..0000000000
--- a/patches/linux-2.6.17/net-gso-1-check-dodgy.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp.c ./net/ipv4/tcp.c
---- ../orig-linux-2.6.17/net/ipv4/tcp.c 2007-01-08 15:21:15.000000000 +0000
-+++ ./net/ipv4/tcp.c 2007-01-08 15:24:49.000000000 +0000
-@@ -2087,13 +2087,19 @@ struct sk_buff *tcp_tso_segment(struct s
- if (!pskb_may_pull(skb, thlen))
- goto out;
-
-- segs = NULL;
-- if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
-- goto out;
--
- oldlen = (u16)~skb->len;
- __skb_pull(skb, thlen);
-
-+ if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
-+ /* Packet is from an untrusted source, reset gso_segs. */
-+ int mss = skb_shinfo(skb)->gso_size;
-+
-+ skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
-+
-+ segs = NULL;
-+ goto out;
-+ }
-+
- segs = skb_segment(skb, features);
- if (IS_ERR(segs))
- goto out;
diff --git a/patches/linux-2.6.17/net-gso-2-checksum-fix.patch b/patches/linux-2.6.17/net-gso-2-checksum-fix.patch
deleted file mode 100644
index db228e1546..0000000000
--- a/patches/linux-2.6.17/net-gso-2-checksum-fix.patch
+++ /dev/null
@@ -1,459 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/drivers/net/bnx2.c ./drivers/net/bnx2.c
---- ../orig-linux-2.6.17/drivers/net/bnx2.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/bnx2.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1638,7 +1638,7 @@ bnx2_tx_int(struct bnx2 *bp)
- skb = tx_buf->skb;
- #ifdef BCM_TSO
- /* partial BD completions possible with TSO packets */
-- if (skb_shinfo(skb)->gso_size) {
-+ if (skb_is_gso(skb)) {
- u16 last_idx, last_ring_idx;
-
- last_idx = sw_cons +
-diff -pruN ../orig-linux-2.6.17/drivers/net/chelsio/sge.c ./drivers/net/chelsio/sge.c
---- ../orig-linux-2.6.17/drivers/net/chelsio/sge.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/chelsio/sge.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1418,7 +1418,7 @@ int t1_start_xmit(struct sk_buff *skb, s
- struct cpl_tx_pkt *cpl;
-
- #ifdef NETIF_F_TSO
-- if (skb_shinfo(skb)->gso_size) {
-+ if (skb_is_gso(skb)) {
- int eth_type;
- struct cpl_tx_pkt_lso *hdr;
-
-diff -pruN ../orig-linux-2.6.17/drivers/net/e1000/e1000_main.c ./drivers/net/e1000/e1000_main.c
---- ../orig-linux-2.6.17/drivers/net/e1000/e1000_main.c 2007-01-08 15:22:36.000000000 +0000
-+++ ./drivers/net/e1000/e1000_main.c 2007-01-08 15:26:24.000000000 +0000
-@@ -2413,7 +2413,7 @@ e1000_tso(struct e1000_adapter *adapter,
- uint8_t ipcss, ipcso, tucss, tucso, hdr_len;
- int err;
-
-- if (skb_shinfo(skb)->gso_size) {
-+ if (skb_is_gso(skb)) {
- if (skb_header_cloned(skb)) {
- err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
- if (err)
-@@ -2538,7 +2538,7 @@ e1000_tx_map(struct e1000_adapter *adapt
- * tso gets written back prematurely before the data is fully
- * DMA'd to the controller */
- if (!skb->data_len && tx_ring->last_tx_tso &&
-- !skb_shinfo(skb)->gso_size) {
-+ !skb_is_gso(skb)) {
- tx_ring->last_tx_tso = 0;
- size -= 4;
- }
-@@ -2825,8 +2825,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
-
- #ifdef NETIF_F_TSO
- /* Controller Erratum workaround */
-- if (!skb->data_len && tx_ring->last_tx_tso &&
-- !skb_shinfo(skb)->gso_size)
-+ if (!skb->data_len && tx_ring->last_tx_tso && !skb_is_gso(skb))
- count++;
- #endif
-
-diff -pruN ../orig-linux-2.6.17/drivers/net/forcedeth.c ./drivers/net/forcedeth.c
---- ../orig-linux-2.6.17/drivers/net/forcedeth.c 2007-01-08 15:23:05.000000000 +0000
-+++ ./drivers/net/forcedeth.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1303,7 +1303,7 @@ static int nv_start_xmit(struct sk_buff
- np->tx_skbuff[nr] = skb;
-
- #ifdef NETIF_F_TSO
-- if (skb_shinfo(skb)->gso_size)
-+ if (skb_is_gso(skb))
- tx_flags_extra = NV_TX2_TSO | (skb_shinfo(skb)->gso_size << NV_TX2_TSO_SHIFT);
- else
- #endif
-diff -pruN ../orig-linux-2.6.17/drivers/net/ixgb/ixgb_main.c ./drivers/net/ixgb/ixgb_main.c
---- ../orig-linux-2.6.17/drivers/net/ixgb/ixgb_main.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/ixgb/ixgb_main.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1168,7 +1168,7 @@ ixgb_tso(struct ixgb_adapter *adapter, s
- uint16_t ipcse, tucse, mss;
- int err;
-
-- if(likely(skb_shinfo(skb)->gso_size)) {
-+ if (likely(skb_is_gso(skb))) {
- if (skb_header_cloned(skb)) {
- err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC);
- if (err)
-diff -pruN ../orig-linux-2.6.17/drivers/net/loopback.c ./drivers/net/loopback.c
---- ../orig-linux-2.6.17/drivers/net/loopback.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/loopback.c 2007-01-08 15:25:03.000000000 +0000
-@@ -139,7 +139,7 @@ static int loopback_xmit(struct sk_buff
- #endif
-
- #ifdef LOOPBACK_TSO
-- if (skb_shinfo(skb)->gso_size) {
-+ if (skb_is_gso(skb)) {
- BUG_ON(skb->protocol != htons(ETH_P_IP));
- BUG_ON(skb->nh.iph->protocol != IPPROTO_TCP);
-
-diff -pruN ../orig-linux-2.6.17/drivers/net/sky2.c ./drivers/net/sky2.c
---- ../orig-linux-2.6.17/drivers/net/sky2.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/sky2.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1160,7 +1160,7 @@ static unsigned tx_le_req(const struct s
- count = sizeof(dma_addr_t) / sizeof(u32);
- count += skb_shinfo(skb)->nr_frags * count;
-
-- if (skb_shinfo(skb)->gso_size)
-+ if (skb_is_gso(skb))
- ++count;
-
- if (skb->ip_summed == CHECKSUM_HW)
-diff -pruN ../orig-linux-2.6.17/drivers/net/typhoon.c ./drivers/net/typhoon.c
---- ../orig-linux-2.6.17/drivers/net/typhoon.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./drivers/net/typhoon.c 2007-01-08 15:25:03.000000000 +0000
-@@ -805,7 +805,7 @@ typhoon_start_tx(struct sk_buff *skb, st
- * If problems develop with TSO, check this first.
- */
- numDesc = skb_shinfo(skb)->nr_frags + 1;
-- if(skb_tso_size(skb))
-+ if (skb_is_gso(skb))
- numDesc++;
-
- /* When checking for free space in the ring, we need to also
-@@ -845,7 +845,7 @@ typhoon_start_tx(struct sk_buff *skb, st
- TYPHOON_TX_PF_VLAN_TAG_SHIFT);
- }
-
-- if(skb_tso_size(skb)) {
-+ if (skb_is_gso(skb)) {
- first_txd->processFlags |= TYPHOON_TX_PF_TCP_SEGMENT;
- first_txd->numDesc++;
-
-diff -pruN ../orig-linux-2.6.17/drivers/s390/net/qeth_main.c ./drivers/s390/net/qeth_main.c
---- ../orig-linux-2.6.17/drivers/s390/net/qeth_main.c 2007-01-08 15:23:29.000000000 +0000
-+++ ./drivers/s390/net/qeth_main.c 2007-01-08 15:26:49.000000000 +0000
-@@ -4417,7 +4417,6 @@ qeth_send_packet(struct qeth_card *card,
- struct qeth_eddp_context *ctx = NULL;
- int tx_bytes = skb->len;
- unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
-- unsigned short gso_size = skb_shinfo(skb)->gso_size;
- int rc;
-
- QETH_DBF_TEXT(trace, 6, "sendpkt");
-@@ -4453,7 +4452,7 @@ qeth_send_packet(struct qeth_card *card,
- queue = card->qdio.out_qs
- [qeth_get_priority_queue(card, skb, ipv, cast_type)];
-
-- if (skb_shinfo(skb)->gso_size)
-+ if (skb_is_gso(skb))
- large_send = card->options.large_send;
-
- /*are we able to do TSO ? If so ,prepare and send it from here */
-@@ -4500,8 +4499,7 @@ qeth_send_packet(struct qeth_card *card,
- card->stats.tx_packets++;
- card->stats.tx_bytes += tx_bytes;
- #ifdef CONFIG_QETH_PERF_STATS
-- if (gso_size &&
-- !(large_send == QETH_LARGE_SEND_NO)) {
-+ if (skb_is_gso(skb) && !(large_send == QETH_LARGE_SEND_NO)) {
- card->perf_stats.large_send_bytes += tx_bytes;
- card->perf_stats.large_send_cnt++;
- }
-diff -pruN ../orig-linux-2.6.17/include/linux/netdevice.h ./include/linux/netdevice.h
---- ../orig-linux-2.6.17/include/linux/netdevice.h 2007-01-08 15:24:25.000000000 +0000
-+++ ./include/linux/netdevice.h 2007-01-08 15:25:03.000000000 +0000
-@@ -546,6 +546,7 @@ struct packet_type {
- struct net_device *);
- struct sk_buff *(*gso_segment)(struct sk_buff *skb,
- int features);
-+ int (*gso_send_check)(struct sk_buff *skb);
- void *af_packet_priv;
- struct list_head list;
- };
-@@ -990,14 +991,15 @@ extern void linkwatch_run_queue(void);
-
- static inline int skb_gso_ok(struct sk_buff *skb, int features)
- {
-- int feature = skb_shinfo(skb)->gso_size ?
-- skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
-+ int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT;
- return (features & feature) == feature;
- }
-
- static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
- {
-- return !skb_gso_ok(skb, dev->features);
-+ return skb_is_gso(skb) &&
-+ (!skb_gso_ok(skb, dev->features) ||
-+ unlikely(skb->ip_summed != CHECKSUM_HW));
- }
-
- #endif /* __KERNEL__ */
-diff -pruN ../orig-linux-2.6.17/include/linux/skbuff.h ./include/linux/skbuff.h
---- ../orig-linux-2.6.17/include/linux/skbuff.h 2007-01-08 15:16:27.000000000 +0000
-+++ ./include/linux/skbuff.h 2007-01-08 15:25:03.000000000 +0000
-@@ -1422,5 +1422,10 @@ static inline void nf_reset(struct sk_bu
- static inline void nf_reset(struct sk_buff *skb) {}
- #endif /* CONFIG_NETFILTER */
-
-+static inline int skb_is_gso(const struct sk_buff *skb)
-+{
-+ return skb_shinfo(skb)->gso_size;
-+}
-+
- #endif /* __KERNEL__ */
- #endif /* _LINUX_SKBUFF_H */
-diff -pruN ../orig-linux-2.6.17/include/net/protocol.h ./include/net/protocol.h
---- ../orig-linux-2.6.17/include/net/protocol.h 2007-01-08 15:16:27.000000000 +0000
-+++ ./include/net/protocol.h 2007-01-08 15:25:03.000000000 +0000
-@@ -37,6 +37,7 @@
- struct net_protocol {
- int (*handler)(struct sk_buff *skb);
- void (*err_handler)(struct sk_buff *skb, u32 info);
-+ int (*gso_send_check)(struct sk_buff *skb);
- struct sk_buff *(*gso_segment)(struct sk_buff *skb,
- int features);
- int no_policy;
-diff -pruN ../orig-linux-2.6.17/include/net/tcp.h ./include/net/tcp.h
---- ../orig-linux-2.6.17/include/net/tcp.h 2007-01-08 15:16:27.000000000 +0000
-+++ ./include/net/tcp.h 2007-01-08 15:25:03.000000000 +0000
-@@ -1076,6 +1076,7 @@ extern struct request_sock_ops tcp_reque
-
- extern int tcp_v4_destroy_sock(struct sock *sk);
-
-+extern int tcp_v4_gso_send_check(struct sk_buff *skb);
- extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
-
- #ifdef CONFIG_PROC_FS
-diff -pruN ../orig-linux-2.6.17/net/bridge/br_forward.c ./net/bridge/br_forward.c
---- ../orig-linux-2.6.17/net/bridge/br_forward.c 2007-01-08 15:22:15.000000000 +0000
-+++ ./net/bridge/br_forward.c 2007-01-08 15:25:32.000000000 +0000
-@@ -38,7 +38,7 @@ static inline unsigned packet_length(con
- int br_dev_queue_push_xmit(struct sk_buff *skb)
- {
- /* drop mtu oversized packets except tso */
-- if (packet_length(skb) > skb->dev->mtu && !skb_shinfo(skb)->gso_size)
-+ if (packet_length(skb) > skb->dev->mtu && !skb_is_gso(skb))
- kfree_skb(skb);
- else {
- #ifdef CONFIG_BRIDGE_NETFILTER
-diff -pruN ../orig-linux-2.6.17/net/bridge/br_netfilter.c ./net/bridge/br_netfilter.c
---- ../orig-linux-2.6.17/net/bridge/br_netfilter.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/bridge/br_netfilter.c 2007-01-08 15:25:03.000000000 +0000
-@@ -769,7 +769,7 @@ static int br_nf_dev_queue_xmit(struct s
- {
- if (skb->protocol == htons(ETH_P_IP) &&
- skb->len > skb->dev->mtu &&
-- !skb_shinfo(skb)->gso_size)
-+ !skb_is_gso(skb))
- return ip_fragment(skb, br_dev_queue_push_xmit);
- else
- return br_dev_queue_push_xmit(skb);
-diff -pruN ../orig-linux-2.6.17/net/core/dev.c ./net/core/dev.c
---- ../orig-linux-2.6.17/net/core/dev.c 2007-01-08 15:20:44.000000000 +0000
-+++ ./net/core/dev.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1156,9 +1156,17 @@ int skb_checksum_help(struct sk_buff *sk
- unsigned int csum;
- int ret = 0, offset = skb->h.raw - skb->data;
-
-- if (inward) {
-- skb->ip_summed = CHECKSUM_NONE;
-- goto out;
-+ if (inward)
-+ goto out_set_summed;
-+
-+ if (unlikely(skb_shinfo(skb)->gso_size)) {
-+ static int warned;
-+
-+ WARN_ON(!warned);
-+ warned = 1;
-+
-+ /* Let GSO fix up the checksum. */
-+ goto out_set_summed;
- }
-
- if (skb_cloned(skb)) {
-@@ -1175,6 +1183,8 @@ int skb_checksum_help(struct sk_buff *sk
- BUG_ON(skb->csum + 2 > offset);
-
- *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
-+
-+out_set_summed:
- skb->ip_summed = CHECKSUM_NONE;
- out:
- return ret;
-@@ -1195,17 +1205,35 @@ struct sk_buff *skb_gso_segment(struct s
- struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT);
- struct packet_type *ptype;
- int type = skb->protocol;
-+ int err;
-
- BUG_ON(skb_shinfo(skb)->frag_list);
-- BUG_ON(skb->ip_summed != CHECKSUM_HW);
-
- skb->mac.raw = skb->data;
- skb->mac_len = skb->nh.raw - skb->data;
- __skb_pull(skb, skb->mac_len);
-
-+ if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
-+ static int warned;
-+
-+ WARN_ON(!warned);
-+ warned = 1;
-+
-+ if (skb_header_cloned(skb) &&
-+ (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
-+ return ERR_PTR(err);
-+ }
-+
- rcu_read_lock();
- list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type) & 15], list) {
- if (ptype->type == type && !ptype->dev && ptype->gso_segment) {
-+ if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
-+ err = ptype->gso_send_check(skb);
-+ segs = ERR_PTR(err);
-+ if (err || skb_gso_ok(skb, features))
-+ break;
-+ __skb_push(skb, skb->data - skb->nh.raw);
-+ }
- segs = ptype->gso_segment(skb, features);
- break;
- }
-diff -pruN ../orig-linux-2.6.17/net/ipv4/af_inet.c ./net/ipv4/af_inet.c
---- ../orig-linux-2.6.17/net/ipv4/af_inet.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv4/af_inet.c 2007-01-08 15:25:03.000000000 +0000
-@@ -1097,6 +1097,40 @@ int inet_sk_rebuild_header(struct sock *
-
- EXPORT_SYMBOL(inet_sk_rebuild_header);
-
-+static int inet_gso_send_check(struct sk_buff *skb)
-+{
-+ struct iphdr *iph;
-+ struct net_protocol *ops;
-+ int proto;
-+ int ihl;
-+ int err = -EINVAL;
-+
-+ if (unlikely(!pskb_may_pull(skb, sizeof(*iph))))
-+ goto out;
-+
-+ iph = skb->nh.iph;
-+ ihl = iph->ihl * 4;
-+ if (ihl < sizeof(*iph))
-+ goto out;
-+
-+ if (unlikely(!pskb_may_pull(skb, ihl)))
-+ goto out;
-+
-+ skb->h.raw = __skb_pull(skb, ihl);
-+ iph = skb->nh.iph;
-+ proto = iph->protocol & (MAX_INET_PROTOS - 1);
-+ err = -EPROTONOSUPPORT;
-+
-+ rcu_read_lock();
-+ ops = rcu_dereference(inet_protos[proto]);
-+ if (likely(ops && ops->gso_send_check))
-+ err = ops->gso_send_check(skb);
-+ rcu_read_unlock();
-+
-+out:
-+ return err;
-+}
-+
- static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features)
- {
- struct sk_buff *segs = ERR_PTR(-EINVAL);
-@@ -1154,6 +1188,7 @@ static struct net_protocol igmp_protocol
- static struct net_protocol tcp_protocol = {
- .handler = tcp_v4_rcv,
- .err_handler = tcp_v4_err,
-+ .gso_send_check = tcp_v4_gso_send_check,
- .gso_segment = tcp_tso_segment,
- .no_policy = 1,
- };
-@@ -1200,6 +1235,7 @@ static int ipv4_proc_init(void);
- static struct packet_type ip_packet_type = {
- .type = __constant_htons(ETH_P_IP),
- .func = ip_rcv,
-+ .gso_send_check = inet_gso_send_check,
- .gso_segment = inet_gso_segment,
- };
-
-diff -pruN ../orig-linux-2.6.17/net/ipv4/ip_output.c ./net/ipv4/ip_output.c
---- ../orig-linux-2.6.17/net/ipv4/ip_output.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv4/ip_output.c 2007-01-08 15:25:03.000000000 +0000
-@@ -210,7 +210,7 @@ static inline int ip_finish_output(struc
- return dst_output(skb);
- }
- #endif
-- if (skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size)
-+ if (skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb))
- return ip_fragment(skb, ip_finish_output2);
- else
- return ip_finish_output2(skb);
-@@ -1095,7 +1095,7 @@ ssize_t ip_append_page(struct sock *sk,
- while (size > 0) {
- int i;
-
-- if (skb_shinfo(skb)->gso_size)
-+ if (skb_is_gso(skb))
- len = size;
- else {
-
-diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp_ipv4.c ./net/ipv4/tcp_ipv4.c
---- ../orig-linux-2.6.17/net/ipv4/tcp_ipv4.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./net/ipv4/tcp_ipv4.c 2007-01-08 15:25:03.000000000 +0000
-@@ -495,6 +495,24 @@ void tcp_v4_send_check(struct sock *sk,
- }
- }
-
-+int tcp_v4_gso_send_check(struct sk_buff *skb)
-+{
-+ struct iphdr *iph;
-+ struct tcphdr *th;
-+
-+ if (!pskb_may_pull(skb, sizeof(*th)))
-+ return -EINVAL;
-+
-+ iph = skb->nh.iph;
-+ th = skb->h.th;
-+
-+ th->check = 0;
-+ th->check = ~tcp_v4_check(th, skb->len, iph->saddr, iph->daddr, 0);
-+ skb->csum = offsetof(struct tcphdr, check);
-+ skb->ip_summed = CHECKSUM_HW;
-+ return 0;
-+}
-+
- /*
- * This routine will send an RST to the other tcp.
- *
-diff -pruN ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
---- ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv4/xfrm4_output.c 2007-01-08 15:25:03.000000000 +0000
-@@ -195,7 +195,7 @@ static int xfrm4_output_finish(struct sk
- }
- #endif
-
-- if (!skb_shinfo(skb)->gso_size)
-+ if (!skb_is_gso(skb))
- return xfrm4_output_finish2(skb);
-
- skb->protocol = htons(ETH_P_IP);
-diff -pruN ../orig-linux-2.6.17/net/ipv6/ip6_output.c ./net/ipv6/ip6_output.c
---- ../orig-linux-2.6.17/net/ipv6/ip6_output.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv6/ip6_output.c 2007-01-08 15:25:03.000000000 +0000
-@@ -147,7 +147,7 @@ static int ip6_output2(struct sk_buff *s
-
- int ip6_output(struct sk_buff *skb)
- {
-- if ((skb->len > dst_mtu(skb->dst) && !skb_shinfo(skb)->gso_size) ||
-+ if ((skb->len > dst_mtu(skb->dst) && !skb_is_gso(skb)) ||
- dst_allfrag(skb->dst))
- return ip6_fragment(skb, ip6_output2);
- else
-diff -pruN ../orig-linux-2.6.17/net/ipv6/xfrm6_output.c ./net/ipv6/xfrm6_output.c
---- ../orig-linux-2.6.17/net/ipv6/xfrm6_output.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv6/xfrm6_output.c 2007-01-08 15:25:03.000000000 +0000
-@@ -179,7 +179,7 @@ static int xfrm6_output_finish(struct sk
- {
- struct sk_buff *segs;
-
-- if (!skb_shinfo(skb)->gso_size)
-+ if (!skb_is_gso(skb))
- return xfrm6_output_finish2(skb);
-
- skb->protocol = htons(ETH_P_IP);
diff --git a/patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch b/patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch
deleted file mode 100644
index 080fba449b..0000000000
--- a/patches/linux-2.6.17/net-gso-3-fix-errorcheck.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/include/linux/netdevice.h ./include/linux/netdevice.h
---- ../orig-linux-2.6.17/include/linux/netdevice.h 2007-01-08 15:25:03.000000000 +0000
-+++ ./include/linux/netdevice.h 2007-01-08 15:27:08.000000000 +0000
-@@ -919,10 +919,10 @@ static inline void netif_tx_lock_bh(stru
-
- static inline int netif_tx_trylock(struct net_device *dev)
- {
-- int err = spin_trylock(&dev->_xmit_lock);
-- if (!err)
-+ int ok = spin_trylock(&dev->_xmit_lock);
-+ if (likely(ok))
- dev->xmit_lock_owner = smp_processor_id();
-- return err;
-+ return ok;
- }
-
- static inline void netif_tx_unlock(struct net_device *dev)
diff --git a/patches/linux-2.6.17/net-gso-4-kill-warnon.patch b/patches/linux-2.6.17/net-gso-4-kill-warnon.patch
deleted file mode 100644
index f71eec2161..0000000000
--- a/patches/linux-2.6.17/net-gso-4-kill-warnon.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/net/core/dev.c ./net/core/dev.c
---- ../orig-linux-2.6.17/net/core/dev.c 2007-01-08 15:25:03.000000000 +0000
-+++ ./net/core/dev.c 2007-01-08 15:27:22.000000000 +0000
-@@ -1160,11 +1160,6 @@ int skb_checksum_help(struct sk_buff *sk
- goto out_set_summed;
-
- if (unlikely(skb_shinfo(skb)->gso_size)) {
-- static int warned;
--
-- WARN_ON(!warned);
-- warned = 1;
--
- /* Let GSO fix up the checksum. */
- goto out_set_summed;
- }
-@@ -1214,11 +1209,6 @@ struct sk_buff *skb_gso_segment(struct s
- __skb_pull(skb, skb->mac_len);
-
- if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
-- static int warned;
--
-- WARN_ON(!warned);
-- warned = 1;
--
- if (skb_header_cloned(skb) &&
- (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
- return ERR_PTR(err);
diff --git a/patches/linux-2.6.17/vsnprintf.patch b/patches/linux-2.6.17/vsnprintf.patch
deleted file mode 100644
index 4d2cf24831..0000000000
--- a/patches/linux-2.6.17/vsnprintf.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/lib/vsprintf.c ./lib/vsprintf.c
---- ../orig-linux-2.6.17/lib/vsprintf.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./lib/vsprintf.c 2007-01-08 15:38:07.000000000 +0000
-@@ -187,49 +187,49 @@ static char * number(char * buf, char *
- size -= precision;
- if (!(type&(ZEROPAD+LEFT))) {
- while(size-->0) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = ' ';
- ++buf;
- }
- }
- if (sign) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = sign;
- ++buf;
- }
- if (type & SPECIAL) {
- if (base==8) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = '0';
- ++buf;
- } else if (base==16) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = '0';
- ++buf;
-- if (buf <= end)
-+ if (buf < end)
- *buf = digits[33];
- ++buf;
- }
- }
- if (!(type & LEFT)) {
- while (size-- > 0) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = c;
- ++buf;
- }
- }
- while (i < precision--) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = '0';
- ++buf;
- }
- while (i-- > 0) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = tmp[i];
- ++buf;
- }
- while (size-- > 0) {
-- if (buf <= end)
-+ if (buf < end)
- *buf = ' ';
- ++buf;
- }
-@@ -272,7 +272,8 @@ int vsnprintf(char *buf, size_t size, co
- /* 'z' changed to 'Z' --davidm 1/25/99 */
- /* 't' added for ptrdiff_t */
-
-- /* Reject out-of-range values early */
-+ /* Reject out-of-range values early. Large positive sizes are
-+ used for unknown buffer sizes. */
- if (unlikely((int) size < 0)) {
- /* There can be only one.. */
- static int warn = 1;
-@@ -282,16 +283,17 @@ int vsnprintf(char *buf, size_t size, co
- }
-
- str = buf;
-- end = buf + size - 1;
-+ end = buf + size;
-
-- if (end < buf - 1) {
-- end = ((void *) -1);
-- size = end - buf + 1;
-+ /* Make sure end is always >= buf */
-+ if (end < buf) {
-+ end = ((void *)-1);
-+ size = end - buf;
- }
-
- for (; *fmt ; ++fmt) {
- if (*fmt != '%') {
-- if (str <= end)
-+ if (str < end)
- *str = *fmt;
- ++str;
- continue;
-@@ -357,17 +359,17 @@ int vsnprintf(char *buf, size_t size, co
- case 'c':
- if (!(flags & LEFT)) {
- while (--field_width > 0) {
-- if (str <= end)
-+ if (str < end)
- *str = ' ';
- ++str;
- }
- }
- c = (unsigned char) va_arg(args, int);
-- if (str <= end)
-+ if (str < end)
- *str = c;
- ++str;
- while (--field_width > 0) {
-- if (str <= end)
-+ if (str < end)
- *str = ' ';
- ++str;
- }
-@@ -382,18 +384,18 @@ int vsnprintf(char *buf, size_t size, co
-
- if (!(flags & LEFT)) {
- while (len < field_width--) {
-- if (str <= end)
-+ if (str < end)
- *str = ' ';
- ++str;
- }
- }
- for (i = 0; i < len; ++i) {
-- if (str <= end)
-+ if (str < end)
- *str = *s;
- ++str; ++s;
- }
- while (len < field_width--) {
-- if (str <= end)
-+ if (str < end)
- *str = ' ';
- ++str;
- }
-@@ -426,7 +428,7 @@ int vsnprintf(char *buf, size_t size, co
- continue;
-
- case '%':
-- if (str <= end)
-+ if (str < end)
- *str = '%';
- ++str;
- continue;
-@@ -449,11 +451,11 @@ int vsnprintf(char *buf, size_t size, co
- break;
-
- default:
-- if (str <= end)
-+ if (str < end)
- *str = '%';
- ++str;
- if (*fmt) {
-- if (str <= end)
-+ if (str < end)
- *str = *fmt;
- ++str;
- } else {
-@@ -483,14 +485,13 @@ int vsnprintf(char *buf, size_t size, co
- str = number(str, end, num, base,
- field_width, precision, flags);
- }
-- if (str <= end)
-- *str = '\0';
-- else if (size > 0)
-- /* don't write out a null byte if the buf size is zero */
-- *end = '\0';
-- /* the trailing null byte doesn't count towards the total
-- * ++str;
-- */
-+ if (size > 0) {
-+ if (str < end)
-+ *str = '\0';
-+ else
-+ end[-1] = '\0';
-+ }
-+ /* the trailing null byte doesn't count towards the total */
- return str-buf;
- }
-
diff --git a/patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch b/patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch
deleted file mode 100644
index 5d64cbb6b8..0000000000
--- a/patches/linux-2.6.17/x86-increase-interrupt-vector-range.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S
---- ../orig-linux-2.6.17/arch/i386/kernel/entry.S 2007-01-08 15:33:41.000000000 +0000
-+++ ./arch/i386/kernel/entry.S 2007-01-08 15:36:17.000000000 +0000
-@@ -410,7 +410,7 @@ vector=0
- ENTRY(irq_entries_start)
- .rept NR_IRQS
- ALIGN
--1: pushl $vector-256
-+1: pushl $~(vector)
- jmp common_interrupt
- .data
- .long 1b
-@@ -427,7 +427,7 @@ common_interrupt:
-
- #define BUILD_INTERRUPT(name, nr) \
- ENTRY(name) \
-- pushl $nr-256; \
-+ pushl $~(nr); \
- SAVE_ALL \
- movl %esp,%eax; \
- call smp_/**/name; \
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/irq.c ./arch/i386/kernel/irq.c
---- ../orig-linux-2.6.17/arch/i386/kernel/irq.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/irq.c 2007-01-08 15:36:18.000000000 +0000
-@@ -53,8 +53,8 @@ static union irq_ctx *softirq_ctx[NR_CPU
- */
- fastcall unsigned int do_IRQ(struct pt_regs *regs)
- {
-- /* high bits used in ret_from_ code */
-- int irq = regs->orig_eax & 0xff;
-+ /* high bit used in ret_from_ code */
-+ int irq = ~regs->orig_eax;
- #ifdef CONFIG_4KSTACKS
- union irq_ctx *curctx, *irqctx;
- u32 *isp;
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/entry.S ./arch/x86_64/kernel/entry.S
---- ../orig-linux-2.6.17/arch/x86_64/kernel/entry.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/entry.S 2007-01-08 15:36:18.000000000 +0000
-@@ -596,7 +596,7 @@ retint_kernel:
- */
- .macro apicinterrupt num,func
- INTR_FRAME
-- pushq $\num-256
-+ pushq $~(\num)
- CFI_ADJUST_CFA_OFFSET 8
- interrupt \func
- jmp ret_from_intr
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/irq.c ./arch/x86_64/kernel/irq.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/irq.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/irq.c 2007-01-08 15:36:18.000000000 +0000
-@@ -91,8 +91,8 @@ skip:
- */
- asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
- {
-- /* high bits used in ret_from_ code */
-- unsigned irq = regs->orig_rax & 0xff;
-+ /* high bit used in ret_from_ code */
-+ unsigned irq = ~regs->orig_rax;
-
- exit_idle();
- irq_enter();
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/smp.c ./arch/x86_64/kernel/smp.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/smp.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/smp.c 2007-01-08 15:36:18.000000000 +0000
-@@ -135,10 +135,10 @@ asmlinkage void smp_invalidate_interrupt
-
- cpu = smp_processor_id();
- /*
-- * orig_rax contains the interrupt vector - 256.
-+ * orig_rax contains the negated interrupt vector.
- * Use that to determine where the sender put the data.
- */
-- sender = regs->orig_rax + 256 - INVALIDATE_TLB_VECTOR_START;
-+ sender = ~regs->orig_rax - INVALIDATE_TLB_VECTOR_START;
- f = &per_cpu(flush_state, sender);
-
- if (!cpu_isset(cpu, f->flush_cpumask))
-diff -pruN ../orig-linux-2.6.17/include/asm-x86_64/hw_irq.h ./include/asm-x86_64/hw_irq.h
---- ../orig-linux-2.6.17/include/asm-x86_64/hw_irq.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-x86_64/hw_irq.h 2007-01-08 15:36:18.000000000 +0000
-@@ -127,7 +127,7 @@ asmlinkage void IRQ_NAME(nr); \
- __asm__( \
- "\n.p2align\n" \
- "IRQ" #nr "_interrupt:\n\t" \
-- "push $" #nr "-256 ; " \
-+ "push $~(" #nr ") ; " \
- "jmp common_interrupt");
-
- #if defined(CONFIG_X86_IO_APIC)
diff --git a/patches/linux-2.6.17/blktap-aio-16_03_06.patch b/patches/linux-2.6.18/blktap-aio-16_03_06.patch
index 93602956c3..b0f2a81075 100644
--- a/patches/linux-2.6.17/blktap-aio-16_03_06.patch
+++ b/patches/linux-2.6.18/blktap-aio-16_03_06.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/fs/aio.c ./fs/aio.c
---- ../orig-linux-2.6.17/fs/aio.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./fs/aio.c 2007-01-08 15:13:31.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/fs/aio.c ./fs/aio.c
+--- ../orig-linux-2.6.18/fs/aio.c 2006-09-20 04:42:06.000000000 +0100
++++ ./fs/aio.c 2007-01-12 16:04:15.000000000 +0000
@@ -34,6 +34,11 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
@@ -184,9 +184,9 @@ diff -pruN ../orig-linux-2.6.17/fs/aio.c ./fs/aio.c
get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */
io_destroy(ioctx);
-diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c
---- ../orig-linux-2.6.17/fs/eventpoll.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./fs/eventpoll.c 2007-01-08 15:13:31.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/fs/eventpoll.c ./fs/eventpoll.c
+--- ../orig-linux-2.6.18/fs/eventpoll.c 2006-09-20 04:42:06.000000000 +0100
++++ ./fs/eventpoll.c 2007-01-12 16:04:41.000000000 +0000
@@ -236,8 +236,6 @@ struct ep_pqueue {
static void ep_poll_safewake_init(struct poll_safewake *psw);
@@ -202,9 +202,9 @@ diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c
static int eventpollfs_delete_dentry(struct dentry *dentry);
-static struct inode *ep_eventpoll_inode(void);
+static struct inode *ep_eventpoll_inode(struct file_operations *fops);
- static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type,
- int flags, const char *dev_name,
- void *data);
+ static int eventpollfs_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name,
+ void *data, struct vfsmount *mnt);
@@ -517,7 +515,7 @@ asmlinkage long sys_epoll_create(int siz
* Creates all the items needed to setup an eventpoll file. That is,
* a file structure, and inode and a free file descriptor.
@@ -243,7 +243,7 @@ diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c
file->f_mode = FMODE_READ;
file->f_version = 0;
file->private_data = ep;
-@@ -1566,7 +1564,7 @@ static int eventpollfs_delete_dentry(str
+@@ -1569,7 +1567,7 @@ static int eventpollfs_delete_dentry(str
}
@@ -252,7 +252,7 @@ diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c
{
int error = -ENOMEM;
struct inode *inode = new_inode(eventpoll_mnt->mnt_sb);
-@@ -1574,7 +1572,7 @@ static struct inode *ep_eventpoll_inode(
+@@ -1577,7 +1575,7 @@ static struct inode *ep_eventpoll_inode(
if (!inode)
goto eexit_1;
@@ -261,9 +261,9 @@ diff -pruN ../orig-linux-2.6.17/fs/eventpoll.c ./fs/eventpoll.c
/*
* Mark the inode dirty from the very beginning,
-diff -pruN ../orig-linux-2.6.17/include/linux/aio.h ./include/linux/aio.h
---- ../orig-linux-2.6.17/include/linux/aio.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/linux/aio.h 2007-01-08 15:13:32.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/linux/aio.h ./include/linux/aio.h
+--- ../orig-linux-2.6.18/include/linux/aio.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/linux/aio.h 2007-01-12 16:04:15.000000000 +0000
@@ -191,6 +191,11 @@ struct kioctx {
struct aio_ring_info ring_info;
@@ -276,9 +276,9 @@ diff -pruN ../orig-linux-2.6.17/include/linux/aio.h ./include/linux/aio.h
};
/* prototypes */
-diff -pruN ../orig-linux-2.6.17/include/linux/eventpoll.h ./include/linux/eventpoll.h
---- ../orig-linux-2.6.17/include/linux/eventpoll.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/linux/eventpoll.h 2007-01-08 15:13:32.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/linux/eventpoll.h ./include/linux/eventpoll.h
+--- ../orig-linux-2.6.18/include/linux/eventpoll.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/linux/eventpoll.h 2007-01-12 16:04:15.000000000 +0000
@@ -90,6 +90,12 @@ static inline void eventpoll_release(str
eventpoll_release_file(file);
}
diff --git a/patches/linux-2.6.17/fix-ide-cd-pio-mode.patch b/patches/linux-2.6.18/fix-ide-cd-pio-mode.patch
index 3f2ef6bec9..69da5d72b6 100644
--- a/patches/linux-2.6.17/fix-ide-cd-pio-mode.patch
+++ b/patches/linux-2.6.18/fix-ide-cd-pio-mode.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/drivers/ide/ide-lib.c ./drivers/ide/ide-lib.c
---- ../orig-linux-2.6.17/drivers/ide/ide-lib.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/ide/ide-lib.c 2007-01-08 15:15:41.000000000 +0000
-@@ -410,10 +410,10 @@ void ide_toggle_bounce(ide_drive_t *driv
+diff -pruN ../orig-linux-2.6.18/drivers/ide/ide-lib.c ./drivers/ide/ide-lib.c
+--- ../orig-linux-2.6.18/drivers/ide/ide-lib.c 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/ide/ide-lib.c 2007-01-12 16:07:37.000000000 +0000
+@@ -408,10 +408,10 @@ void ide_toggle_bounce(ide_drive_t *driv
{
u64 addr = BLK_BOUNCE_HIGH; /* dma64_addr_t */
diff --git a/patches/linux-2.6.18/fixaddr-top.patch b/patches/linux-2.6.18/fixaddr-top.patch
new file mode 100644
index 0000000000..19558b9347
--- /dev/null
+++ b/patches/linux-2.6.18/fixaddr-top.patch
@@ -0,0 +1,69 @@
+diff -pruN ../orig-linux-2.6.18/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
+--- ../orig-linux-2.6.18/arch/i386/mm/pgtable.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/mm/pgtable.c 2007-01-17 17:19:36.000000000 +0000
+@@ -12,6 +12,7 @@
+ #include <linux/slab.h>
+ #include <linux/pagemap.h>
+ #include <linux/spinlock.h>
++#include <linux/module.h>
+
+ #include <asm/system.h>
+ #include <asm/pgtable.h>
+@@ -137,6 +138,10 @@ void set_pmd_pfn(unsigned long vaddr, un
+ __flush_tlb_one(vaddr);
+ }
+
++static int nr_fixmaps = 0;
++unsigned long __FIXADDR_TOP = 0xfffff000;
++EXPORT_SYMBOL(__FIXADDR_TOP);
++
+ void __set_fixmap (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
+ {
+ unsigned long address = __fix_to_virt(idx);
+@@ -146,6 +151,13 @@ void __set_fixmap (enum fixed_addresses
+ return;
+ }
+ set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
++ nr_fixmaps++;
++}
++
++void set_fixaddr_top(unsigned long top)
++{
++ BUG_ON(nr_fixmaps > 0);
++ __FIXADDR_TOP = top - PAGE_SIZE;
+ }
+
+ pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/fixmap.h ./include/asm-i386/fixmap.h
+--- ../orig-linux-2.6.18/include/asm-i386/fixmap.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/fixmap.h 2007-01-17 17:19:36.000000000 +0000
+@@ -19,7 +19,7 @@
+ * Leave one empty page between vmalloc'ed areas and
+ * the start of the fixmap.
+ */
+-#define __FIXADDR_TOP 0xfffff000
++extern unsigned long __FIXADDR_TOP;
+
+ #ifndef __ASSEMBLY__
+ #include <linux/kernel.h>
+@@ -94,6 +94,8 @@ enum fixed_addresses {
+ extern void __set_fixmap (enum fixed_addresses idx,
+ unsigned long phys, pgprot_t flags);
+
++extern void set_fixaddr_top(unsigned long top);
++
+ #define set_fixmap(idx, phys) \
+ __set_fixmap(idx, phys, PAGE_KERNEL)
+ /*
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/page.h ./include/asm-i386/page.h
+--- ../orig-linux-2.6.18/include/asm-i386/page.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/page.h 2007-01-17 17:19:36.000000000 +0000
+@@ -122,7 +122,7 @@ extern int page_is_ram(unsigned long pag
+
+ #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET)
+ #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE)
+-#define MAXMEM (-__PAGE_OFFSET-__VMALLOC_RESERVE)
++#define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE)
+ #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
+ #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET))
+ #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
diff --git a/patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch b/patches/linux-2.6.18/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
index ea805a3612..d4b0d38ce8 100644
--- a/patches/linux-2.6.17/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
+++ b/patches/linux-2.6.18/git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000
-+++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:33.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
+--- ../orig-linux-2.6.18/arch/i386/kernel/machine_kexec.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/kernel/machine_kexec.c 2007-01-12 16:03:23.000000000 +0000
@@ -20,70 +20,13 @@
#include <asm/system.h>
@@ -149,9 +149,9 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/ker
+ relocate_kernel((unsigned long)image->head, (unsigned long)page_list,
+ image->start, cpu_has_pae);
}
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S
---- ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:33.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S
+--- ../orig-linux-2.6.18/arch/i386/kernel/relocate_kernel.S 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/kernel/relocate_kernel.S 2007-01-12 16:03:23.000000000 +0000
@@ -7,16 +7,138 @@
*/
@@ -337,9 +337,9 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S ./arch/i386/k
- .globl relocate_new_kernel_size
-relocate_new_kernel_size:
- .long relocate_new_kernel_end - relocate_new_kernel
-diff -pruN ../orig-linux-2.6.17/include/asm-i386/kexec.h ./include/asm-i386/kexec.h
---- ../orig-linux-2.6.17/include/asm-i386/kexec.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-i386/kexec.h 2007-01-08 15:12:33.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/kexec.h ./include/asm-i386/kexec.h
+--- ../orig-linux-2.6.18/include/asm-i386/kexec.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/kexec.h 2007-01-12 16:03:23.000000000 +0000
@@ -1,6 +1,26 @@
#ifndef _I386_KEXEC_H
#define _I386_KEXEC_H
diff --git a/patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch b/patches/linux-2.6.18/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
index 2cb8358cd4..21efe3e2d4 100644
--- a/patches/linux-2.6.17/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
+++ b/patches/linux-2.6.18/git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:12:20.000000000 +0000
-+++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:01.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-12 16:03:49.000000000 +0000
@@ -15,6 +15,15 @@
#include <asm/mmu_context.h>
#include <asm/io.h>
@@ -113,9 +113,9 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64
+ relocate_kernel((unsigned long)image->head, (unsigned long)page_list,
+ image->start);
}
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S
---- ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:01.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-12 16:03:49.000000000 +0000
@@ -7,31 +7,169 @@
*/
@@ -309,9 +309,9 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_
- .globl relocate_new_kernel_size
-relocate_new_kernel_size:
- .quad relocate_new_kernel_end - relocate_new_kernel
-diff -pruN ../orig-linux-2.6.17/include/asm-x86_64/kexec.h ./include/asm-x86_64/kexec.h
---- ../orig-linux-2.6.17/include/asm-x86_64/kexec.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-x86_64/kexec.h 2007-01-08 15:13:01.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/asm-x86_64/kexec.h ./include/asm-x86_64/kexec.h
+--- ../orig-linux-2.6.18/include/asm-x86_64/kexec.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-x86_64/kexec.h 2007-01-12 16:03:49.000000000 +0000
@@ -1,6 +1,27 @@
#ifndef _X86_64_KEXEC_H
#define _X86_64_KEXEC_H
diff --git a/patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch b/patches/linux-2.6.18/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
index 73e3e7492d..294692b1e6 100644
--- a/patches/linux-2.6.17/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
+++ b/patches/linux-2.6.18/git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S
---- ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:29.000000000 +0000
-+++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:43.000000000 +0000
-@@ -18,6 +18,7 @@ PHDRS {
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S 2007-01-12 18:20:02.000000000 +0000
++++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-12 18:20:20.000000000 +0000
+@@ -17,6 +17,7 @@ PHDRS {
text PT_LOAD FLAGS(5); /* R_E */
data PT_LOAD FLAGS(7); /* RWE */
user PT_LOAD FLAGS(7); /* RWE */
@@ -9,7 +9,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
note PT_NOTE FLAGS(4); /* R__ */
}
SECTIONS
-@@ -123,7 +124,7 @@ SECTIONS
+@@ -131,7 +132,7 @@ SECTIONS
. = ALIGN(8192); /* init_task */
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
*(.data.init_task)
diff --git a/patches/linux-2.6.17/i386-mach-io-check-nmi.patch b/patches/linux-2.6.18/i386-mach-io-check-nmi.patch
index 24edbe31f5..39a523761b 100644
--- a/patches/linux-2.6.17/i386-mach-io-check-nmi.patch
+++ b/patches/linux-2.6.18/i386-mach-io-check-nmi.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c
---- ../orig-linux-2.6.17/arch/i386/kernel/traps.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/traps.c 2007-01-08 15:15:53.000000000 +0000
-@@ -607,18 +607,11 @@ static void mem_parity_error(unsigned ch
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/traps.c ./arch/i386/kernel/traps.c
+--- ../orig-linux-2.6.18/arch/i386/kernel/traps.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/kernel/traps.c 2007-01-12 16:07:49.000000000 +0000
+@@ -642,18 +642,11 @@ static void mem_parity_error(unsigned ch
static void io_check_error(unsigned char reason, struct pt_regs * regs)
{
@@ -21,9 +21,9 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/traps.c ./arch/i386/kernel/trap
}
static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
-diff -pruN ../orig-linux-2.6.17/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h
---- ../orig-linux-2.6.17/include/asm-i386/mach-default/mach_traps.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-i386/mach-default/mach_traps.h 2007-01-08 15:15:53.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h ./include/asm-i386/mach-default/mach_traps.h
+--- ../orig-linux-2.6.18/include/asm-i386/mach-default/mach_traps.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/mach-default/mach_traps.h 2007-01-12 16:07:49.000000000 +0000
@@ -15,6 +15,18 @@ static inline void clear_mem_error(unsig
outb(reason, 0x61);
}
diff --git a/patches/linux-2.6.17/ipv6-no-autoconf.patch b/patches/linux-2.6.18/ipv6-no-autoconf.patch
index a64f800d90..84c72e956b 100644
--- a/patches/linux-2.6.17/ipv6-no-autoconf.patch
+++ b/patches/linux-2.6.18/ipv6-no-autoconf.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/net/ipv6/addrconf.c ./net/ipv6/addrconf.c
---- ../orig-linux-2.6.17/net/ipv6/addrconf.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./net/ipv6/addrconf.c 2007-01-08 15:16:04.000000000 +0000
-@@ -2461,6 +2461,7 @@ static void addrconf_dad_start(struct in
+diff -pruN ../orig-linux-2.6.18/net/ipv6/addrconf.c ./net/ipv6/addrconf.c
+--- ../orig-linux-2.6.18/net/ipv6/addrconf.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/ipv6/addrconf.c 2007-01-12 16:08:07.000000000 +0000
+@@ -2514,6 +2514,7 @@ static void addrconf_dad_start(struct in
spin_lock_bh(&ifp->lock);
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
@@ -9,7 +9,7 @@ diff -pruN ../orig-linux-2.6.17/net/ipv6/addrconf.c ./net/ipv6/addrconf.c
!(ifp->flags&IFA_F_TENTATIVE)) {
ifp->flags &= ~IFA_F_TENTATIVE;
spin_unlock_bh(&ifp->lock);
-@@ -2545,6 +2546,7 @@ static void addrconf_dad_completed(struc
+@@ -2598,6 +2599,7 @@ static void addrconf_dad_completed(struc
if (ifp->idev->cnf.forwarding == 0 &&
ifp->idev->cnf.rtr_solicits > 0 &&
(dev->flags&IFF_LOOPBACK) == 0 &&
diff --git a/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch b/patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
index e62fb53264..ea48da9882 100644
--- a/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
+++ b/patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:33.000000000 +0000
-+++ ./arch/i386/kernel/machine_kexec.c 2007-01-08 15:12:46.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/machine_kexec.c ./arch/i386/kernel/machine_kexec.c
+--- ../orig-linux-2.6.18/arch/i386/kernel/machine_kexec.c 2007-01-12 16:03:23.000000000 +0000
++++ ./arch/i386/kernel/machine_kexec.c 2007-01-12 16:03:37.000000000 +0000
@@ -28,48 +28,6 @@ static u32 kexec_pmd1[1024] PAGE_ALIGNED
static u32 kexec_pte0[1024] PAGE_ALIGNED;
static u32 kexec_pte1[1024] PAGE_ALIGNED;
@@ -74,9 +74,9 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/machine_kexec.c ./arch/i386/ker
relocate_kernel((unsigned long)image->head, (unsigned long)page_list,
image->start, cpu_has_pae);
}
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S
---- ../orig-linux-2.6.17/arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:33.000000000 +0000
-+++ ./arch/i386/kernel/relocate_kernel.S 2007-01-08 15:12:46.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/relocate_kernel.S ./arch/i386/kernel/relocate_kernel.S
+--- ../orig-linux-2.6.18/arch/i386/kernel/relocate_kernel.S 2007-01-12 16:03:23.000000000 +0000
++++ ./arch/i386/kernel/relocate_kernel.S 2007-01-12 16:03:37.000000000 +0000
@@ -154,14 +154,45 @@ relocate_new_kernel:
movl PTR(PA_PGD)(%ebp), %eax
movl %eax, %cr3
diff --git a/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch b/patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
index 81d84b55e1..9ecdb3e729 100644
--- a/patches/linux-2.6.17/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
+++ b/patches/linux-2.6.18/linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
---- ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:01.000000000 +0000
-+++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-08 15:13:18.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64/kernel/machine_kexec.c
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/machine_kexec.c 2007-01-12 16:03:49.000000000 +0000
++++ ./arch/x86_64/kernel/machine_kexec.c 2007-01-12 16:04:02.000000000 +0000
@@ -112,47 +112,6 @@ static int init_pgtable(struct kimage *i
return init_level4_page(image, level4p, 0, end_pfn << PAGE_SHIFT);
}
@@ -73,9 +73,9 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/machine_kexec.c ./arch/x86_64
relocate_kernel((unsigned long)image->head, (unsigned long)page_list,
image->start);
}
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S
---- ../orig-linux-2.6.17/arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:01.000000000 +0000
-+++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-08 15:13:18.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S ./arch/x86_64/kernel/relocate_kernel.S
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/relocate_kernel.S 2007-01-12 16:03:49.000000000 +0000
++++ ./arch/x86_64/kernel/relocate_kernel.S 2007-01-12 16:04:02.000000000 +0000
@@ -159,13 +159,39 @@ relocate_new_kernel:
movq PTR(PA_PGD)(%rsi), %r9
movq %r9, %cr3
diff --git a/patches/linux-2.6.17/net-csum.patch b/patches/linux-2.6.18/net-csum.patch
index 342e2b65aa..fae3ac3f50 100644
--- a/patches/linux-2.6.17/net-csum.patch
+++ b/patches/linux-2.6.18/net-csum.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
---- ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-01-08 15:16:15.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4/netfilter/ip_nat_proto_tcp.c
+--- ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_tcp.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/ipv4/netfilter/ip_nat_proto_tcp.c 2007-01-12 16:08:53.000000000 +0000
@@ -129,7 +129,12 @@ tcp_manip_pkt(struct sk_buff **pskb,
if (hdrsize < sizeof(*hdr))
return 1;
@@ -15,9 +15,9 @@ diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_tcp.c ./net/ipv4
ip_nat_cheat_check(oldport ^ 0xFFFF,
newport,
hdr->check));
-diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
---- ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2007-01-08 15:16:15.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4/netfilter/ip_nat_proto_udp.c
+--- ../orig-linux-2.6.18/net/ipv4/netfilter/ip_nat_proto_udp.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/ipv4/netfilter/ip_nat_proto_udp.c 2007-01-12 16:08:53.000000000 +0000
@@ -113,11 +113,17 @@ udp_manip_pkt(struct sk_buff **pskb,
newport = tuple->dst.u.udp.port;
portptr = &hdr->dest;
@@ -38,19 +38,19 @@ diff -pruN ../orig-linux-2.6.17/net/ipv4/netfilter/ip_nat_proto_udp.c ./net/ipv4
*portptr = newport;
return 1;
}
-diff -pruN ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
---- ../orig-linux-2.6.17/net/ipv4/xfrm4_output.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./net/ipv4/xfrm4_output.c 2007-01-08 15:16:15.000000000 +0000
-@@ -17,6 +17,8 @@
+diff -pruN ../orig-linux-2.6.18/net/ipv4/xfrm4_output.c ./net/ipv4/xfrm4_output.c
+--- ../orig-linux-2.6.18/net/ipv4/xfrm4_output.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/ipv4/xfrm4_output.c 2007-01-12 17:38:34.000000000 +0000
+@@ -18,6 +18,8 @@
#include <net/xfrm.h>
#include <net/icmp.h>
+extern int skb_checksum_setup(struct sk_buff *skb);
+
- /* Add encapsulation header.
- *
- * In transport mode, the IP header will be moved forward to make space
-@@ -103,6 +105,10 @@ static int xfrm4_output_one(struct sk_bu
+ static int xfrm4_tunnel_check_size(struct sk_buff *skb)
+ {
+ int mtu, ret = 0;
+@@ -48,6 +50,10 @@ static int xfrm4_output_one(struct sk_bu
struct xfrm_state *x = dst->xfrm;
int err;
diff --git a/patches/linux-2.6.17/net-gso-5-rcv-mss.patch b/patches/linux-2.6.18/net-gso-5-rcv-mss.patch
index d8bb430053..50102e3c32 100644
--- a/patches/linux-2.6.17/net-gso-5-rcv-mss.patch
+++ b/patches/linux-2.6.18/net-gso-5-rcv-mss.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/net/ipv4/tcp_input.c ./net/ipv4/tcp_input.c
---- ../orig-linux-2.6.17/net/ipv4/tcp_input.c 2007-01-08 15:16:27.000000000 +0000
-+++ ./net/ipv4/tcp_input.c 2007-01-08 15:27:35.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/net/ipv4/tcp_input.c ./net/ipv4/tcp_input.c
+--- ../orig-linux-2.6.18/net/ipv4/tcp_input.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/ipv4/tcp_input.c 2007-01-12 18:10:16.000000000 +0000
@@ -127,7 +127,7 @@ static void tcp_measure_rcv_mss(struct s
/* skb->len may jitter because of SACKs, even if peer
* sends good full-sized frames.
diff --git a/patches/linux-2.6.17/net-gso-6-linear-segmentation.patch b/patches/linux-2.6.18/net-gso-6-linear-segmentation.patch
index 6bc75fc790..ef30ef42fd 100644
--- a/patches/linux-2.6.17/net-gso-6-linear-segmentation.patch
+++ b/patches/linux-2.6.18/net-gso-6-linear-segmentation.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/net/core/skbuff.c ./net/core/skbuff.c
---- ../orig-linux-2.6.17/net/core/skbuff.c 2007-01-08 15:21:05.000000000 +0000
-+++ ./net/core/skbuff.c 2007-01-08 15:27:48.000000000 +0000
-@@ -1859,7 +1859,7 @@ struct sk_buff *skb_segment(struct sk_bu
+diff -pruN ../orig-linux-2.6.18/net/core/skbuff.c ./net/core/skbuff.c
+--- ../orig-linux-2.6.18/net/core/skbuff.c 2006-09-20 04:42:06.000000000 +0100
++++ ./net/core/skbuff.c 2007-01-12 18:10:37.000000000 +0000
+@@ -1945,7 +1945,7 @@ struct sk_buff *skb_segment(struct sk_bu
do {
struct sk_buff *nskb;
skb_frag_t *frag;
@@ -10,7 +10,7 @@ diff -pruN ../orig-linux-2.6.17/net/core/skbuff.c ./net/core/skbuff.c
int k;
int size;
-@@ -1870,11 +1870,10 @@ struct sk_buff *skb_segment(struct sk_bu
+@@ -1956,11 +1956,10 @@ struct sk_buff *skb_segment(struct sk_bu
hsize = skb_headlen(skb) - offset;
if (hsize < 0)
hsize = 0;
diff --git a/patches/linux-2.6.17/pmd-shared.patch b/patches/linux-2.6.18/pmd-shared.patch
index 4764aa1768..638a430d13 100644
--- a/patches/linux-2.6.17/pmd-shared.patch
+++ b/patches/linux-2.6.18/pmd-shared.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c
---- ../orig-linux-2.6.17/arch/i386/mm/pageattr.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/mm/pageattr.c 2007-01-08 15:32:50.000000000 +0000
-@@ -85,7 +85,7 @@ static void set_pmd_pte(pte_t *kpte, uns
+diff -pruN ../orig-linux-2.6.18/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.c
+--- ../orig-linux-2.6.18/arch/i386/mm/pageattr.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/mm/pageattr.c 2007-01-12 18:11:06.000000000 +0000
+@@ -84,7 +84,7 @@ static void set_pmd_pte(pte_t *kpte, uns
unsigned long flags;
set_pte_atomic(kpte, pte); /* change init_mm */
@@ -10,10 +10,10 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pageattr.c ./arch/i386/mm/pageattr.
return;
spin_lock_irqsave(&pgd_lock, flags);
-diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
---- ../orig-linux-2.6.17/arch/i386/mm/pgtable.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/mm/pgtable.c 2007-01-08 15:32:50.000000000 +0000
-@@ -215,9 +215,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
+diff -pruN ../orig-linux-2.6.18/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
+--- ../orig-linux-2.6.18/arch/i386/mm/pgtable.c 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/mm/pgtable.c 2007-01-12 18:11:06.000000000 +0000
+@@ -214,9 +214,10 @@ void pgd_ctor(void *pgd, kmem_cache_t *c
spin_lock_irqsave(&pgd_lock, flags);
}
@@ -27,7 +27,7 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
if (PTRS_PER_PMD > 1)
return;
-@@ -249,6 +250,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
+@@ -248,6 +249,30 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
goto out_oom;
set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
}
@@ -58,7 +58,7 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
return pgd;
out_oom:
-@@ -263,9 +288,23 @@ void pgd_free(pgd_t *pgd)
+@@ -262,9 +287,23 @@ void pgd_free(pgd_t *pgd)
int i;
/* in the PAE case user pgd entries are overwritten before usage */
@@ -85,9 +85,9 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/mm/pgtable.c ./arch/i386/mm/pgtable.c
/* in the non-PAE case, free_pgtables() clears user pgd entries */
kmem_cache_free(pgd_cache, pgd);
}
-diff -pruN ../orig-linux-2.6.17/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h
---- ../orig-linux-2.6.17/include/asm-i386/pgtable-2level-defs.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-i386/pgtable-2level-defs.h 2007-01-08 15:32:50.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h ./include/asm-i386/pgtable-2level-defs.h
+--- ../orig-linux-2.6.18/include/asm-i386/pgtable-2level-defs.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/pgtable-2level-defs.h 2007-01-12 18:11:06.000000000 +0000
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_2LEVEL_DEFS_H
#define _I386_PGTABLE_2LEVEL_DEFS_H
@@ -97,9 +97,9 @@ diff -pruN ../orig-linux-2.6.17/include/asm-i386/pgtable-2level-defs.h ./include
/*
* traditional i386 two-level paging structure:
*/
-diff -pruN ../orig-linux-2.6.17/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h
---- ../orig-linux-2.6.17/include/asm-i386/pgtable-3level-defs.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-i386/pgtable-3level-defs.h 2007-01-08 15:32:50.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h ./include/asm-i386/pgtable-3level-defs.h
+--- ../orig-linux-2.6.18/include/asm-i386/pgtable-3level-defs.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-i386/pgtable-3level-defs.h 2007-01-12 18:11:06.000000000 +0000
@@ -1,6 +1,8 @@
#ifndef _I386_PGTABLE_3LEVEL_DEFS_H
#define _I386_PGTABLE_3LEVEL_DEFS_H
diff --git a/patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch b/patches/linux-2.6.18/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
index 813b85b9ad..fcad5ab90d 100644
--- a/patches/linux-2.6.17/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
+++ b/patches/linux-2.6.18/rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
@@ -1,16 +1,16 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S
---- ../orig-linux-2.6.17/arch/i386/kernel/entry.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/entry.S 2007-01-08 15:33:41.000000000 +0000
-@@ -177,7 +177,7 @@ need_resched:
-
- # sysenter call handler stub
- ENTRY(sysenter_entry)
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/entry.S ./arch/i386/kernel/entry.S
+--- ../orig-linux-2.6.18/arch/i386/kernel/entry.S 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/kernel/entry.S 2007-01-12 18:12:31.000000000 +0000
+@@ -269,7 +269,7 @@ ENTRY(sysenter_entry)
+ CFI_STARTPROC simple
+ CFI_DEF_CFA esp, 0
+ CFI_REGISTER esp, ebp
- movl TSS_sysenter_esp0(%esp),%esp
+ movl SYSENTER_stack_esp0(%esp),%esp
sysenter_past_esp:
- sti
- pushl $(__USER_DS)
-@@ -496,7 +496,7 @@ device_not_available_emulate:
+ /*
+ * No need to follow this irqs on/off section: the syscall
+@@ -689,7 +689,7 @@ device_not_available_emulate:
* that sets up the real kernel stack. Check here, since we can't
* allow the wrong stack to be used.
*
@@ -19,7 +19,7 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/entry.S ./arch/i386/kernel/entr
* already pushed 3 words if it hits on the sysenter instruction:
* eflags, cs and eip.
*
-@@ -508,7 +508,7 @@ device_not_available_emulate:
+@@ -701,7 +701,7 @@ device_not_available_emulate:
cmpw $__KERNEL_CS,4(%esp); \
jne ok; \
label: \
diff --git a/patches/linux-2.6.17/series b/patches/linux-2.6.18/series
index 07bbfe8397..8917c01dfb 100644
--- a/patches/linux-2.6.17/series
+++ b/patches/linux-2.6.18/series
@@ -1,30 +1,20 @@
-git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch
-git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch
git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
blktap-aio-16_03_06.patch
-fix-hz-suspend.patch
fix-ide-cd-pio-mode.patch
i386-mach-io-check-nmi.patch
ipv6-no-autoconf.patch
net-csum.patch
-net-gso-0-base.patch
-net-gso-1-check-dodgy.patch
-net-gso-2-checksum-fix.patch
-net-gso-3-fix-errorcheck.patch
-net-gso-4-kill-warnon.patch
net-gso-5-rcv-mss.patch
net-gso-6-linear-segmentation.patch
pmd-shared.patch
rename-TSS_sysenter_esp0-SYSENTER_stack_esp0.patch
-x86-increase-interrupt-vector-range.patch
xen-hotplug.patch
xenoprof-generic.patch
x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
git-dbaab49f92ff6ae6255762a948375e4036cbdbd2.patch
x86-elfnote-as-preprocessor-macro.patch
-vsnprintf.patch
-kasprintf.patch
+fixaddr-top.patch
diff --git a/patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch b/patches/linux-2.6.18/x86-elfnote-as-preprocessor-macro.patch
index caa9fb451f..79054fc191 100644
--- a/patches/linux-2.6.17/x86-elfnote-as-preprocessor-macro.patch
+++ b/patches/linux-2.6.18/x86-elfnote-as-preprocessor-macro.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/include/linux/elfnote.h ./include/linux/elfnote.h
---- ../orig-linux-2.6.17/include/linux/elfnote.h 2007-01-08 15:37:15.000000000 +0000
-+++ ./include/linux/elfnote.h 2007-01-08 15:37:52.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/linux/elfnote.h ./include/linux/elfnote.h
+--- ../orig-linux-2.6.18/include/linux/elfnote.h 2007-01-12 18:19:44.000000000 +0000
++++ ./include/linux/elfnote.h 2007-01-12 18:21:02.000000000 +0000
@@ -31,22 +31,24 @@
/*
* Generate a structure with the same shape as Elf{32,64}_Nhdr (which
diff --git a/patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch b/patches/linux-2.6.18/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
index 63601d613f..c59e7cebdd 100644
--- a/patches/linux-2.6.17/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
+++ b/patches/linux-2.6.18/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S
---- ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/i386/kernel/vmlinux.lds.S 2007-01-08 15:37:15.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kernel/vmlinux.lds.S
+--- ../orig-linux-2.6.18/arch/i386/kernel/vmlinux.lds.S 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/i386/kernel/vmlinux.lds.S 2007-01-12 18:19:44.000000000 +0000
@@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386"
OUTPUT_ARCH(i386)
ENTRY(phys_startup_32)
@@ -23,7 +23,7 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kerne
_etext = .; /* End of text section */
-@@ -41,7 +47,7 @@ SECTIONS
+@@ -48,7 +54,7 @@ SECTIONS
.data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
*(.data)
CONSTRUCTORS
@@ -32,26 +32,26 @@ diff -pruN ../orig-linux-2.6.17/arch/i386/kernel/vmlinux.lds.S ./arch/i386/kerne
. = ALIGN(4096);
__nosave_begin = .;
-@@ -168,4 +174,6 @@ SECTIONS
+@@ -184,4 +190,6 @@ SECTIONS
STABS_DEBUG
DWARF_DEBUG
+
+ NOTES
}
-diff -pruN ../orig-linux-2.6.17/include/asm-generic/vmlinux.lds.h ./include/asm-generic/vmlinux.lds.h
---- ../orig-linux-2.6.17/include/asm-generic/vmlinux.lds.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/asm-generic/vmlinux.lds.h 2007-01-08 15:37:15.000000000 +0000
-@@ -166,3 +166,6 @@
+diff -pruN ../orig-linux-2.6.18/include/asm-generic/vmlinux.lds.h ./include/asm-generic/vmlinux.lds.h
+--- ../orig-linux-2.6.18/include/asm-generic/vmlinux.lds.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/asm-generic/vmlinux.lds.h 2007-01-12 18:19:44.000000000 +0000
+@@ -194,3 +194,6 @@
.stab.index 0 : { *(.stab.index) } \
.stab.indexstr 0 : { *(.stab.indexstr) } \
.comment 0 : { *(.comment) }
+
+#define NOTES \
+ .notes : { *(.note.*) } :note
-diff -pruN ../orig-linux-2.6.17/include/linux/elfnote.h ./include/linux/elfnote.h
---- ../orig-linux-2.6.17/include/linux/elfnote.h 1970-01-01 01:00:00.000000000 +0100
-+++ ./include/linux/elfnote.h 2007-01-08 15:37:15.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/linux/elfnote.h ./include/linux/elfnote.h
+--- ../orig-linux-2.6.18/include/linux/elfnote.h 1970-01-01 01:00:00.000000000 +0100
++++ ./include/linux/elfnote.h 2007-01-12 18:19:44.000000000 +0000
@@ -0,0 +1,88 @@
+#ifndef _LINUX_ELFNOTE_H
+#define _LINUX_ELFNOTE_H
diff --git a/patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch b/patches/linux-2.6.18/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
index 60e92deb8a..18cbebf4dd 100644
--- a/patches/linux-2.6.17/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
+++ b/patches/linux-2.6.18/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
@@ -1,7 +1,7 @@
-diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S
---- ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S 2006-06-18 02:49:35.000000000 +0100
-+++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-08 15:37:29.000000000 +0000
-@@ -14,6 +14,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
+diff -pruN ../orig-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/kernel/vmlinux.lds.S
+--- ../orig-linux-2.6.18/arch/x86_64/kernel/vmlinux.lds.S 2006-09-20 04:42:06.000000000 +0100
++++ ./arch/x86_64/kernel/vmlinux.lds.S 2007-01-12 18:20:02.000000000 +0000
+@@ -13,6 +13,12 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86
OUTPUT_ARCH(i386:x86-64)
ENTRY(phys_startup_64)
jiffies_64 = jiffies;
@@ -14,7 +14,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
SECTIONS
{
. = __START_KERNEL;
-@@ -32,7 +38,7 @@ SECTIONS
+@@ -31,7 +37,7 @@ SECTIONS
KPROBES_TEXT
*(.fixup)
*(.gnu.warning)
@@ -23,7 +23,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
/* out-of-line lock text */
.text.lock : AT(ADDR(.text.lock) - LOAD_OFFSET) { *(.text.lock) }
-@@ -49,17 +55,10 @@ SECTIONS
+@@ -57,17 +63,10 @@ SECTIONS
.data : AT(ADDR(.data) - LOAD_OFFSET) {
*(.data)
CONSTRUCTORS
@@ -42,7 +42,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
. = ALIGN(PAGE_SIZE);
. = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) {
-@@ -81,7 +80,7 @@ SECTIONS
+@@ -89,7 +88,7 @@ SECTIONS
#define VVIRT(x) (ADDR(x) - VVIRT_OFFSET)
. = VSYSCALL_ADDR;
@@ -51,7 +51,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
__vsyscall_0 = VSYSCALL_VIRT_ADDR;
. = ALIGN(CONFIG_X86_L1_CACHE_BYTES);
-@@ -124,7 +123,7 @@ SECTIONS
+@@ -132,7 +131,7 @@ SECTIONS
. = ALIGN(8192); /* init_task */
.data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
*(.data.init_task)
@@ -60,7 +60,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
. = ALIGN(4096);
.data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-@@ -194,6 +193,14 @@ SECTIONS
+@@ -222,6 +221,14 @@ SECTIONS
. = ALIGN(4096);
__nosave_end = .;
@@ -75,7 +75,7 @@ diff -pruN ../orig-linux-2.6.17/arch/x86_64/kernel/vmlinux.lds.S ./arch/x86_64/k
_end = . ;
/* Sections to be discarded */
-@@ -207,4 +214,6 @@ SECTIONS
+@@ -235,4 +242,6 @@ SECTIONS
STABS_DEBUG
DWARF_DEBUG
diff --git a/patches/linux-2.6.17/xen-hotplug.patch b/patches/linux-2.6.18/xen-hotplug.patch
index 4e0a8e7809..817e3ddb01 100644
--- a/patches/linux-2.6.17/xen-hotplug.patch
+++ b/patches/linux-2.6.18/xen-hotplug.patch
@@ -1,12 +1,12 @@
-diff -pruN ../orig-linux-2.6.17/fs/proc/proc_misc.c ./fs/proc/proc_misc.c
---- ../orig-linux-2.6.17/fs/proc/proc_misc.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./fs/proc/proc_misc.c 2007-01-08 15:36:49.000000000 +0000
-@@ -467,7 +467,7 @@ static int show_stat(struct seq_file *p,
+diff -pruN ../orig-linux-2.6.18/fs/proc/proc_misc.c ./fs/proc/proc_misc.c
+--- ../orig-linux-2.6.18/fs/proc/proc_misc.c 2006-09-20 04:42:06.000000000 +0100
++++ ./fs/proc/proc_misc.c 2007-01-12 18:18:36.000000000 +0000
+@@ -471,7 +471,7 @@ static int show_stat(struct seq_file *p,
(unsigned long long)cputime64_to_clock_t(irq),
(unsigned long long)cputime64_to_clock_t(softirq),
(unsigned long long)cputime64_to_clock_t(steal));
- for_each_online_cpu(i) {
-+ for_each_cpu(i) {
++ for_each_possible_cpu(i) {
/* Copy values here to work around gcc-2.95.3, gcc-2.96 */
user = kstat_cpu(i).cpustat.user;
diff --git a/patches/linux-2.6.17/xenoprof-generic.patch b/patches/linux-2.6.18/xenoprof-generic.patch
index 8dd9d0f5c0..0e05586df1 100644
--- a/patches/linux-2.6.17/xenoprof-generic.patch
+++ b/patches/linux-2.6.18/xenoprof-generic.patch
@@ -1,6 +1,6 @@
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c ./drivers/oprofile/buffer_sync.c
---- ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/buffer_sync.c 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/buffer_sync.c ./drivers/oprofile/buffer_sync.c
+--- ../orig-linux-2.6.18/drivers/oprofile/buffer_sync.c 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/buffer_sync.c 2007-01-12 18:19:28.000000000 +0000
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -93,7 +93,7 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c ./drivers/oprofil
unsigned long available;
+ int domain_switch = 0;
- down(&buffer_sem);
+ mutex_lock(&buffer_mutex);
add_cpu_switch(cpu);
@@ -167,10 +167,10 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/buffer_sync.c ./drivers/oprofil
+
mark_done(cpu);
- up(&buffer_sem);
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.c ./drivers/oprofile/cpu_buffer.c
---- ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/cpu_buffer.c 2007-01-08 15:36:54.000000000 +0000
+ mutex_unlock(&buffer_mutex);
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/cpu_buffer.c ./drivers/oprofile/cpu_buffer.c
+--- ../orig-linux-2.6.18/drivers/oprofile/cpu_buffer.c 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/cpu_buffer.c 2007-01-12 18:18:50.000000000 +0000
@@ -6,6 +6,10 @@
*
* @author John Levon <levon@movementarian.org>
@@ -279,9 +279,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.c ./drivers/oprofile
/*
* This serves to avoid cpu buffer overflow, and makes sure
* the task mortuary progresses
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.h ./drivers/oprofile/cpu_buffer.h
---- ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/cpu_buffer.h 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/cpu_buffer.h ./drivers/oprofile/cpu_buffer.h
+--- ../orig-linux-2.6.18/drivers/oprofile/cpu_buffer.h 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/cpu_buffer.h 2007-01-12 18:18:50.000000000 +0000
@@ -36,7 +36,7 @@ struct oprofile_cpu_buffer {
volatile unsigned long tail_pos;
unsigned long buffer_size;
@@ -304,9 +304,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/cpu_buffer.h ./drivers/oprofile
+#define CPU_DOMAIN_SWITCH 4
#endif /* OPROFILE_CPU_BUFFER_H */
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/event_buffer.h ./drivers/oprofile/event_buffer.h
---- ../orig-linux-2.6.17/drivers/oprofile/event_buffer.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/event_buffer.h 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/event_buffer.h ./drivers/oprofile/event_buffer.h
+--- ../orig-linux-2.6.18/drivers/oprofile/event_buffer.h 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/event_buffer.h 2007-01-12 18:18:50.000000000 +0000
@@ -29,15 +29,20 @@ void wake_up_buffer_waiter(void);
#define CPU_SWITCH_CODE 2
#define COOKIE_SWITCH_CODE 3
@@ -329,9 +329,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/event_buffer.h ./drivers/oprofi
/* add data to the event buffer */
void add_event_entry(unsigned long data);
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.c ./drivers/oprofile/oprof.c
---- ../orig-linux-2.6.17/drivers/oprofile/oprof.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/oprof.c 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/oprof.c ./drivers/oprofile/oprof.c
+--- ../orig-linux-2.6.18/drivers/oprofile/oprof.c 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/oprof.c 2007-01-12 18:18:50.000000000 +0000
@@ -5,6 +5,10 @@
* @remark Read the file COPYING
*
@@ -352,7 +352,7 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.c ./drivers/oprofile/opro
struct oprofile_operations oprofile_ops;
unsigned long oprofile_started;
-@@ -33,6 +37,32 @@ static DECLARE_MUTEX(start_sem);
+@@ -33,6 +37,32 @@ static DEFINE_MUTEX(start_mutex);
*/
static int timer = 0;
@@ -385,9 +385,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.c ./drivers/oprofile/opro
int oprofile_setup(void)
{
int err;
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.h ./drivers/oprofile/oprof.h
---- ../orig-linux-2.6.17/drivers/oprofile/oprof.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/oprof.h 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/oprof.h ./drivers/oprofile/oprof.h
+--- ../orig-linux-2.6.18/drivers/oprofile/oprof.h 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/oprof.h 2007-01-12 18:18:50.000000000 +0000
@@ -35,5 +35,8 @@ void oprofile_create_files(struct super_
void oprofile_timer_init(struct oprofile_operations * ops);
@@ -397,9 +397,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprof.h ./drivers/oprofile/opro
+int oprofile_set_passive(int passive_domains[], unsigned int pdomains);
#endif /* OPROF_H */
-diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprofile_files.c ./drivers/oprofile/oprofile_files.c
---- ../orig-linux-2.6.17/drivers/oprofile/oprofile_files.c 2006-06-18 02:49:35.000000000 +0100
-+++ ./drivers/oprofile/oprofile_files.c 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/drivers/oprofile/oprofile_files.c ./drivers/oprofile/oprofile_files.c
+--- ../orig-linux-2.6.18/drivers/oprofile/oprofile_files.c 2006-09-20 04:42:06.000000000 +0100
++++ ./drivers/oprofile/oprofile_files.c 2007-01-12 18:18:50.000000000 +0000
@@ -5,15 +5,21 @@
* @remark Read the file COPYING
*
@@ -627,9 +627,9 @@ diff -pruN ../orig-linux-2.6.17/drivers/oprofile/oprofile_files.c ./drivers/opro
oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops);
oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size);
oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed);
-diff -pruN ../orig-linux-2.6.17/include/linux/oprofile.h ./include/linux/oprofile.h
---- ../orig-linux-2.6.17/include/linux/oprofile.h 2006-06-18 02:49:35.000000000 +0100
-+++ ./include/linux/oprofile.h 2007-01-08 15:36:54.000000000 +0000
+diff -pruN ../orig-linux-2.6.18/include/linux/oprofile.h ./include/linux/oprofile.h
+--- ../orig-linux-2.6.18/include/linux/oprofile.h 2006-09-20 04:42:06.000000000 +0100
++++ ./include/linux/oprofile.h 2007-01-12 18:18:50.000000000 +0000
@@ -16,6 +16,8 @@
#include <linux/types.h>
#include <linux/spinlock.h>