[PATCH v1 1/5] drivers: nvme: Log I/O timeouts

Neil Armstrong neil.armstrong at linaro.org
Thu May 28 11:11:35 CEST 2026


On 5/28/26 03:20, dmukhin at ford.com wrote:
> From: Denis Mukhin <dmukhin at ford.com>
> 
> Current code silently swallows any timed-out commands scheduled
> to NVMe. Log those to be able to debug any potential problems with
> the NVMe hardware/firmware.
> 
> Signed-off-by: Denis Mukhin <dmukhin at ford.com>
> ---
>   drivers/nvme/nvme.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c
> index 0631b190b978..c3c44e50f19a 100644
> --- a/drivers/nvme/nvme.c
> +++ b/drivers/nvme/nvme.c
> @@ -182,8 +182,10 @@ static int nvme_submit_sync_cmd(struct nvme_queue *nvmeq,
>   		if ((status & 0x01) == phase)
>   			break;
>   		if (timeout_us > 0 && (timer_get_us() - start_time)
> -		    >= timeout_us)
> +		    >= timeout_us) {
> +			pr_warn("nvme: cmd %#x timed out\n", cmd->common.command_id);
>   			return -ETIMEDOUT;
> +		}
>   	}
>   
>   	ops = (struct nvme_ops *)nvmeq->dev->udev->driver->ops;

Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>

Thanks,
Neil


More information about the U-Boot mailing list