summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKlaus Jensen2020-12-08 08:43:04 +0100
committerKlaus Jensen2021-02-08 18:55:48 +0100
commite1f81c1478398713f14c1b6ba011d4bb841dea27 (patch)
tree9eb337903977cf4993f31a6b5a90effbf0e91db3
parenthw/block/nvme: add compare command (diff)
downloadqemu-e1f81c1478398713f14c1b6ba011d4bb841dea27.tar.gz
qemu-e1f81c1478398713f14c1b6ba011d4bb841dea27.tar.xz
qemu-e1f81c1478398713f14c1b6ba011d4bb841dea27.zip
hw/block/nvme: fix bad clearing of CAP
Commit 37712e00b1f0 ("hw/block/nvme: factor out pmr setup") changed the control flow such that the CAP register is erronously cleared after nvme_init_pmr() has configured it. Since the entire NvmeCtrl structure is zero-filled initially, there is no need for the explicit clearing, so just remove it. Fixes: 37712e00b1f0 ("hw/block/nvme: factor out pmr setup") Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com>
-rw-r--r--hw/block/nvme.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index b9313fdc47..de52487aaf 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -3038,7 +3038,6 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev)
id->psd[0].enlat = cpu_to_le32(0x10);
id->psd[0].exlat = cpu_to_le32(0x4);
- n->bar.cap = 0;
NVME_CAP_SET_MQES(n->bar.cap, 0x7ff);
NVME_CAP_SET_CQR(n->bar.cap, 1);
NVME_CAP_SET_TO(n->bar.cap, 0xf);