]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.34 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Jul 2010 21:56:07 +0000 (14:56 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Jul 2010 21:56:07 +0000 (14:56 -0700)
15 files changed:
queue-2.6.34/bridge-fdb-cleanup-runs-too-often.patch [new file with mode: 0644]
queue-2.6.34/fix-mis-applied-upstream-commit-ac9721f3f54b27a16c7e1afb2481e7ee95a70318.patch [new file with mode: 0644]
queue-2.6.34/gro-fix-bogus-gso_size-on-the-first-fraglist-entry.patch [new file with mode: 0644]
queue-2.6.34/ipv6-fix-mobile-ipv6-regression.patch [new file with mode: 0644]
queue-2.6.34/net-dccp-expansion-of-error-code-size.patch [new file with mode: 0644]
queue-2.6.34/pegasus-fix-usb-device-id-for-etx-us2.patch [new file with mode: 0644]
queue-2.6.34/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch [new file with mode: 0644]
queue-2.6.34/r8169-fix-random-mdio_write-failures.patch [new file with mode: 0644]
queue-2.6.34/series [new file with mode: 0644]
queue-2.6.34/tcp-tcp_synack_options-fix.patch [new file with mode: 0644]
queue-2.6.34/tcp-use-correct-net-ns-in-cookie_v4_check.patch [new file with mode: 0644]
queue-2.6.34/usbnet-set-parent-device-early-for-netdev_printk.patch [new file with mode: 0644]
queue-2.6.34/virtio-pci-disable-msi-at-startup.patch [new file with mode: 0644]
queue-2.6.34/virtio-return-enomem-on-out-of-memory.patch [new file with mode: 0644]
queue-2.6.34/virtio_net-do-not-reschedule-rx-refill-forever.patch [new file with mode: 0644]

diff --git a/queue-2.6.34/bridge-fdb-cleanup-runs-too-often.patch b/queue-2.6.34/bridge-fdb-cleanup-runs-too-often.patch
new file mode 100644 (file)
index 0000000..f44135e
--- /dev/null
@@ -0,0 +1,46 @@
+From 63614f6e56d08c3f9b27742ae38b7988f0ebae9a Mon Sep 17 00:00:00 2001
+From: stephen hemminger <shemminger@vyatta.com>
+Date: Tue, 15 Jun 2010 06:14:12 +0000
+Subject: bridge: fdb cleanup runs too often
+
+From: stephen hemminger <shemminger@vyatta.com>
+
+[ Upstream commit 25442e06d20aaba7d7b16438078a562b3e4cf19b ]
+
+It is common in end-node, non STP bridges to set forwarding
+delay to zero; which causes the forwarding database cleanup
+to run every clock tick. Change to run only as soon as needed
+or at next ageing timer interval which ever is sooner.
+
+Use round_jiffies_up macro rather than attempting round up
+by changing value.
+
+Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/bridge/br_fdb.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/net/bridge/br_fdb.c
++++ b/net/bridge/br_fdb.c
+@@ -128,7 +128,7 @@ void br_fdb_cleanup(unsigned long _data)
+ {
+       struct net_bridge *br = (struct net_bridge *)_data;
+       unsigned long delay = hold_time(br);
+-      unsigned long next_timer = jiffies + br->forward_delay;
++      unsigned long next_timer = jiffies + br->ageing_time;
+       int i;
+       spin_lock_bh(&br->hash_lock);
+@@ -149,9 +149,7 @@ void br_fdb_cleanup(unsigned long _data)
+       }
+       spin_unlock_bh(&br->hash_lock);
+-      /* Add HZ/4 to ensure we round the jiffies upwards to be after the next
+-       * timer, otherwise we might round down and will have no-op run. */
+-      mod_timer(&br->gc_timer, round_jiffies(next_timer + HZ/4));
++      mod_timer(&br->gc_timer, round_jiffies_up(next_timer));
+ }
+ /* Completely flush all dynamic entries in forwarding database.*/
diff --git a/queue-2.6.34/fix-mis-applied-upstream-commit-ac9721f3f54b27a16c7e1afb2481e7ee95a70318.patch b/queue-2.6.34/fix-mis-applied-upstream-commit-ac9721f3f54b27a16c7e1afb2481e7ee95a70318.patch
new file mode 100644 (file)
index 0000000..ec81a12
--- /dev/null
@@ -0,0 +1,58 @@
+From JBeulich@novell.com  Fri Jul  9 14:53:14 2010
+From: "Jan Beulich" <JBeulich@novell.com>
+Date: Tue, 06 Jul 2010 11:09:00 +0100
+Subject: fix mis-applied upstream commit ac9721f3f54b27a16c7e1afb2481e7ee95a70318
+To: <stable@kernel.org>
+Cc: <a.p.zijlstra@chello.nl>, <mingo@elte.hu>, <gregkh@suse.de>
+Message-ID: <4C331CDC0200007800009B62@vpn.id2.novell.com>
+Content-Disposition: inline
+
+From: Jan Beulich <JBeulich@novell.com>
+
+For some reason one of the changes to sys_perf_event_open() got
+mis-applied, thus breaking (at least) error handling paths (pointed
+out by means of a compiler warning).
+
+Signed-off-by: Jan Beulich <jbeulich@novell.com>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/perf_event.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/kernel/perf_event.c
++++ b/kernel/perf_event.c
+@@ -4870,6 +4870,15 @@ SYSCALL_DEFINE5(perf_event_open,
+       if (event_fd < 0)
+               return event_fd;
++      /*
++       * Get the target context (task or percpu):
++       */
++      ctx = find_get_context(pid, cpu);
++      if (IS_ERR(ctx)) {
++              err = PTR_ERR(ctx);
++              goto err_fd;
++      }
++
+       if (group_fd != -1) {
+               group_leader = perf_fget_light(group_fd, &fput_needed);
+               if (IS_ERR(group_leader)) {
+@@ -4884,15 +4893,6 @@ SYSCALL_DEFINE5(perf_event_open,
+       }
+       /*
+-       * Get the target context (task or percpu):
+-       */
+-      ctx = find_get_context(pid, cpu);
+-      if (IS_ERR(ctx)) {
+-              err = PTR_ERR(ctx);
+-              goto err_fd;
+-      }
+-
+-      /*
+        * Look up the group leader (we will attach this event to it):
+        */
+       if (group_leader) {
diff --git a/queue-2.6.34/gro-fix-bogus-gso_size-on-the-first-fraglist-entry.patch b/queue-2.6.34/gro-fix-bogus-gso_size-on-the-first-fraglist-entry.patch
new file mode 100644 (file)
index 0000000..b19000c
--- /dev/null
@@ -0,0 +1,37 @@
+From f53a9619548bde7bbf97bbc2868b969cc67d422e Mon Sep 17 00:00:00 2001
+From: Herbert Xu <herbert@gondor.apana.org.au>
+Date: Thu, 20 May 2010 23:07:56 -0700
+Subject: gro: Fix bogus gso_size on the first fraglist entry
+
+
+From: Herbert Xu <herbert@gondor.apana.org.au>
+
+[ Upstream commit 622e0ca1cd4d459f5af4f2c65f4dc0dd823cb4c3 ]
+
+When GRO produces fraglist entries, and the resulting skb hits
+an interface that is incapable of TSO but capable of FRAGLIST,
+we end up producing a bogus packet with gso_size non-zero.
+
+This was reported in the field with older versions of KVM that
+did not set the TSO bits on tuntap.
+
+This patch fixes that.
+
+Reported-by: Igor Zhang <yugzhang@redhat.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/core/skbuff.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -2729,6 +2729,7 @@ int skb_gro_receive(struct sk_buff **hea
+       *NAPI_GRO_CB(nskb) = *NAPI_GRO_CB(p);
+       skb_shinfo(nskb)->frag_list = p;
+       skb_shinfo(nskb)->gso_size = pinfo->gso_size;
++      pinfo->gso_size = 0;
+       skb_header_release(p);
+       nskb->prev = p;
diff --git a/queue-2.6.34/ipv6-fix-mobile-ipv6-regression.patch b/queue-2.6.34/ipv6-fix-mobile-ipv6-regression.patch
new file mode 100644 (file)
index 0000000..8c76129
--- /dev/null
@@ -0,0 +1,36 @@
+From 56726a53d87ed750be1b3c82aa871d4b6e460d9e Mon Sep 17 00:00:00 2001
+From: Brian Haley <brian.haley@hp.com>
+Date: Fri, 28 May 2010 23:02:35 -0700
+Subject: IPv6: fix Mobile IPv6 regression
+
+
+From: Brian Haley <brian.haley@hp.com>
+
+[ Upstream commit 6057fd78a8dcce6269f029b967051d5a2e9b0895 ]
+
+Commit f4f914b5 (net: ipv6 bind to device issue) caused
+a regression with Mobile IPv6 when it changed the meaning
+of fl->oif to become a strict requirement of the route
+lookup.  Instead, only force strict mode when
+sk->sk_bound_dev_if is set on the calling socket, getting
+the intended behavior and fixing the regression.
+
+Tested-by: Arnaud Ebalard <arno@natisbad.org>
+Signed-off-by: Brian Haley <brian.haley@hp.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/ipv6/route.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -815,7 +815,7 @@ struct dst_entry * ip6_route_output(stru
+ {
+       int flags = 0;
+-      if (fl->oif || rt6_need_strict(&fl->fl6_dst))
++      if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl->fl6_dst))
+               flags |= RT6_LOOKUP_F_IFACE;
+       if (!ipv6_addr_any(&fl->fl6_src))
diff --git a/queue-2.6.34/net-dccp-expansion-of-error-code-size.patch b/queue-2.6.34/net-dccp-expansion-of-error-code-size.patch
new file mode 100644 (file)
index 0000000..dfd751e
--- /dev/null
@@ -0,0 +1,43 @@
+From e72479abad6eacc078abca6e96a1b7a7e1fc5389 Mon Sep 17 00:00:00 2001
+From: Yoichi Yuasa <yuasa@linux-mips.org>
+Date: Mon, 24 May 2010 18:37:02 -0700
+Subject: net/dccp: expansion of error code size
+
+
+From: Yoichi Yuasa <yuasa@linux-mips.org>
+
+[ Upstream commit d9b52dc6fd1fbb2bad645cbc86a60f984c1cb179 ]
+
+Because MIPS's EDQUOT value is 1133(0x46d).
+It's larger than u8.
+
+Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/dccp/input.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/net/dccp/input.c
++++ b/net/dccp/input.c
+@@ -124,9 +124,9 @@ static int dccp_rcv_closereq(struct sock
+       return queued;
+ }
+-static u8 dccp_reset_code_convert(const u8 code)
++static u16 dccp_reset_code_convert(const u8 code)
+ {
+-      const u8 error_code[] = {
++      const u16 error_code[] = {
+       [DCCP_RESET_CODE_CLOSED]             = 0,       /* normal termination */
+       [DCCP_RESET_CODE_UNSPECIFIED]        = 0,       /* nothing known */
+       [DCCP_RESET_CODE_ABORTED]            = ECONNRESET,
+@@ -148,7 +148,7 @@ static u8 dccp_reset_code_convert(const
+ static void dccp_rcv_reset(struct sock *sk, struct sk_buff *skb)
+ {
+-      u8 err = dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code);
++      u16 err = dccp_reset_code_convert(dccp_hdr_reset(skb)->dccph_reset_code);
+       sk->sk_err = err;
diff --git a/queue-2.6.34/pegasus-fix-usb-device-id-for-etx-us2.patch b/queue-2.6.34/pegasus-fix-usb-device-id-for-etx-us2.patch
new file mode 100644 (file)
index 0000000..f0bda04
--- /dev/null
@@ -0,0 +1,45 @@
+From c99bb96ddc2d98bf98ff49143d7d84f5bd54b44e Mon Sep 17 00:00:00 2001
+From: Tadashi Abe <tabe@mvista.com>
+Date: Mon, 17 May 2010 22:41:45 -0700
+Subject: pegasus: fix USB device ID for ETX-US2
+
+
+From: Tadashi Abe <tabe@mvista.com>
+
+[ Upstream commit 95718c1c25370b2c85061a4d8dfab2831b3ad280 ]
+
+USB device ID definition for I-O Data ETX-US2 is wrong.
+Correct ID is 0x093a. Here's snippet from /proc/bus/usb/devices;
+
+T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=04bb ProdID=093a Rev= 1.01
+S:  Manufacturer=I-O DATA DEVICE,INC.
+S:  Product=I-O DATA ETX2-US2
+S:  SerialNumber=A26427
+C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=224mA
+I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=pegasus
+E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=125us
+
+This patch enables pegasus driver to work fine with ETX-US2.
+
+Signed-off-by: Tadashi Abe <tabe@mvista.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/net/usb/pegasus.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/pegasus.h
++++ b/drivers/net/usb/pegasus.h
+@@ -256,7 +256,7 @@ PEGASUS_DEV( "IO DATA USB ET/TX", VENDOR
+               DEFAULT_GPIO_RESET )
+ PEGASUS_DEV( "IO DATA USB ET/TX-S", VENDOR_IODATA, 0x0913,
+               DEFAULT_GPIO_RESET | PEGASUS_II )
+-PEGASUS_DEV( "IO DATA USB ETX-US2", VENDOR_IODATA, 0x092a,
++PEGASUS_DEV( "IO DATA USB ETX-US2", VENDOR_IODATA, 0x093a,
+               DEFAULT_GPIO_RESET | PEGASUS_II )
+ PEGASUS_DEV( "Kingston KNU101TX Ethernet", VENDOR_KINGSTON, 0x000a,
+               DEFAULT_GPIO_RESET)
diff --git a/queue-2.6.34/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch b/queue-2.6.34/r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
new file mode 100644 (file)
index 0000000..c4b1c45
--- /dev/null
@@ -0,0 +1,51 @@
+From e437c8a7415f0e6b04b8dfcf5aa72c7d07619726 Mon Sep 17 00:00:00 2001
+From: Timo Teräs <timo.teras@iki.fi>
+Date: Wed, 9 Jun 2010 17:31:48 -0700
+Subject: r8169: fix mdio_read and update mdio_write according to hw specs
+
+
+From: Timo Teräs <timo.teras@iki.fi>
+
+[ Upstream commit 81a95f049962ec20a9aed888e676208b206f0f2e ]
+
+Realtek confirmed that a 20us delay is needed after mdio_read and
+mdio_write operations. Reduce the delay in mdio_write, and add it
+to mdio_read too. Also add a comment that the 20us is from hw specs.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Acked-by: Francois Romieu <romieu@fr.zoreil.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/net/r8169.c |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -558,10 +558,10 @@ static void mdio_write(void __iomem *ioa
+               udelay(25);
+       }
+       /*
+-       * Some configurations require a small delay even after the write
+-       * completed indication or the next write might fail.
++       * According to hardware specs a 20us delay is required after write
++       * complete indication, but before sending next command.
+        */
+-      udelay(25);
++      udelay(20);
+ }
+ static int mdio_read(void __iomem *ioaddr, int reg_addr)
+@@ -581,6 +581,12 @@ static int mdio_read(void __iomem *ioadd
+               }
+               udelay(25);
+       }
++      /*
++       * According to hardware specs a 20us delay is required after read
++       * complete indication, but before sending next command.
++       */
++      udelay(20);
++
+       return value;
+ }
diff --git a/queue-2.6.34/r8169-fix-random-mdio_write-failures.patch b/queue-2.6.34/r8169-fix-random-mdio_write-failures.patch
new file mode 100644 (file)
index 0000000..8e5ed80
--- /dev/null
@@ -0,0 +1,46 @@
+From 8684c75ffd22e6d46ad0b032588ce8794136c5b7 Mon Sep 17 00:00:00 2001
+From: Timo Teräs <timo.teras@iki.fi>
+Date: Sun, 6 Jun 2010 15:38:47 -0700
+Subject: r8169: fix random mdio_write failures
+
+
+From: Timo Teräs <timo.teras@iki.fi>
+
+[ Upstream commit 024a07bacf8287a6ddfa83e9d5b951c5e8b4070e ]
+
+Some configurations need delay between the "write completed" indication
+and new write to work reliably.
+
+Realtek driver seems to use longer delay when polling the "write complete"
+bit, so it waits long enough between writes with high probability (but
+could probably break too). This patch adds a new udelay to make sure we
+wait unconditionally some time after the write complete indication.
+
+This caused a regression with XID 18000000 boards when the board specific
+phy configuration writing many mdio registers was added in commit
+2e955856ff (r8169: phy init for the 8169scd). Some of the configration
+mdio writes would almost always fail, and depending on failure might leave
+the PHY in non-working state.
+
+Signed-off-by: Timo Teräs <timo.teras@iki.fi>
+Acked-off-by: Francois Romieu <romieu@fr.zoreil.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/net/r8169.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -557,6 +557,11 @@ static void mdio_write(void __iomem *ioa
+                       break;
+               udelay(25);
+       }
++      /*
++       * Some configurations require a small delay even after the write
++       * completed indication or the next write might fail.
++       */
++      udelay(25);
+ }
+ static int mdio_read(void __iomem *ioaddr, int reg_addr)
diff --git a/queue-2.6.34/series b/queue-2.6.34/series
new file mode 100644 (file)
index 0000000..cd29a6d
--- /dev/null
@@ -0,0 +1,14 @@
+virtio-pci-disable-msi-at-startup.patch
+virtio-return-enomem-on-out-of-memory.patch
+virtio_net-do-not-reschedule-rx-refill-forever.patch
+bridge-fdb-cleanup-runs-too-often.patch
+net-dccp-expansion-of-error-code-size.patch
+gro-fix-bogus-gso_size-on-the-first-fraglist-entry.patch
+ipv6-fix-mobile-ipv6-regression.patch
+pegasus-fix-usb-device-id-for-etx-us2.patch
+r8169-fix-random-mdio_write-failures.patch
+r8169-fix-mdio_read-and-update-mdio_write-according-to-hw-specs.patch
+tcp-tcp_synack_options-fix.patch
+tcp-use-correct-net-ns-in-cookie_v4_check.patch
+usbnet-set-parent-device-early-for-netdev_printk.patch
+fix-mis-applied-upstream-commit-ac9721f3f54b27a16c7e1afb2481e7ee95a70318.patch
diff --git a/queue-2.6.34/tcp-tcp_synack_options-fix.patch b/queue-2.6.34/tcp-tcp_synack_options-fix.patch
new file mode 100644 (file)
index 0000000..c1a2c18
--- /dev/null
@@ -0,0 +1,77 @@
+From 4479b472e68a086e12e4f15aaf54b77734c9eade Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Mon, 17 May 2010 22:35:36 -0700
+Subject: tcp: tcp_synack_options() fix
+
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+[ Upstream commit de213e5eedecdfb1b1eea7e6be28bc64cac5c078 ]
+
+Commit 33ad798c924b4a (tcp: options clean up) introduced a problem
+if MD5+SACK+timestamps were used in initial SYN message.
+
+Some stacks (old linux for example) try to negotiate MD5+SACK+TSTAMP
+sessions, but since 40 bytes of tcp options space are not enough to
+store all the bits needed, we chose to disable timestamps in this case.
+
+We send a SYN-ACK _without_ timestamp option, but socket has timestamps
+enabled and all further outgoing messages contain a TS block, all with
+the initial timestamp of the remote peer.
+
+Fix is to really disable timestamps option for the whole session.
+
+Reported-by: Bijay Singh <Bijay.Singh@guavus.com>
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/ipv4/tcp_output.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -667,7 +667,6 @@ static unsigned tcp_synack_options(struc
+       u8 cookie_plus = (xvp != NULL && !xvp->cookie_out_never) ?
+                        xvp->cookie_plus :
+                        0;
+-      bool doing_ts = ireq->tstamp_ok;
+ #ifdef CONFIG_TCP_MD5SIG
+       *md5 = tcp_rsk(req)->af_specific->md5_lookup(sk, req);
+@@ -680,7 +679,7 @@ static unsigned tcp_synack_options(struc
+                * rather than TS in order to fit in better with old,
+                * buggy kernels, but that was deemed to be unnecessary.
+                */
+-              doing_ts &= !ireq->sack_ok;
++              ireq->tstamp_ok &= !ireq->sack_ok;
+       }
+ #else
+       *md5 = NULL;
+@@ -695,7 +694,7 @@ static unsigned tcp_synack_options(struc
+               opts->options |= OPTION_WSCALE;
+               remaining -= TCPOLEN_WSCALE_ALIGNED;
+       }
+-      if (likely(doing_ts)) {
++      if (likely(ireq->tstamp_ok)) {
+               opts->options |= OPTION_TS;
+               opts->tsval = TCP_SKB_CB(skb)->when;
+               opts->tsecr = req->ts_recent;
+@@ -703,7 +702,7 @@ static unsigned tcp_synack_options(struc
+       }
+       if (likely(ireq->sack_ok)) {
+               opts->options |= OPTION_SACK_ADVERTISE;
+-              if (unlikely(!doing_ts))
++              if (unlikely(!ireq->tstamp_ok))
+                       remaining -= TCPOLEN_SACKPERM_ALIGNED;
+       }
+@@ -711,7 +710,7 @@ static unsigned tcp_synack_options(struc
+        * If the <SYN> options fit, the same options should fit now!
+        */
+       if (*md5 == NULL &&
+-          doing_ts &&
++          ireq->tstamp_ok &&
+           cookie_plus > TCPOLEN_COOKIE_BASE) {
+               int need = cookie_plus; /* has TCPOLEN_COOKIE_BASE */
diff --git a/queue-2.6.34/tcp-use-correct-net-ns-in-cookie_v4_check.patch b/queue-2.6.34/tcp-use-correct-net-ns-in-cookie_v4_check.patch
new file mode 100644 (file)
index 0000000..4bc1735
--- /dev/null
@@ -0,0 +1,30 @@
+From 27ebbcc92e9cd4d409cc66d824f1ac58b6c1d0bd Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Thu, 3 Jun 2010 05:45:47 +0000
+Subject: tcp: use correct net ns in cookie_v4_check()
+
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+[ Upstream commit c44649216522cd607a4027d2ebf4a8147d3fa94c ]
+
+Its better to make a route lookup in appropriate namespace.
+
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/ipv4/syncookies.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv4/syncookies.c
++++ b/net/ipv4/syncookies.c
+@@ -347,7 +347,7 @@ struct sock *cookie_v4_check(struct sock
+                                              { .sport = th->dest,
+                                                .dport = th->source } } };
+               security_req_classify_flow(req, &fl);
+-              if (ip_route_output_key(&init_net, &rt, &fl)) {
++              if (ip_route_output_key(sock_net(sk), &rt, &fl)) {
+                       reqsk_free(req);
+                       goto out;
+               }
diff --git a/queue-2.6.34/usbnet-set-parent-device-early-for-netdev_printk.patch b/queue-2.6.34/usbnet-set-parent-device-early-for-netdev_printk.patch
new file mode 100644 (file)
index 0000000..46b31ce
--- /dev/null
@@ -0,0 +1,42 @@
+From 99e33b4eb21fba0093d8502247fa578990609761 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Fri, 2 Jul 2010 21:49:02 -0700
+Subject: usbnet: Set parent device early for netdev_printk()
+
+
+From: Ben Hutchings <ben@decadent.org.uk>
+
+[ Upsteam commit 0dacca73a3ddefa6cb8a7e0282f938e01faa1a64 ]
+
+netdev_printk() follows the net_device's parent device pointer, so
+we must set that earlier than we previously did.
+
+Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/net/usb/usbnet.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/usb/usbnet.c
++++ b/drivers/net/usb/usbnet.c
+@@ -1290,6 +1290,9 @@ usbnet_probe (struct usb_interface *udev
+               goto out;
+       }
++      /* netdev_printk() needs this so do it as early as possible */
++      SET_NETDEV_DEV(net, &udev->dev);
++
+       dev = netdev_priv(net);
+       dev->udev = xdev;
+       dev->intf = udev;
+@@ -1374,8 +1377,6 @@ usbnet_probe (struct usb_interface *udev
+               dev->rx_urb_size = dev->hard_mtu;
+       dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1);
+-      SET_NETDEV_DEV(net, &udev->dev);
+-
+       if ((dev->driver_info->flags & FLAG_WLAN) != 0)
+               SET_NETDEV_DEVTYPE(net, &wlan_type);
+       if ((dev->driver_info->flags & FLAG_WWAN) != 0)
diff --git a/queue-2.6.34/virtio-pci-disable-msi-at-startup.patch b/queue-2.6.34/virtio-pci-disable-msi-at-startup.patch
new file mode 100644 (file)
index 0000000..a2ba4bc
--- /dev/null
@@ -0,0 +1,53 @@
+From b03214d559471359e2a85ae256686381d0672f29 Mon Sep 17 00:00:00 2001
+From: Michael S. Tsirkin <mst@redhat.com>
+Date: Wed, 23 Jun 2010 22:49:06 -0600
+Subject: virtio-pci: disable msi at startup
+
+From: Michael S. Tsirkin <mst@redhat.com>
+
+commit b03214d559471359e2a85ae256686381d0672f29 upstream.
+
+virtio-pci resets the device at startup by writing to the status
+register, but this does not clear the pci config space,
+specifically msi enable status which affects register
+layout.
+
+This breaks things like kdump when they try to use e.g. virtio-blk.
+
+Fix by forcing msi off at startup. Since pci.c already has
+a routine to do this, we export and use it instead of duplicating code.
+
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Tested-by: Vivek Goyal <vgoyal@redhat.com>
+Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
+Cc: linux-pci@vger.kernel.org
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/pci.c           |    1 +
+ drivers/virtio/virtio_pci.c |    3 +++
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/pci/pci.c
++++ b/drivers/pci/pci.c
+@@ -2294,6 +2294,7 @@ void pci_msi_off(struct pci_dev *dev)
+               pci_write_config_word(dev, pos + PCI_MSIX_FLAGS, control);
+       }
+ }
++EXPORT_SYMBOL_GPL(pci_msi_off);
+ #ifndef HAVE_ARCH_PCI_SET_DMA_MAX_SEGMENT_SIZE
+ int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size)
+--- a/drivers/virtio/virtio_pci.c
++++ b/drivers/virtio/virtio_pci.c
+@@ -636,6 +636,9 @@ static int __devinit virtio_pci_probe(st
+       INIT_LIST_HEAD(&vp_dev->virtqueues);
+       spin_lock_init(&vp_dev->lock);
++      /* Disable MSI/MSIX to bring device to a known good state. */
++      pci_msi_off(pci_dev);
++
+       /* enable the device */
+       err = pci_enable_device(pci_dev);
+       if (err)
diff --git a/queue-2.6.34/virtio-return-enomem-on-out-of-memory.patch b/queue-2.6.34/virtio-return-enomem-on-out-of-memory.patch
new file mode 100644 (file)
index 0000000..06eaa90
--- /dev/null
@@ -0,0 +1,32 @@
+From 686d363786a53ed28ee875b84ef24e6d5126ef6f Mon Sep 17 00:00:00 2001
+From: Michael S. Tsirkin <mst@redhat.com>
+Date: Thu, 10 Jun 2010 18:16:11 +0300
+Subject: virtio: return ENOMEM on out of memory
+
+From: Michael S. Tsirkin <mst@redhat.com>
+
+commit 686d363786a53ed28ee875b84ef24e6d5126ef6f upstream.
+
+add_buf returns ring size on out of memory,
+this is not what devices expect.
+
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Acked-by: Amit Shah <amit.shah@redhat.com>
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/virtio/virtio_ring.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/virtio/virtio_ring.c
++++ b/drivers/virtio/virtio_ring.c
+@@ -118,7 +118,7 @@ static int vring_add_indirect(struct vri
+       desc = kmalloc((out + in) * sizeof(struct vring_desc), GFP_ATOMIC);
+       if (!desc)
+-              return vq->vring.num;
++              return -ENOMEM;
+       /* Transfer entries from the sg list into the indirect page */
+       for (i = 0; i < out; i++) {
diff --git a/queue-2.6.34/virtio_net-do-not-reschedule-rx-refill-forever.patch b/queue-2.6.34/virtio_net-do-not-reschedule-rx-refill-forever.patch
new file mode 100644 (file)
index 0000000..b669f9c
--- /dev/null
@@ -0,0 +1,47 @@
+From 1788f49548860fa1c861ee3454d47b466c877e43 Mon Sep 17 00:00:00 2001
+From: Michael S. Tsirkin <mst@redhat.com>
+Date: Fri, 2 Jul 2010 16:32:55 +0000
+Subject: virtio_net: do not reschedule rx refill forever
+
+From: Michael S. Tsirkin <mst@redhat.com>
+
+commit 1788f49548860fa1c861ee3454d47b466c877e43 upstream.
+
+We currently fill all of RX ring, then add_buf
+returns ENOSPC, which gets mis-detected as an out of
+memory condition and causes us to reschedule the work,
+and so on forever. Fix this by oom = err == -ENOMEM;
+
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/virtio_net.c |    7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -417,7 +417,7 @@ static int add_recvbuf_mergeable(struct
+ static bool try_fill_recv(struct virtnet_info *vi, gfp_t gfp)
+ {
+       int err;
+-      bool oom = false;
++      bool oom;
+       do {
+               if (vi->mergeable_rx_bufs)
+@@ -427,10 +427,9 @@ static bool try_fill_recv(struct virtnet
+               else
+                       err = add_recvbuf_small(vi, gfp);
+-              if (err < 0) {
+-                      oom = true;
++              oom = err == -ENOMEM;
++              if (err < 0)
+                       break;
+-              }
+               ++vi->num;
+       } while (err > 0);
+       if (unlikely(vi->num > vi->max))