Message ID | 20210114072251.334304-3-pizhenwei@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | support NVMe smart critial warning injection | expand |
On Jan 14 15:22, zhenwei pi wrote: > After PMR initialization, bar.cap should not be clear in function > nvme_init_ctrl. Otherwise the PMR cap would be always disabled. > > Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> > --- > hw/block/nvme.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > index 27d2c72716..f361103bb4 100644 > --- a/hw/block/nvme.c > +++ b/hw/block/nvme.c > @@ -2745,7 +2745,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); > -- > 2.25.1 > > Good fix, but looks like you are on master and not on nvme-next[1]? The same fix is already staged. [1]: http://git.infradead.org/qemu-nvme.git/shortlog/refs/heads/nvme-next
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 27d2c72716..f361103bb4 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -2745,7 +2745,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);
After PMR initialization, bar.cap should not be clear in function nvme_init_ctrl. Otherwise the PMR cap would be always disabled. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com> --- hw/block/nvme.c | 1 - 1 file changed, 1 deletion(-)