summaryrefslogtreecommitdiffstats
path: root/target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-16 16:32:55 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-11-16 16:32:55 +0000
commit763c067152ac8f8acc6a4920bd335254435feb2b (patch)
tree2e0e2146effb547c681faed71e1cd042af250d90 /target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch
parent8642151a3411335fe43e3b93ad1c867c1ed7b6d7 (diff)
[leon] move patches to patches-2.6.36
Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34220 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch')
-rw-r--r--target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch61
1 files changed, 0 insertions, 61 deletions
diff --git a/target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch b/target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch
deleted file mode 100644
index 3a14eb76d..000000000
--- a/target/linux/leon/patches/020-greth_optimize_gbit_tx_descriptor_handling.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 544631281bed5cc37b8f2d3a99f44c9d4b97f9a8 Mon Sep 17 00:00:00 2001
-From: Daniel Hellstrom <daniel@gaisler.com>
-Date: Wed, 1 Dec 2010 10:07:12 +0100
-Subject: [PATCH] GRETH: GBit transmit descriptor handling optimization
-
-It is safe to enable all fragments before enabling the first descriptor,
-this way all descriptors don't have to be processed twice, added extra
-memory barrier.
-
-Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
----
- drivers/net/greth.c | 19 ++++++++++---------
- 1 files changed, 10 insertions(+), 9 deletions(-)
-
---- a/drivers/net/greth.c
-+++ b/drivers/net/greth.c
-@@ -512,7 +512,7 @@ greth_start_xmit_gbit(struct sk_buff *sk
- greth->tx_skbuff[curr_tx] = NULL;
- bdp = greth->tx_bd_base + curr_tx;
-
-- status = GRETH_TXBD_CSALL;
-+ status = GRETH_TXBD_CSALL | GRETH_BD_EN;
- status |= frag->size & GRETH_BD_LEN;
-
- /* Wrap around descriptor ring */
-@@ -549,26 +549,27 @@ greth_start_xmit_gbit(struct sk_buff *sk
-
- wmb();
-
-- /* Enable the descriptors that we configured ... */
-- for (i = 0; i < nr_frags + 1; i++) {
-- bdp = greth->tx_bd_base + greth->tx_next;
-- greth_write_bd(&bdp->stat, greth_read_bd(&bdp->stat) | GRETH_BD_EN);
-- greth->tx_next = NEXT_TX(greth->tx_next);
-- greth->tx_free--;
-- }
-+ /* Enable the descriptor chain by enabling the first descriptor */
-+ bdp = greth->tx_bd_base + greth->tx_next;
-+ greth_write_bd(&bdp->stat, greth_read_bd(&bdp->stat) | GRETH_BD_EN);
-+ greth->tx_next = curr_tx;
-+ greth->tx_free -= nr_frags + 1;
-+
-+ wmb();
-
- greth_enable_tx(greth);
-
- return NETDEV_TX_OK;
-
- frag_map_error:
-- /* Unmap SKB mappings that succeeded */
-+ /* Unmap SKB mappings that succeeded and disable descriptor */
- for (i = 0; greth->tx_next + i != curr_tx; i++) {
- bdp = greth->tx_bd_base + greth->tx_next + i;
- dma_unmap_single(greth->dev,
- greth_read_bd(&bdp->addr),
- greth_read_bd(&bdp->stat) & GRETH_BD_LEN,
- DMA_TO_DEVICE);
-+ greth_write_bd(&bdp->stat, 0);
- }
- map_error:
- if (net_ratelimit())