]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
drivers: nvme: Log I/O timeouts
authorDenis Mukhin <dmukhin@ford.com>
Fri, 29 May 2026 03:44:36 +0000 (20:44 -0700)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 3 Jun 2026 16:22:18 +0000 (18:22 +0200)
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@ford.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://patch.msgid.link/20260529034441.2075305-2-dmukhin@ford.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/nvme/nvme.c

index 980ca91963252b2e3abab123f1c49efa06e4a686..147a104149eef2454670150ba8ac931f39d16a82 100644 (file)
@@ -199,8 +199,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;