When flush cache of the current GPD and resume QMU, the controller
will try to access the next GPD after processing the current one,
if not flush the next GPD, the controller may get wrong GPD status.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
enq->flag &= ~GPD_FLAGS_HWO;
gpd->next_gpd = cpu_to_le32((u32)gpd_virt_to_dma(ring, enq));
+ mtu3_flush_cache((uintptr_t)enq, sizeof(*gpd));
if (req->zero)
gpd->ext_flag |= GPD_EXT_FLAG_ZLP;
enq->flag &= ~GPD_FLAGS_HWO;
gpd->next_gpd = cpu_to_le32((u32)gpd_virt_to_dma(ring, enq));
+ mtu3_flush_cache((uintptr_t)enq, sizeof(*gpd));
+
gpd->flag |= GPD_FLAGS_IOC | GPD_FLAGS_HWO;
mreq->gpd = gpd;