diff options
author | Christoph Hellwig <hch@lst.de> | 2022-11-08 11:20:12 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-12-06 14:36:54 +0100 |
commit | 285b6e9b571714270fa503d0e32f244d15b9f85f (patch) | |
tree | 3ed84add4be44902683405ac38b2b9800966e02d /drivers/nvme/host/tcp.c | |
parent | nvme: use nvme_wait_ready in nvme_shutdown_ctrl (diff) | |
download | linux-285b6e9b571714270fa503d0e32f244d15b9f85f.tar.xz linux-285b6e9b571714270fa503d0e32f244d15b9f85f.zip |
nvme: merge nvme_shutdown_ctrl into nvme_disable_ctrl
Many of the callers decide which one to use based on a bool argument and
there is at least some code to be shared, so merge these two. Also
move a comment specific to a single callsite to that callsite.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hector Martin <marcan@marcan.st>
Diffstat (limited to 'drivers/nvme/host/tcp.c')
-rw-r--r-- | drivers/nvme/host/tcp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 79789daddeac..95e54e9c1bb1 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -2142,10 +2142,7 @@ static void nvme_tcp_teardown_ctrl(struct nvme_ctrl *ctrl, bool shutdown) { nvme_tcp_teardown_io_queues(ctrl, shutdown); nvme_quiesce_admin_queue(ctrl); - if (shutdown) - nvme_shutdown_ctrl(ctrl); - else - nvme_disable_ctrl(ctrl); + nvme_disable_ctrl(ctrl, shutdown); nvme_tcp_teardown_admin_queue(ctrl, shutdown); } |