qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] nvme: fix identify to be NVMe


From: Christoph Hellwig
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] nvme: fix identify to be NVMe 1.1 compliant
Date: Wed, 18 Nov 2015 20:21:09 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

Meh, this was still missing the uncommited changes for the nsid
off by one vs the array index:

diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 360be71..4f768d5 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -499,10 +499,10 @@ static uint16_t nvme_identify_nslist(NvmeCtrl *n, 
NvmeIdentify *c)
 
     list = g_malloc0(data_len);
     for (i = 0; i < n->num_namespaces; i++) {
-        if (i <= min_nsid) {
+        if (i < min_nsid) {
             continue;
         }
-        list[j++] = cpu_to_le32(i);
+        list[j++] = cpu_to_le32(i + 1);
         if (j == data_len / sizeof(uint32_t)) {
             break;
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]