nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq
authorSagi Grimberg <sagi@grimberg.me>
Sun, 18 Jun 2017 14:28:09 +0000 (17:28 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jun 2017 14:14:13 +0000 (08:14 -0600)
commit920d13a884c0595451658a7b48af8ac16918628f
tree1b58fe9d0ab6e1aa6eb01f2228da48a623699976
parent83a12fb77b941a6735026e46c8ef5f4ec1204e97
nvme-pci: factor out the cqe reading mechanics from __nvme_process_cq

Also, maintain a consumed counter to rely on for doorbell and
cqe_seen update instead of directly relying on the cq head and phase.

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