]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8de4ee3dca5d86af5ceaa5e058315c203411a1b7
tree4b85c85121343e0ef9cebfe8e1242210d789e9a6
parent631cad5cd955c5ebaebe54a5f07a016190b2244e
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