summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch
new file mode 100644
index 00000000..76313cab
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0101-stmmac-Fix-for-nfs-hang-on-multiple-reboot.patch
@@ -0,0 +1,56 @@
1From b50133363ad0f4fa9ca46317aaa7261a21f22305 Mon Sep 17 00:00:00 2001
2From: Deepak Sikri <deepak.sikri@st.com>
3Date: Sun, 8 Jul 2012 21:14:45 +0000
4Subject: [PATCH 101/109] stmmac: Fix for nfs hang on multiple reboot
5
6commit 8e83989106562326bfd6aaf92174fe138efd026b upstream.
7
8It was observed that during multiple reboots nfs hangs. The status of
9receive descriptors shows that all the descriptors were in control of
10CPU, and none were assigned to DMA.
11Also the DMA status register confirmed that the Rx buffer is
12unavailable.
13
14This patch adds the fix for the same by adding the memory barriers to
15ascertain that the all instructions before enabling the Rx or Tx DMA are
16completed which involves the proper setting of the ownership bit in DMA
17descriptors.
18
19Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
20Signed-off-by: David S. Miller <davem@davemloft.net>
21Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
22---
23 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
24 1 files changed, 3 insertions(+), 0 deletions(-)
25
26diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
27index 72cd190..d4d2bc1 100644
28--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
29+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
30@@ -1174,6 +1174,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
31 priv->hw->desc->prepare_tx_desc(desc, 0, len, csum_insertion);
32 wmb();
33 priv->hw->desc->set_tx_owner(desc);
34+ wmb();
35 }
36
37 /* Interrupt on completition only for the latest segment */
38@@ -1189,6 +1190,7 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
39
40 /* To avoid raise condition */
41 priv->hw->desc->set_tx_owner(first);
42+ wmb();
43
44 priv->cur_tx++;
45
46@@ -1252,6 +1254,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv)
47 }
48 wmb();
49 priv->hw->desc->set_rx_owner(p + entry);
50+ wmb();
51 }
52 }
53
54--
551.7.7.6
56