[PATCH] nvme: do not ignore nvme status in nvme_set_queue_count()

Chaitanya Kulkarni Chaitanya.Kulkarni at wdc.com
Thu Jan 21 15:03:20 EST 2021


On 1/21/21 1:54 AM, Hannes Reinecke wrote:
> If the call to nvme_set_queue_count() fails with a status we should
> not ignore it but rather pass it on to the caller.
> It's then up to the transport to decide whether to ignore it
> (like PCI does) or to reset the connection (as would be appropriate
> for fabrics).
>
> Signed-off-by: Hannes Reinecke <hare at suse.de>
> ---
>  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 ce1b61519441..ddf32f5b4534 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1486,7 +1486,7 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count)
>  		*count = min(*count, nr_io_queues);
>  	}
>  
> -	return 0;
> +	return status;
>  }
>  EXPORT_SYMBOL_GPL(nvme_set_queue_count);
>  
Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>



More information about the Linux-nvme mailing list