summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2012-03-19 12:31:46 +0100
committerDenys Dmytriyenko <denys@ti.com>2012-03-19 14:33:49 -0400
commitebbeb55561f15e6ebf760e5b735a92bcdcdeaca1 (patch)
tree74a53bd3d39d692d6f44e329908bd52c2408bb28 /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch
parent0d0e2c1e274e1885d8b5cb07421449e9d0016c2c (diff)
downloadmeta-ti-ebbeb55561f15e6ebf760e5b735a92bcdcdeaca1.tar.gz
linux-ti335x-psp 3.2: update to v3.2.11
Also add script used to generate patches and SRC_URI Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch
new file mode 100644
index 00000000..51197fcf
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch
@@ -0,0 +1,72 @@
1From d0a93cc14174387dc5a6416d741a83fad831eae9 Mon Sep 17 00:00:00 2001
2From: Christian Riesch <christian.riesch@omicron.at>
3Date: Thu, 23 Feb 2012 01:14:17 +0000
4Subject: [PATCH 62/72] davinci_emac: Do not free all rx dma descriptors
5 during init
6
7commit 5d69703263d588dbb03f4e57091afd8942d96e6d upstream.
8
9This patch fixes a regression that was introduced by
10
11commit 0a5f38467765ee15478db90d81e40c269c8dda20
12davinci_emac: Add Carrier Link OK check in Davinci RX Handler
13
14Said commit adds a check whether the carrier link is ok. If the link is
15not ok, the skb is freed and no new dma descriptor added to the rx dma
16channel. This causes trouble during initialization when the carrier
17status has not yet been updated. If a lot of packets are received while
18netif_carrier_ok returns false, all dma descriptors are freed and the
19rx dma transfer is stopped.
20
21The bug occurs when the board is connected to a network with lots of
22traffic and the ifconfig down/up is done, e.g., when reconfiguring
23the interface with DHCP.
24
25The bug can be reproduced by flood pinging the davinci board while doing
26ifconfig eth0 down
27ifconfig eth0 up
28on the board.
29
30After that, the rx path stops working and the overrun value reported
31by ifconfig is counting up.
32
33This patch reverts commit 0a5f38467765ee15478db90d81e40c269c8dda20
34and instead issues warnings only if cpdma_chan_submit returns -ENOMEM.
35
36Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
37Cc: Cyril Chemparathy <cyril@ti.com>
38Cc: Sascha Hauer <s.hauer@pengutronix.de>
39Tested-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com>
40Signed-off-by: David S. Miller <davem@davemloft.net>
41Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42---
43 drivers/net/ethernet/ti/davinci_emac.c | 6 ++++--
44 1 file changed, 4 insertions(+), 2 deletions(-)
45
46diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c
47index 815c797..22f2788 100644
48--- a/drivers/net/ethernet/ti/davinci_emac.c
49+++ b/drivers/net/ethernet/ti/davinci_emac.c
50@@ -1007,7 +1007,7 @@ static void emac_rx_handler(void *token, int len, int status)
51 int ret;
52
53 /* free and bail if we are shutting down */
54- if (unlikely(!netif_running(ndev) || !netif_carrier_ok(ndev))) {
55+ if (unlikely(!netif_running(ndev))) {
56 dev_kfree_skb_any(skb);
57 return;
58 }
59@@ -1036,7 +1036,9 @@ static void emac_rx_handler(void *token, int len, int status)
60 recycle:
61 ret = cpdma_chan_submit(priv->rxchan, skb, skb->data,
62 skb_tailroom(skb), GFP_KERNEL);
63- if (WARN_ON(ret < 0))
64+
65+ WARN_ON(ret == -ENOMEM);
66+ if (unlikely(ret < 0))
67 dev_kfree_skb_any(skb);
68 }
69
70--
711.7.9.4
72