diff options
author | Giuseppe CAVALLARO <peppe.cavallaro@st.com> | 2010-04-13 20:21:13 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-14 04:49:51 -0700 |
commit | 688911c2f5e5e4f33b5a1c32839184f1fdf814ee (patch) | |
tree | 8fc98665157406601001822c5cd8d65f4c5ce457 /drivers/net/stmmac/dwmac_lib.c | |
parent | 56b106ae7b1f6b7cef4ef7e79a03b59cfc940923 (diff) | |
download | linux-stable-688911c2f5e5e4f33b5a1c32839184f1fdf814ee.tar.gz linux-stable-688911c2f5e5e4f33b5a1c32839184f1fdf814ee.tar.bz2 linux-stable-688911c2f5e5e4f33b5a1c32839184f1fdf814ee.zip |
stmmac: fix Transmit FIFO flush operation
Fix the Transmit FIFO flush operation; it was
disabled while reworking the descriptor structures.
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/stmmac/dwmac_lib.c')
-rw-r--r-- | drivers/net/stmmac/dwmac_lib.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/stmmac/dwmac_lib.c b/drivers/net/stmmac/dwmac_lib.c index d4adb1eaa447..0a504adb7eb3 100644 --- a/drivers/net/stmmac/dwmac_lib.c +++ b/drivers/net/stmmac/dwmac_lib.c @@ -227,6 +227,13 @@ int dwmac_dma_interrupt(unsigned long ioaddr, return ret; } +void dwmac_dma_flush_tx_fifo(unsigned long ioaddr) +{ + u32 csr6 = readl(ioaddr + DMA_CONTROL); + writel((csr6 | DMA_CONTROL_FTF), ioaddr + DMA_CONTROL); + + do {} while ((readl(ioaddr + DMA_CONTROL) & DMA_CONTROL_FTF)); +} void stmmac_set_mac_addr(unsigned long ioaddr, u8 addr[6], unsigned int high, unsigned int low) |