aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-05-16 09:25:34 -0600
committerJens Axboe <axboe@kernel.dk>2020-05-16 09:25:34 -0600
commit3948955397511ad5b68dc65fa11fad941d71d307 (patch)
tree849b398f5ec603aa97bc6a1f6e387bfa90a7ba82
parent59c7c3caaaf8750df4ec3255082f15eb4e371514 (diff)
parentb69e2ef24b7b4867f80f47e2781e95d0bacd15cb (diff)
downloadlinux-3948955397511ad5b68dc65fa11fad941d71d307.tar.gz
Merge branch 'nvme-5.7' of git://git.infradead.org/nvme into block-5.7
Pull NVMe fix from Christoph. * 'nvme-5.7' of git://git.infradead.org/nvme: nvme-pci: dma read memory barrier for completions
-rw-r--r--drivers/nvme/host/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e13c370de83047..3726dc780d15b1 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -989,6 +989,11 @@ static inline int nvme_process_cq(struct nvme_queue *nvmeq)
while (nvme_cqe_pending(nvmeq)) {
found++;
+ /*
+ * load-load control dependency between phase and the rest of
+ * the cqe requires a full read memory barrier
+ */
+ dma_rmb();
nvme_handle_cqe(nvmeq, nvmeq->cq_head);
nvme_update_cq_head(nvmeq);
}