]> git.baikalelectronics.ru Git - uboot.git/commit
nvme: flush dcache on both r/w, and the prp list
authorPatrick Wildt <patrick@blueri.se>
Wed, 16 Oct 2019 21:22:50 +0000 (23:22 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 31 Oct 2019 11:22:53 +0000 (07:22 -0400)
commitf46b3e47ddfc9ac1c9c58f667ccb195c84076f41
treecab6c81fd9b422fcac6be3b9dccb346f98e3dab4
parent4d25024abdc90e257a547960f26ca3f8b2242334
nvme: flush dcache on both r/w, and the prp list

It's possible that the data cache for the buffer still holds data
to be flushed to memory, since the buffer was probably used as stack
before.  Thus we need to make sure to flush it also on reads, since
it's possible that the cache is automatically flused to memory after
the NVMe DMA transfer happened, thus overwriting the NVMe transfer's
data.  Also add a missing dcache flush for the prp list.

Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/nvme/nvme.c