diff options
author | Hannes Reinecke <hare@suse.de> | 2024-01-29 09:39:48 +0300 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-02-01 02:59:48 +0300 |
commit | 48dae46676d1acb632a3e1e14d02879d57618b5d (patch) | |
tree | 3db4032e2c293241092d4d0538e6c81ee7391cd0 /drivers/nvme/host/nvme.h | |
parent | bd2687f2e5940f6ee14bfae787b3c1f5f0574907 (diff) | |
download | linux-48dae46676d1acb632a3e1e14d02879d57618b5d.tar.xz |
nvme: enable retries for authentication commands
Authentication commands might trigger a lengthy computation on the
controller or even a callout to an external entity.
In these cases the controller might return a status without the DNR
bit set, indicating that the command should be retried.
This patch enables retries for authentication commands by setting
NVME_SUBMIT_RETRY for __nvme_submit_sync_cmd().
Reported-by: Martin George <marting@netapp.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r-- | drivers/nvme/host/nvme.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index 7d315b670e53..945bf15dccec 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -849,6 +849,8 @@ enum { NVME_SUBMIT_NOWAIT = (__force nvme_submit_flags_t)(1 << 1), /* Set BLK_MQ_REQ_RESERVED when allocating request */ NVME_SUBMIT_RESERVED = (__force nvme_submit_flags_t)(1 << 2), + /* Retry command when NVME_SC_DNR is not set in the result */ + NVME_SUBMIT_RETRY = (__force nvme_submit_flags_t)(1 << 3), }; int nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, |