nvme-pci: remove unnecessary completion doorbell check
authorKeith Busch <keith.busch@intel.com>
Wed, 6 Jun 2018 14:13:05 +0000 (08:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2018 18:51:11 +0000 (12:51 -0600)
The nvme pci driver never unmaps the doorbell registers while the requests
are active, so we can always safely update the completion queue head.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c

index a7bed8dccd61b97592eee64df41a35ad349c3a30..4963a407e728427066b2d4731ac6caff08d74bfe 100644 (file)
@@ -920,11 +920,9 @@ static inline void nvme_ring_cq_doorbell(struct nvme_queue *nvmeq)
 {
        u16 head = nvmeq->cq_head;
 
-       if (likely(nvmeq->cq_vector >= 0)) {
-               if (nvme_dbbuf_update_and_check_event(head, nvmeq->dbbuf_cq_db,
-                                                     nvmeq->dbbuf_cq_ei))
-                       writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
-       }
+       if (nvme_dbbuf_update_and_check_event(head, nvmeq->dbbuf_cq_db,
+                                             nvmeq->dbbuf_cq_ei))
+               writel(head, nvmeq->q_db + nvmeq->dev->db_stride);
 }
 
 static inline void nvme_handle_cqe(struct nvme_queue *nvmeq, u16 idx)