]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: simplify geometry enumeration
authorMatias Bjørling <mb@lightnvm.io>
Tue, 11 Dec 2018 19:16:20 +0000 (20:16 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Dec 2018 19:22:34 +0000 (12:22 -0700)
commit6be9de382c9242246320be114c4ca324425d7896
treed29935a0632710c0c89212a7bfca66042ae2b834
parenta3eebd3ca21cf160b56d6332c33de4832752a0fe
lightnvm: simplify geometry enumeration

Currently the geometry of an OCSSD is enumerated using a two step
approach:

First, nvm_register is called, the OCSSD identify command is issued,
and second the geometry sos and csecs values are read either from the
OCSSD identify if it is a 1.2 drive, or from the NVMe namespace data
structure if it is a 2.0 device.

This patch recombines it into a single step, such that nvm_register can
use the csecs and sos fields independent of which version is used. This
enables one to dynamically size the lightnvm subsystem dma pool.

Reviewed-by: Igor Konopko <igor.j.konopko@intel.com>
Reviewed-by: Javier González <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <mb@lightnvm.io>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/lightnvm/core.c
drivers/nvme/host/core.c
drivers/nvme/host/lightnvm.c
drivers/nvme/host/nvme.h