diff options
author | Keith Busch <kbusch@kernel.org> | 2024-02-05 11:10:25 -0800 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-02-13 08:46:09 -0800 |
commit | 29f6975332479f92233594901c649ff4d71f8cb6 (patch) | |
tree | f8661b9341d4ff76fb375705bb3bbffb8052bbe1 /drivers/nvme | |
parent | 79bd7eab8366b29eaa099908d5694cb473684b9d (diff) | |
download | linux-29f6975332479f92233594901c649ff4d71f8cb6.tar.gz linux-29f6975332479f92233594901c649ff4d71f8cb6.tar.bz2 linux-29f6975332479f92233594901c649ff4d71f8cb6.zip |
nvme: implement support for relaxed effects
NVM Express TP4167 provides a way for controllers to report a relaxed
execution constraint. Specifically, it notifies of exclusivity for IO
vs. admin commands instead of grouping these together. If set, then we
don't need to freeze IO in order to execute that admin command. The
freezing distrupts IO processes, so it's nice to avoid that if the
controller tells us it's not necessary.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 60537c9224bf..0a96362912ce 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1153,6 +1153,10 @@ u32 nvme_command_effects(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode) effects &= ~NVME_CMD_EFFECTS_CSE_MASK; } else { effects = le32_to_cpu(ctrl->effects->acs[opcode]); + + /* Ignore execution restrictions if any relaxation bits are set */ + if (effects & NVME_CMD_EFFECTS_CSER_MASK) + effects &= ~NVME_CMD_EFFECTS_CSE_MASK; } return effects; |