]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
start .27 queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 10 Sep 2009 22:34:55 +0000 (15:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 10 Sep 2009 22:34:55 +0000 (15:34 -0700)
queue-2.6.27/e100-fix-interaction-with-swiotlb-on-x86.patch [new file with mode: 0644]
queue-2.6.27/net-net_assign_generic-fix.patch [new file with mode: 0644]
queue-2.6.27/series [new file with mode: 0644]

diff --git a/queue-2.6.27/e100-fix-interaction-with-swiotlb-on-x86.patch b/queue-2.6.27/e100-fix-interaction-with-swiotlb-on-x86.patch
new file mode 100644 (file)
index 0000000..7a583de
--- /dev/null
@@ -0,0 +1,42 @@
+From 6a5b8fbb81c74441aa1d50855e56c3c30c3b283a Mon Sep 17 00:00:00 2001
+From: Krzysztof Hałasa <khc@pm.waw.pl>
+Date: Sun, 23 Aug 2009 19:02:13 -0700
+Subject: E100: fix interaction with swiotlb on X86.
+
+From: Krzysztof Hałasa <khc@pm.waw.pl>
+
+[ Upstream commit 6ff9c2e7fa8ca63a575792534b63c5092099c286 ]
+
+E100 places it's RX packet descriptors inside skb->data and uses them
+with bidirectional streaming DMA mapping. Data in descriptors is
+accessed simultaneously by the chip (writing status and size when
+a packet is received) and CPU (reading to check if the packet was
+received). This isn't a valid usage of PCI DMA API, which requires use
+of the coherent (consistent) memory for such purpose. Unfortunately e100
+chips working in "simplified" RX mode have to store received data
+directly after the descriptor. Fixing the driver to conform to the API
+would require using unsupported "flexible" RX mode or receiving data
+into a coherent memory and using CPU to copy it to network buffers.
+
+This patch, while not yet making the driver conform to the PCI DMA API,
+allows it to work correctly on X86 with swiotlb (while not breaking
+other architectures).
+
+Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/net/e100.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/e100.c
++++ b/drivers/net/e100.c
+@@ -1842,7 +1842,7 @@ static int e100_rx_indicate(struct nic *
+                               nic->ru_running = RU_SUSPENDED;
+               pci_dma_sync_single_for_device(nic->pdev, rx->dma_addr,
+                                              sizeof(struct rfd),
+-                                             PCI_DMA_BIDIRECTIONAL);
++                                             PCI_DMA_FROMDEVICE);
+               return -ENODATA;
+       }
diff --git a/queue-2.6.27/net-net_assign_generic-fix.patch b/queue-2.6.27/net-net_assign_generic-fix.patch
new file mode 100644 (file)
index 0000000..c1912d6
--- /dev/null
@@ -0,0 +1,31 @@
+From ff0ffe964c49d2a0693dc4c2575ca887f684c6c4 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Tue, 28 Jul 2009 02:36:15 +0000
+Subject: net: net_assign_generic() fix
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+[ Upstream commit 144586301f6af5ae5943a002f030d8c626fa4fdd ]
+
+memcpy() should take into account size of pointers,
+not only number of pointers to copy.
+
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Acked-by: Pavel Emelyanov <xemul@openvz.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ net/core/net_namespace.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/core/net_namespace.c
++++ b/net/core/net_namespace.c
+@@ -446,7 +446,7 @@ int net_assign_generic(struct net *net, 
+       ng->len = id;
+       INIT_RCU_HEAD(&ng->rcu);
+-      memcpy(&ng->ptr, &old_ng->ptr, old_ng->len);
++      memcpy(&ng->ptr, &old_ng->ptr, old_ng->len * sizeof(void*));
+       rcu_assign_pointer(net->gen, ng);
+       call_rcu(&old_ng->rcu, net_generic_release);
diff --git a/queue-2.6.27/series b/queue-2.6.27/series
new file mode 100644 (file)
index 0000000..d476e44
--- /dev/null
@@ -0,0 +1,2 @@
+e100-fix-interaction-with-swiotlb-on-x86.patch
+net-net_assign_generic-fix.patch