diff options
author | Gollu Appalanaidu <anaidu.gollu@samsung.com> | 2021-02-08 18:40:31 +0530 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-03-09 11:00:57 +0100 |
commit | 594a2b742b15a81e3bb41938c25ad6520c38e3cc (patch) | |
tree | aee7934baf58a8916c60c1008505fa02f495f3af /hw | |
parent | 2c7e2ad243b92f02555498392fb4ce761db8ceb3 (diff) | |
download | qemu-594a2b742b15a81e3bb41938c25ad6520c38e3cc.zip qemu-594a2b742b15a81e3bb41938c25ad6520c38e3cc.tar.gz qemu-594a2b742b15a81e3bb41938c25ad6520c38e3cc.tar.bz2 |
hw/block/nvme: use locally assigned QEMU IEEE OUI
Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed
the controller to use a Red Hat assigned PCI Device and Vendor ID, but
did not change the IEEE OUI away from the Intel IEEE OUI.
Fix that and use the locally assigned QEMU IEEE OUI instead if the
`use-intel-id` parameter is not explicitly set. Also reverse the Intel
IEEE OUI bytes.
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/nvme.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2addaf7..a54ef34 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -4707,9 +4707,17 @@ static void nvme_init_ctrl(NvmeCtrl *n, PCIDevice *pci_dev) id->cntlid = cpu_to_le16(n->cntlid); id->rab = 6; - id->ieee[0] = 0x00; - id->ieee[1] = 0x02; - id->ieee[2] = 0xb3; + + if (n->params.use_intel_id) { + id->ieee[0] = 0xb3; + id->ieee[1] = 0x02; + id->ieee[2] = 0x00; + } else { + id->ieee[0] = 0x00; + id->ieee[1] = 0x54; + id->ieee[2] = 0x52; + } + id->mdts = n->params.mdts; id->ver = cpu_to_le32(NVME_SPEC_VER); id->oacs = cpu_to_le16(0); |