Commit
8d93297 introduced a bug whereby non-inbuilt NICs are realized before
setting the default MAC address causing an assert. Switch NIC creation
over from pci_create_simple() to pci_create() which works exactly the
same except omitting the realize as originally intended.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
memcpy(&macaddr, &nd->macaddr.a, sizeof(MACAddr));
onboard_nic = true;
} else {
- pci_dev = pci_create_simple(pci_busB, -1, "sunhme");
+ pci_dev = pci_create(pci_busB, -1, "sunhme");
}
} else {
- pci_dev = pci_create_simple(pci_busB, -1, nd->model);
+ pci_dev = pci_create(pci_busB, -1, nd->model);
}
dev = &pci_dev->qdev;