Skip to content

Commit

Permalink
nvme-pci: set cqe_seen on polled completions
Browse files Browse the repository at this point in the history
Fixes: 920d13a ("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>
  • Loading branch information
Keith Busch authored and Christoph Hellwig committed Aug 18, 2017
1 parent 81a0b8d commit e9d8a0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e9d8a0f

Please sign in to comment.