On 5/28/26 03:20, [email protected] wrote:
From: Denis Mukhin <[email protected]>

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 <[email protected]>
---
  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 <[email protected]>

Thanks,
Neil

Reply via email to