block/nvme: Properly display doorbell stride length in trace event
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 27 Jan 2021 21:21:36 +0000 (22:21 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 2 Feb 2021 16:05:38 +0000 (17:05 +0100)
Commit 15b2260bef3 ("block/nvme: Trace controller capabilities")
misunderstood the doorbell stride value from the datasheet, use
the correct one. The 'doorbell_scale' variable used few lines
later is correct.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210127212137.3482291-2-philmd@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/nvme.c

index 5a6fbacf4a5f755dc74e9872775ecd98a23d55b3..80c4318d8fce12705451904151a6637a9ce8a9bf 100644 (file)
@@ -745,7 +745,7 @@ static int nvme_init(BlockDriverState *bs, const char *device, int namespace,
     trace_nvme_controller_capability("Contiguous Queues Required",
                                      NVME_CAP_CQR(cap));
     trace_nvme_controller_capability("Doorbell Stride",
-                                     2 << (2 + NVME_CAP_DSTRD(cap)));
+                                     1 << (2 + NVME_CAP_DSTRD(cap)));
     trace_nvme_controller_capability("Subsystem Reset Supported",
                                      NVME_CAP_NSSRS(cap));
     trace_nvme_controller_capability("Memory Page Size Minimum",