diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-03-19 12:31:46 +0100 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-03-19 14:33:49 -0400 |
commit | ebbeb55561f15e6ebf760e5b735a92bcdcdeaca1 (patch) | |
tree | 74a53bd3d39d692d6f44e329908bd52c2408bb28 /recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0062-davinci_emac-Do-not-free-all-rx-dma-descriptors-duri.patch | |
parent | 0d0e2c1e274e1885d8b5cb07421449e9d0016c2c (diff) | |
download | meta-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.patch | 72 |
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 @@ | |||
1 | From d0a93cc14174387dc5a6416d741a83fad831eae9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christian Riesch <christian.riesch@omicron.at> | ||
3 | Date: Thu, 23 Feb 2012 01:14:17 +0000 | ||
4 | Subject: [PATCH 62/72] davinci_emac: Do not free all rx dma descriptors | ||
5 | during init | ||
6 | |||
7 | commit 5d69703263d588dbb03f4e57091afd8942d96e6d upstream. | ||
8 | |||
9 | This patch fixes a regression that was introduced by | ||
10 | |||
11 | commit 0a5f38467765ee15478db90d81e40c269c8dda20 | ||
12 | davinci_emac: Add Carrier Link OK check in Davinci RX Handler | ||
13 | |||
14 | Said commit adds a check whether the carrier link is ok. If the link is | ||
15 | not ok, the skb is freed and no new dma descriptor added to the rx dma | ||
16 | channel. This causes trouble during initialization when the carrier | ||
17 | status has not yet been updated. If a lot of packets are received while | ||
18 | netif_carrier_ok returns false, all dma descriptors are freed and the | ||
19 | rx dma transfer is stopped. | ||
20 | |||
21 | The bug occurs when the board is connected to a network with lots of | ||
22 | traffic and the ifconfig down/up is done, e.g., when reconfiguring | ||
23 | the interface with DHCP. | ||
24 | |||
25 | The bug can be reproduced by flood pinging the davinci board while doing | ||
26 | ifconfig eth0 down | ||
27 | ifconfig eth0 up | ||
28 | on the board. | ||
29 | |||
30 | After that, the rx path stops working and the overrun value reported | ||
31 | by ifconfig is counting up. | ||
32 | |||
33 | This patch reverts commit 0a5f38467765ee15478db90d81e40c269c8dda20 | ||
34 | and instead issues warnings only if cpdma_chan_submit returns -ENOMEM. | ||
35 | |||
36 | Signed-off-by: Christian Riesch <christian.riesch@omicron.at> | ||
37 | Cc: Cyril Chemparathy <cyril@ti.com> | ||
38 | Cc: Sascha Hauer <s.hauer@pengutronix.de> | ||
39 | Tested-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> | ||
40 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
41 | Signed-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 | |||
46 | diff --git a/drivers/net/ethernet/ti/davinci_emac.c b/drivers/net/ethernet/ti/davinci_emac.c | ||
47 | index 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 | -- | ||
71 | 1.7.9.4 | ||
72 | |||