]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: looks at the passthrough controller when initializing CAP
authorAdam Manzanares <a.manzanares@samsung.com>
Thu, 26 Aug 2021 21:15:45 +0000 (21:15 +0000)
committerChristoph Hellwig <hch@lst.de>
Mon, 6 Sep 2021 07:59:03 +0000 (09:59 +0200)
commit51bcb973a704bd30e04e191fdd631570094daf39
tree077d7436e4ed44b279ded9a0c2060cff751055bf
parentc03197a46e4caa9cf8893378a2b67ce1ab2cfdc7
nvmet: looks at the passthrough controller when initializing CAP

For a passthru controller make cap initialization dependent on the cap of
the passthru controller, given that multiple Command Set support needs
to be supported by the underlying controller.  For that move the
initialization of CAP later so that it can use the fully initialized
nvmet_ctrl structure.

Fixes: 72d47ff18071 (nvmet: add Command Set Identifier support)
Signed-off-by: Adam Manzanares <a.manzanares@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
[hch: refactored the code a bit to keep it more contained in passthru.c]
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h
drivers/nvme/target/passthru.c