diff --git a/src/add-ons/kernel/drivers/disk/nvme/nvme_disk.cpp b/src/add-ons/kernel/drivers/disk/nvme/nvme_disk.cpp index 067a1ef6ea..5fc10d0a97 100644 --- a/src/add-ons/kernel/drivers/disk/nvme/nvme_disk.cpp +++ b/src/add-ons/kernel/drivers/disk/nvme/nvme_disk.cpp @@ -345,13 +345,19 @@ do_nvme_io(nvme_disk_driver_info* info, off_t rounded_pos, void* buffer, (nvme_cmd_cb)disk_io_callback, &status, 0); } mutex_unlock(&qpinfo->mtx); - if (ret != 0) + if (ret != 0) { + TRACE_ERROR("attempt to queue %s I/O at %" B_PRIdOFF " of %" B_PRIuSIZE + " bytes failed!", write ? "write" : "read", rounded_pos, *rounded_len); return ret; + } await_status(qpinfo->qpair, status); - if (status != B_OK) + if (status != B_OK) { + TRACE_ERROR("%s at %" B_PRIdOFF " of %" B_PRIuSIZE " bytes failed!", + write ? "write" : "read", rounded_pos, *rounded_len); *rounded_len = 0; + } return status; }