diff options
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.patch | 56 |
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 @@ | |||
1 | From b50133363ad0f4fa9ca46317aaa7261a21f22305 Mon Sep 17 00:00:00 2001 | ||
2 | From: Deepak Sikri <deepak.sikri@st.com> | ||
3 | Date: Sun, 8 Jul 2012 21:14:45 +0000 | ||
4 | Subject: [PATCH 101/109] stmmac: Fix for nfs hang on multiple reboot | ||
5 | |||
6 | commit 8e83989106562326bfd6aaf92174fe138efd026b upstream. | ||
7 | |||
8 | It was observed that during multiple reboots nfs hangs. The status of | ||
9 | receive descriptors shows that all the descriptors were in control of | ||
10 | CPU, and none were assigned to DMA. | ||
11 | Also the DMA status register confirmed that the Rx buffer is | ||
12 | unavailable. | ||
13 | |||
14 | This patch adds the fix for the same by adding the memory barriers to | ||
15 | ascertain that the all instructions before enabling the Rx or Tx DMA are | ||
16 | completed which involves the proper setting of the ownership bit in DMA | ||
17 | descriptors. | ||
18 | |||
19 | Signed-off-by: Deepak Sikri <deepak.sikri@st.com> | ||
20 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
21 | Signed-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 | |||
26 | diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | ||
27 | index 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 | -- | ||
55 | 1.7.7.6 | ||
56 | |||