[PATCH V3 1/3] nvme: check all retry delay times in Identify Controller
Minwoo Im
minwoo.im.dev at gmail.com
Mon Jan 18 22:43:38 EST 2021
On 21-01-14 22:31:08, Minwoo Im wrote:
> If none of Command Retry Delay Time(CRDT)s are set, then we can simply
> skip to configure Advanced Command Retry Enable(ACRE).
>
> CRDT selection will be made in Completion Queue Entry that controller
> has responsibility to decide.
>
> This patch checks all CRDT[0, 1, and 2] in Identify Controller data
> structrure instead of checking the first one: CRDT[0] for cases that:
>
> - CRDT[0] == 0, but CRDT[1 or 2] != 0
>
> Signed-off-by: Minwoo Im <minwoo.im.dev at gmail.com>
> ---
> drivers/nvme/host/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index fff49e544fdf..a8cee380b3c0 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -2499,7 +2499,7 @@ static int nvme_configure_acre(struct nvme_ctrl *ctrl)
> int ret;
>
> /* Don't bother enabling the feature if retry delay is not reported */
> - if (!ctrl->crdt[0])
> + if (!ctrl->crdt[0] && !ctrl->crdt[1] && !ctrl->crdt[2])
> return 0;
>
> host = kzalloc(sizeof(*host), GFP_KERNEL);
> --
> 2.17.1
>
Hello Christoph, and Keith,
May I get your feedback on this? Is there any background reason not to
configure ACRE without checking CRDT2[1] and CRDT3[2] ?
Thanks!
More information about the Linux-nvme
mailing list