summary refs log tree commit diff stats
path: root/hw/sparc64/sun4u.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-10-15 10:05:59 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2017-10-19 07:45:35 +0100
commitbcf9e2c2f2b7a610efaafc4bd6d0bee9181c2345 (patch)
tree082607f0bca2aba2ef5791dae75e522ff365ace0 /hw/sparc64/sun4u.c
parent6864fa38972081833f79b39df74b9c08cc94f6cc (diff)
downloadfocaccia-qemu-bcf9e2c2f2b7a610efaafc4bd6d0bee9181c2345.tar.gz
focaccia-qemu-bcf9e2c2f2b7a610efaafc4bd6d0bee9181c2345.zip
sun4u: fix assert when adding NICs which aren't the in-built model
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>
Diffstat (limited to 'hw/sparc64/sun4u.c')
-rw-r--r--hw/sparc64/sun4u.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 55d81ee73e..77a787466a 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -494,10 +494,10 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
                 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;