stmmac: Fix for nfs hang on multiple reboot
authorDeepak Sikri <deepak.sikri@st.com>
Sun, 8 Jul 2012 21:14:45 +0000 (21:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2012 21:37:51 +0000 (14:37 -0700)
commit8e83989106562326bfd6aaf92174fe138efd026b
tree9561ae1bf2f7468a730eac175fd0d6e8475f92f5
parentc1109736bcdd14b590392e9a96d66e7e823f9e67
stmmac: Fix for nfs hang on multiple reboot

It was observed that during multiple reboots nfs hangs. The status of
receive descriptors shows that all the descriptors were in control of
CPU, and none were assigned to DMA.
Also the DMA status register confirmed that the Rx buffer is
unavailable.

This patch adds the fix for the same by adding the memory barriers to
ascertain that the all instructions before enabling the Rx or Tx DMA are
completed which involves the proper setting of the ownership bit in DMA
descriptors.

Signed-off-by: Deepak Sikri <deepak.sikri@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c