summaryrefslogtreecommitdiff
path: root/drivers/nvme/host/fabrics.h
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2019-09-03 18:22:24 +0300
committerKeith Busch <kbusch@kernel.org>2019-10-14 17:21:44 +0300
commit5d02a5c1d6e14534ca4729b055c89a2cd022ca00 (patch)
treef8bc91bbdb157ba902b4572eb5acd3aef5c2a443 /drivers/nvme/host/fabrics.h
parent770597ecb2075390c01c425b8b1f551347f1bd70 (diff)
downloadlinux-5d02a5c1d6e14534ca4729b055c89a2cd022ca00.tar.xz
nvme: Remove ADMIN_ONLY state
The admin only state was intended to fence off actions that don't apply to a non-IO capable controller. The only actual user of this is the scan_work, and pci was the only transport to ever set this state. The consequence of having this state is placing an additional burden on every other action that applies to both live and admin only controllers. Remove the admin only state and place the admin only burden on the only place that actually cares: scan_work. This also prepares to make it easier to temporarily pause a LIVE state so that we don't need to remember which state the controller had been in prior to the pause. Tested-by: Edmund Nadolski <edmund.nadolski@intel.com> Reviewed-by: James Smart <james.smart@broadcom.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/fabrics.h')
-rw-r--r--drivers/nvme/host/fabrics.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index 93f08d77c896..a0ec40ab62ee 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -182,8 +182,7 @@ bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
bool queue_live)
{
- if (likely(ctrl->state == NVME_CTRL_LIVE ||
- ctrl->state == NVME_CTRL_ADMIN_ONLY))
+ if (likely(ctrl->state == NVME_CTRL_LIVE))
return true;
return __nvmf_check_ready(ctrl, rq, queue_live);
}