diff options
author | Keith Busch <[email protected]> | 2017-08-17 16:45:06 -0400 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2017-08-18 09:19:39 +0200 |
commit | e9d8a0fdeacd843c85dcef480cdb2ab76bcdb6e4 (patch) | |
tree | a0abd84c323fd92b2e267c989334bc1d8715f2ee | |
parent | 81a0b8d74edd5841be29d223ce44bc8db2b00d09 (diff) |
nvme-pci: set cqe_seen on polled completions
Fixes: 920d13a884 ("nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq")
Reported-by: Jens Axboe <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
-rw-r--r-- | drivers/nvme/host/pci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 74a124a06264..925467b31a33 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -801,6 +801,7 @@ static inline void nvme_handle_cqe(struct nvme_queue *nvmeq, return; } + nvmeq->cqe_seen = 1; req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id); nvme_end_request(req, cqe->status, cqe->result); } @@ -830,10 +831,8 @@ static void nvme_process_cq(struct nvme_queue *nvmeq) consumed++; } - if (consumed) { + if (consumed) nvme_ring_cq_doorbell(nvmeq); - nvmeq->cqe_seen = 1; - } } static irqreturn_t nvme_irq(int irq, void *data) |