[PATCH v1 1/5] drivers: nvme: Log I/O timeouts
dmukhin at ford.com
dmukhin at ford.com
Thu May 28 03:20:52 CEST 2026
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;
--
2.54.0
More information about the U-Boot
mailing list