aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2019-07-16 19:30:18 +0300
committerMax Reitz <mreitz@redhat.com>2019-07-22 18:40:32 +0200
commit461bba04bff0b3712a02fe49812b497c758e78da (patch)
tree793cc066d1b07018548051a51ebbdd887dfaedbf /block
parent23da9e297b4120ca9702cabec91599a44255fe96 (diff)
block/nvme: fix doorbell stride
Fix the math involving non standard doorbell stride Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20190716163020.13383-2-mlevitsk@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/nvme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/nvme.c b/block/nvme.c
index 9896b7f7c6..82fdefccd6 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -217,7 +217,7 @@ static NVMeQueuePair *nvme_create_queue_pair(BlockDriverState *bs,
error_propagate(errp, local_err);
goto fail;
}
- q->cq.doorbell = &s->regs->doorbells[idx * 2 * s->doorbell_scale + 1];
+ q->cq.doorbell = &s->regs->doorbells[(idx * 2 + 1) * s->doorbell_scale];
return q;
fail: