summaryrefslogtreecommitdiffstats
path: root/target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2009-01-25 13:36:27 +0000
committerFlorian Fainelli <florian@openwrt.org>2009-01-25 13:36:27 +0000
commit3d2066526c138fd8f4a801c5d00037edf02df90e (patch)
treed4f7bf2ea046af01387c31a3901fed39c083cf5f /target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch
parentc198a513980a3e837967934e305eb65fef196826 (diff)
downloadmaster-31e0f0ae-3d2066526c138fd8f4a801c5d00037edf02df90e.tar.gz
master-31e0f0ae-3d2066526c138fd8f4a801c5d00037edf02df90e.tar.bz2
master-31e0f0ae-3d2066526c138fd8f4a801c5d00037edf02df90e.zip
update 2.6.27 patches with upstream fixes from git repository and mailing-lists. via-rhine is still broken, thus not switching to 2.6.27 as default.
SVN-Revision: 14173
Diffstat (limited to 'target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch')
-rw-r--r--target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch b/target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch
new file mode 100644
index 0000000000..101e869d03
--- /dev/null
+++ b/target/linux/rb532/patches-2.6.27/012-korina_do_tx_at_right_position.patch
@@ -0,0 +1,40 @@
+Triggering TX before the write to the DMA status mask register leads to
+transferring packets with maximum payload no matter what the actual
+packet size is.
+While here, also trigger RX scheduling after writing the DMA status mask
+register, like it was in the original driver before it was sent
+upstream.
+
+Signed-off-by: Phil Sutter <n0-1@freewrt.org>
+---
+--- a/drivers/net/korina.c 2009-01-19 23:27:41.000000000 +0100
++++ b/drivers/net/korina.c 2009-01-19 23:29:08.000000000 +0100
+@@ -330,12 +330,12 @@
+
+ dmas = readl(&lp->rx_dma_regs->dmas);
+ if (dmas & (DMA_STAT_DONE | DMA_STAT_HALT | DMA_STAT_ERR)) {
+- netif_rx_schedule(dev, &lp->napi);
+-
+ dmasm = readl(&lp->rx_dma_regs->dmasm);
+ writel(dmasm | (DMA_STAT_DONE |
+ DMA_STAT_HALT | DMA_STAT_ERR),
+ &lp->rx_dma_regs->dmasm);
++
++ netif_rx_schedule(dev, &lp->napi);
+
+ if (dmas & DMA_STAT_ERR)
+ printk(KERN_ERR DRV_NAME "%s: DMA error\n", dev->name);
+@@ -621,11 +621,11 @@
+ dmas = readl(&lp->tx_dma_regs->dmas);
+
+ if (dmas & (DMA_STAT_FINI | DMA_STAT_ERR)) {
+- korina_tx(dev);
+-
+ dmasm = readl(&lp->tx_dma_regs->dmasm);
+ writel(dmasm | (DMA_STAT_FINI | DMA_STAT_ERR),
+ &lp->tx_dma_regs->dmasm);
++
++ korina_tx(dev);
+
+ if (lp->tx_chain_status == desc_filled &&
+ (readl(&(lp->tx_dma_regs->dmandptr)) == 0)) {