]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.36 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Dec 2010 22:02:52 +0000 (14:02 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Dec 2010 22:02:52 +0000 (14:02 -0800)
queue-2.6.36/nmi-fix-clock-comparator-revalidation.patch [new file with mode: 0644]
queue-2.6.36/r8169-fix-checksum-broken.patch [new file with mode: 0644]
queue-2.6.36/r8169-fix-rx-checksum-offload.patch [new file with mode: 0644]
queue-2.6.36/r8169-re-init-phy-on-resume.patch [new file with mode: 0644]
queue-2.6.36/r8169-revert-handle-rxfifo-errors-on-8168-chips.patch [new file with mode: 0644]
queue-2.6.36/series

diff --git a/queue-2.6.36/nmi-fix-clock-comparator-revalidation.patch b/queue-2.6.36/nmi-fix-clock-comparator-revalidation.patch
new file mode 100644 (file)
index 0000000..e2a14fc
--- /dev/null
@@ -0,0 +1,93 @@
+From e8129c642155616d9e2160a75f103e127c8c3708 Mon Sep 17 00:00:00 2001
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+Date: Thu, 25 Nov 2010 09:52:45 +0100
+Subject: [S390] nmi: fix clock comparator revalidation
+
+From: Heiko Carstens <heiko.carstens@de.ibm.com>
+
+commit e8129c642155616d9e2160a75f103e127c8c3708 upstream.
+
+On each machine check all registers are revalidated. The save area for
+the clock comparator however only contains the upper most seven bytes
+of the former contents, if valid.
+Therefore the machine check handler uses a store clock instruction to
+get the current time and writes that to the clock comparator register
+which in turn will generate an immediate timer interrupt.
+However within the lowcore the expected time of the next timer
+interrupt is stored. If the interrupt happens before that time the
+handler won't be called. In turn the clock comparator won't be
+reprogrammed and therefore the interrupt condition stays pending which
+causes an interrupt loop until the expected time is reached.
+
+On NOHZ machines this can result in unresponsive machines since the
+time of the next expected interrupted can be a couple of days in the
+future.
+
+To fix this just revalidate the clock comparator register with the
+expected value.
+In addition the special handling for udelay must be changed as well.
+
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/s390/kernel/nmi.c |   10 ++++------
+ arch/s390/lib/delay.c  |   14 +++++++++-----
+ 2 files changed, 13 insertions(+), 11 deletions(-)
+
+--- a/arch/s390/kernel/nmi.c
++++ b/arch/s390/kernel/nmi.c
+@@ -95,7 +95,6 @@ EXPORT_SYMBOL_GPL(s390_handle_mcck);
+ static int notrace s390_revalidate_registers(struct mci *mci)
+ {
+       int kill_task;
+-      u64 tmpclock;
+       u64 zero;
+       void *fpt_save_area, *fpt_creg_save_area;
+@@ -214,11 +213,10 @@ static int notrace s390_revalidate_regis
+                       : "0", "cc");
+ #endif
+       /* Revalidate clock comparator register */
+-      asm volatile(
+-              "       stck    0(%1)\n"
+-              "       sckc    0(%1)"
+-              : "=m" (tmpclock) : "a" (&(tmpclock)) : "cc", "memory");
+-
++      if (S390_lowcore.clock_comparator == -1)
++              set_clock_comparator(S390_lowcore.mcck_clock);
++      else
++              set_clock_comparator(S390_lowcore.clock_comparator);
+       /* Check if old PSW is valid */
+       if (!mci->wp)
+               /*
+--- a/arch/s390/lib/delay.c
++++ b/arch/s390/lib/delay.c
+@@ -29,17 +29,21 @@ static void __udelay_disabled(unsigned l
+ {
+       unsigned long mask, cr0, cr0_saved;
+       u64 clock_saved;
++      u64 end;
++      mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT;
++      end = get_clock() + (usecs << 12);
+       clock_saved = local_tick_disable();
+-      set_clock_comparator(get_clock() + (usecs << 12));
+       __ctl_store(cr0_saved, 0, 0);
+       cr0 = (cr0_saved & 0xffff00e0) | 0x00000800;
+       __ctl_load(cr0 , 0, 0);
+-      mask = psw_kernel_bits | PSW_MASK_WAIT | PSW_MASK_EXT;
+       lockdep_off();
+-      trace_hardirqs_on();
+-      __load_psw_mask(mask);
+-      local_irq_disable();
++      do {
++              set_clock_comparator(end);
++              trace_hardirqs_on();
++              __load_psw_mask(mask);
++              local_irq_disable();
++      } while (get_clock() < end);
+       lockdep_on();
+       __ctl_load(cr0_saved, 0, 0);
+       local_tick_enable(clock_saved);
diff --git a/queue-2.6.36/r8169-fix-checksum-broken.patch b/queue-2.6.36/r8169-fix-checksum-broken.patch
new file mode 100644 (file)
index 0000000..ba42cfb
--- /dev/null
@@ -0,0 +1,42 @@
+From d5d3ebe3be5c5123f2d444e186717f45284151e2 Mon Sep 17 00:00:00 2001
+From: Shan Wei <shanwei@cn.fujitsu.com>
+Date: Fri, 12 Nov 2010 00:15:25 +0000
+Subject: r8169: fix checksum broken
+
+From: Shan Wei <shanwei@cn.fujitsu.com>
+
+commit d5d3ebe3be5c5123f2d444e186717f45284151e2 upstream.
+
+If r8196 received packets with invalid sctp/igmp(not tcp, udp) checksum, r8196 set skb->ip_summed
+wit CHECKSUM_UNNECESSARY. This cause that upper protocol don't check checksum field.
+
+I am not family with r8196 driver. I try to guess the meaning of RxProtoIP and IPFail.
+RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
+!(opts1 & IPFail) is true means that driver correctly to check checksum in IPv4 header.
+
+If it's right, I think we should not set ip_summed wit CHECKSUM_UNNECESSARY for my sctp packets
+with invalid checksum.
+
+If it's not right, please tell me.
+
+Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
+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 |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -4460,8 +4460,7 @@ static inline void rtl8169_rx_csum(struc
+       u32 status = opts1 & RxProtoMask;
+       if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
+-          ((status == RxProtoUDP) && !(opts1 & UDPFail)) ||
+-          ((status == RxProtoIP) && !(opts1 & IPFail)))
++          ((status == RxProtoUDP) && !(opts1 & UDPFail)))
+               skb->ip_summed = CHECKSUM_UNNECESSARY;
+       else
+               skb->ip_summed = CHECKSUM_NONE;
diff --git a/queue-2.6.36/r8169-fix-rx-checksum-offload.patch b/queue-2.6.36/r8169-fix-rx-checksum-offload.patch
new file mode 100644 (file)
index 0000000..0bd9012
--- /dev/null
@@ -0,0 +1,63 @@
+From adea1ac7effbddbe60a9de6d63462bfe79289e59 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Sun, 5 Sep 2010 20:04:05 -0700
+Subject: r8169: fix rx checksum offload
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+commit adea1ac7effbddbe60a9de6d63462bfe79289e59 upstream.
+
+While porting GRO to r8169, I found this driver has a bug in its rx
+path.
+
+All skbs given to network stack had their ip_summed set to
+CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.
+
+The reason is driver sets skb->ip_summed on the original skb before the
+copy eventually done by copybreak. The fresh skb gets the ip_summed =
+CHECKSUM_NONE value, forcing network stack to recompute checksum, and
+preventing my GRO patch to work.
+
+Fix is to make the ip_summed setting after skb copy.
+
+Note : rx_copybreak current value is 16383, so all frames are copied...
+
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+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 |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -4455,9 +4455,8 @@ static inline int rtl8169_fragmented_fra
+       return (status & (FirstFrag | LastFrag)) != (FirstFrag | LastFrag);
+ }
+-static inline void rtl8169_rx_csum(struct sk_buff *skb, struct RxDesc *desc)
++static inline void rtl8169_rx_csum(struct sk_buff *skb, u32 opts1)
+ {
+-      u32 opts1 = le32_to_cpu(desc->opts1);
+       u32 status = opts1 & RxProtoMask;
+       if (((status == RxProtoTCP) && !(opts1 & TCPFail)) ||
+@@ -4551,8 +4550,6 @@ static int rtl8169_rx_interrupt(struct n
+                               continue;
+                       }
+-                      rtl8169_rx_csum(skb, desc);
+-
+                       if (rtl8169_try_rx_copy(&skb, tp, pkt_size, addr)) {
+                               dma_sync_single_for_device(&pdev->dev, addr,
+                                       pkt_size, PCI_DMA_FROMDEVICE);
+@@ -4563,6 +4560,7 @@ static int rtl8169_rx_interrupt(struct n
+                               tp->Rx_skbuff[entry] = NULL;
+                       }
++                      rtl8169_rx_csum(skb, status);
+                       skb_put(skb, pkt_size);
+                       skb->protocol = eth_type_trans(skb, dev);
diff --git a/queue-2.6.36/r8169-re-init-phy-on-resume.patch b/queue-2.6.36/r8169-re-init-phy-on-resume.patch
new file mode 100644 (file)
index 0000000..0d3c3fd
--- /dev/null
@@ -0,0 +1,43 @@
+From fccec10b33503a2b1197c8e7a3abd30443bedb08 Mon Sep 17 00:00:00 2001
+From: Stanislaw Gruszka <sgruszka@redhat.com>
+Date: Wed, 20 Oct 2010 22:25:42 +0000
+Subject: r8169: (re)init phy on resume
+
+From: Stanislaw Gruszka <sgruszka@redhat.com>
+
+commit fccec10b33503a2b1197c8e7a3abd30443bedb08 upstream.
+
+Fix switching device to low-speed mode after resume reported in:
+https://bugzilla.redhat.com/show_bug.cgi?id=502974
+
+Reported-and-tested-by: Laurentiu Badea <bugzilla-redhat@wotevah.com>
+Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Francois Romieu <romieu@fr.zoreil.com>
+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
+@@ -4889,6 +4889,9 @@ static int rtl8169_resume(struct device
+ {
+       struct pci_dev *pdev = to_pci_dev(device);
+       struct net_device *dev = pci_get_drvdata(pdev);
++      struct rtl8169_private *tp = netdev_priv(dev);
++
++      rtl8169_init_phy(dev, tp);
+       if (netif_running(dev))
+               __rtl8169_resume(dev);
+@@ -4929,6 +4932,8 @@ static int rtl8169_runtime_resume(struct
+       tp->saved_wolopts = 0;
+       spin_unlock_irq(&tp->lock);
++      rtl8169_init_phy(dev, tp);
++
+       __rtl8169_resume(dev);
+       return 0;
diff --git a/queue-2.6.36/r8169-revert-handle-rxfifo-errors-on-8168-chips.patch b/queue-2.6.36/r8169-revert-handle-rxfifo-errors-on-8168-chips.patch
new file mode 100644 (file)
index 0000000..8138379
--- /dev/null
@@ -0,0 +1,50 @@
+From 53f57357ff0afc37804f4e82ee3123e0c0a2cad6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
+Date: Mon, 8 Nov 2010 13:23:05 +0000
+Subject: r8169: revert "Handle rxfifo errors on 8168 chips"
+
+From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com>
+
+commit 53f57357ff0afc37804f4e82ee3123e0c0a2cad6 upstream.
+
+The original patch helps under obscure conditions (no pun) but
+some 8168 do not like it. The change needs to be tightened with
+a specific 8168 version.
+
+This reverts commit 801e147cde02f04b5c2f42764cd43a89fc7400a2
+("r8169: Handle rxfifo errors on 8168 chips").
+
+Regression at https://bugzilla.kernel.org/show_bug.cgi?id=20882
+
+Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
+Tested-by: Andreas Radke <a.radke@arcor.de>
+Cc: Matthew Garrett <mjg@redhat.com>
+Cc: Daniel J Blueman <daniel.blueman@gmail.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, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/r8169.c
++++ b/drivers/net/r8169.c
+@@ -2936,7 +2936,7 @@ static const struct rtl_cfg_info {
+               .hw_start       = rtl_hw_start_8168,
+               .region         = 2,
+               .align          = 8,
+-              .intr_event     = SYSErr | RxFIFOOver | LinkChg | RxOverflow |
++              .intr_event     = SYSErr | LinkChg | RxOverflow |
+                                 TxErr | TxOK | RxOK | RxErr,
+               .napi_event     = TxErr | TxOK | RxOK | RxOverflow,
+               .features       = RTL_FEATURE_GMII | RTL_FEATURE_MSI,
+@@ -4628,7 +4628,8 @@ static irqreturn_t rtl8169_interrupt(int
+               }
+               /* Work around for rx fifo overflow */
+-              if (unlikely(status & RxFIFOOver)) {
++              if (unlikely(status & RxFIFOOver) &&
++              (tp->mac_version == RTL_GIGA_MAC_VER_11)) {
+                       netif_stop_queue(dev);
+                       rtl8169_tx_timeout(dev);
+                       break;
index 7490bca4af89518f4099b46b15f33d44048119c4..aa28f99585b69c09de7508237d4109182e540d0c 100644 (file)
@@ -279,3 +279,8 @@ rds-integer-overflow-in-rds-cmsg-handling.patch
 cfg80211-fix-extension-channel-checks-to-initiate-communication.patch
 qla2xxx-add-module-parameter-to-enable-disable-gff_id-device-type-check.patch
 msp3400-fix-mute-audio-regression.patch
+r8169-fix-rx-checksum-offload.patch
+r8169-re-init-phy-on-resume.patch
+r8169-revert-handle-rxfifo-errors-on-8168-chips.patch
+r8169-fix-checksum-broken.patch
+nmi-fix-clock-comparator-revalidation.patch