[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/26] nvme: Fix get/set number of queues feature
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 23/26] nvme: Fix get/set number of queues feature |
Date: |
Fri, 9 Jan 2015 10:17:03 +0000 |
From: Alex Friedman <address@hidden>
According to the specification, the low 16 bits should contain the number of
I/O submission queues, and the high 16 bits should contain the number of
I/O completion queues.
Signed-off-by: Alex Friedman <address@hidden>
Acked-by: Keith Busch <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
hw/block/nvme.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index aa1ed98..4f70f91 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -476,7 +476,8 @@ static uint16_t nvme_get_feature(NvmeCtrl *n, NvmeCmd *cmd,
NvmeRequest *req)
switch (dw10) {
case NVME_NUMBER_OF_QUEUES:
- req->cqe.result = cpu_to_le32(n->num_queues);
+ req->cqe.result =
+ cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));
break;
default:
return NVME_INVALID_FIELD | NVME_DNR;
@@ -490,7 +491,8 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeCmd *cmd,
NvmeRequest *req)
switch (dw10) {
case NVME_NUMBER_OF_QUEUES:
- req->cqe.result = cpu_to_le32(n->num_queues);
+ req->cqe.result =
+ cpu_to_le32((n->num_queues - 1) | ((n->num_queues - 1) << 16));
break;
default:
return NVME_INVALID_FIELD | NVME_DNR;
--
2.1.0
- [Qemu-devel] [PULL 12/26] qemu-iotests: Add supported os parameter for python tests, (continued)
- [Qemu-devel] [PULL 12/26] qemu-iotests: Add supported os parameter for python tests, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 14/26] qemu-thread: add per-thread atexit functions, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 16/26] QSLIST: add lock-free operations, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 15/26] test-coroutine: avoid overflow on 32-bit systems, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 17/26] coroutine: rewrite pool to avoid mutex, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 18/26] coroutine: drop qemu_coroutine_adjust_pool_size, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 19/26] coroutine: try harder not to delete coroutines, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 20/26] block: limited request size in write zeroes unsupported path, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 22/26] ide: Implement VPD response for ATAPI, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 21/26] block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 23/26] nvme: Fix get/set number of queues feature,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 26/26] NVMe: Set correct VS Value for 1.1 Compliant Controllers, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 25/26] MAINTAINERS: Add migration/block* to block subsystem, Stefan Hajnoczi, 2015/01/09
- [Qemu-devel] [PULL 24/26] MAINTAINERS: Update email addresses for Chrysostomos Nanakos, Stefan Hajnoczi, 2015/01/09
- Re: [Qemu-devel] [PULL 00/26] Block patches, Peter Maydell, 2015/01/10
- Re: [Qemu-devel] [PULL 00/26] Block patches, Stefan Hajnoczi, 2015/01/12