nvme: create helper function to obtain command effects
authorLogan Gunthorpe <logang@deltatee.com>
Fri, 24 Jul 2020 17:25:13 +0000 (11:25 -0600)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:20 +0000 (07:45 +0200)
commitdf21b6b1934e89c2cc2bb1332146ed6c2df1321c
tree8f9a51e3d6f12306c571cfbf043501762c93abc4
parent2bf5d3bbffad06639db518c8dcf8a14c7dce770e
nvme: create helper function to obtain command effects

Separate the code to obtain command effects from the code
to start a passthru request and move the nvme_passthru_start() and
nvme_passthru_end() functions up above nvme_submit_user_cmd() in order
that they may be used in a new helper a subsequent patch.

The new helper function will be necessary for nvmet passthru
code to determine if we need to change out of interrupt context
to handle the effects. It is exported in the NVME_TARGET_PASSTHRU
namespace.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h