Skip to contentSkip to conversation

nvme/pci: Set cqe_seen on polled completions

PATCH New Keith Busch 2 participants 2 messages Aug 17, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 at kernel.dk>
Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/nvme/host/pci.c +2 -3
index ea5eb4c..e9886e1 100644
@@ -795,6 +795,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);
 }
@@ -824,10 +825,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)
Signature · 1 line
2.5.5
maintainer
#1 lore raw

PATCH 1/1 nvme/pci: Set cqe_seen on polled completions

Quoted 4 lines · Keith Busch
Fixes 920d13a884 ("nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq")
Reported-by Jens Axboe <axboe at kernel.dk>
Signed-off-by Keith Busch <keith.busch at intel.com>
Tested-by Jens Axboe <axboe at kenel.dk>
Signature · 1 line
Jens Axboe