nvme-pci: clean up CMB initialization
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Dec 2017 13:25:11 +0000 (14:25 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Jan 2018 16:55:06 +0000 (17:55 +0100)
commitf65efd6dfe4e687637704f7023157fdee99913ca
tree4b85c85121343e0ef9cebfe8e1242210d789e9a6
parent0fd997d3f77296522e836f7002e8a0636c9886aa
nvme-pci: clean up CMB initialization

Refactor the call to nvme_map_cmb, and change the conditions for probing
for the CMB.  First remove the version check as NVMe TPs always apply
to earlier versions of the spec as well.  Second check for the whole CMBSZ
register for support of the CMB feature instead of just the size field
inside of it to simplify the code a bit.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/nvme/host/pci.c