mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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>
This commit is contained in:
parent
8f7336f0a6
commit
cb833dd465
1 changed files with 4 additions and 2 deletions
|
|
@ -538,10 +538,12 @@ static int ath_gmac_alloc_fifo(int ndesc, ath_gmac_desc_t ** fifo)
|
|||
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++)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue