MIPS: qca956x: Fix gmac descriptor corruption issue

tftp transfer failed as gmac descriptor got corrupted.
GMAC descriptors gets addresses from malloc area that
were already used and made free by some other module.
There is a cache invalidate issue when tftp transfer
happens and gmac descriptors gets corrupted.
flush_cache is needed to avoid this.

Change-Id: I40ae7c771bcac3fade78de4454bfa3dafde4b70a
Signed-off-by: Prabhu Jayakumar <pjayak@codeaurora.org>
diff --git a/board/qca/mips32/common/qca-eth-956x.c b/board/qca/mips32/common/qca-eth-956x.c
index 95d6dd1..c4fbf1d 100644
--- a/board/qca/mips32/common/qca-eth-956x.c
+++ b/board/qca/mips32/common/qca-eth-956x.c
@@ -538,10 +538,12 @@
 		return -1;
 	}
 
-	/* Desc gets overwritten maliciously, this is temp WAR */
-	p = p+ 4096;
 	p = (uchar *) (((u32) p + CONFIG_SYS_CACHELINE_SIZE - 1) &
 			~(CONFIG_SYS_CACHELINE_SIZE - 1));
+
+	/* gmac descriptors got overwritten due to cache invalidation issue. So , flush_cache is needed here*/
+	flush_cache((u32)p, (sizeof(ath_gmac_desc_t) * ndesc));
+
 	p = UNCACHED_SDRAM(p);
 
 	for (i = 0; i < ndesc; i++)