aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2017-08-17 16:45:06 -0400
committerChristoph Hellwig <hch@lst.de>2017-08-18 03:19:39 -0400
commite9d8a0fdeacd843c85dcef480cdb2ab76bcdb6e4 (patch)
treea0abd84c323fd92b2e267c989334bc1d8715f2ee
parent81a0b8d74edd5841be29d223ce44bc8db2b00d09 (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 <axboe@kernel.dk> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/nvme/host/pci.c5
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,
801 return; 801 return;
802 } 802 }
803 803
804 nvmeq->cqe_seen = 1;
804 req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id); 805 req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id);
805 nvme_end_request(req, cqe->status, cqe->result); 806 nvme_end_request(req, cqe->status, cqe->result);
806} 807}
@@ -830,10 +831,8 @@ static void nvme_process_cq(struct nvme_queue *nvmeq)
830 consumed++; 831 consumed++;
831 } 832 }
832 833
833 if (consumed) { 834 if (consumed)
834 nvme_ring_cq_doorbell(nvmeq); 835 nvme_ring_cq_doorbell(nvmeq);
835 nvmeq->cqe_seen = 1;
836 }
837} 836}
838 837
839static irqreturn_t nvme_irq(int irq, void *data) 838static irqreturn_t nvme_irq(int irq, void *data)