]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nvme-pci: set cqe_seen on polled completions
authorKeith Busch <keith.busch@intel.com>
Thu, 17 Aug 2017 20:45:06 +0000 (16:45 -0400)
committerChristoph Hellwig <hch@lst.de>
Fri, 18 Aug 2017 07:19:39 +0000 (09:19 +0200)
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>
drivers/nvme/host/pci.c

index 74a124a062640ae77abb8554881e1a93222abd2d..925467b31a333940dc62d62c4c5f3376316e4120 100644 (file)
@@ -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)