nvme: move OPAL setup from PCIe to core
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Nov 2022 14:48:27 +0000 (15:48 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 15 Nov 2022 09:55:53 +0000 (10:55 +0100)
commit94cc781f69f49f665383dd87aef973b7896153d0
tree0746709d3b147f031ced7d8ba8de257c58dd8741
parent1e37a307f1481058da852accb37e0e1a3e137e9e
nvme: move OPAL setup from PCIe to core

Nothing about the TCG Opal support is PCIe transport specific, so move it
to the core code.  For this nvme_init_ctrl_finish grows a new
was_suspended argument that allows the transport driver to tell the OPAL
code if the controller came out of a suspend cycle.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Tested-by Gerd Bayer <gbayer@linxu.ibm.com>
drivers/nvme/host/apple.c
drivers/nvme/host/core.c
drivers/nvme/host/fc.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/loop.c