[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 7/8] sun4u: create single default onboard ne2k_pci N
From: |
Mark Cave-Ayland |
Subject: |
[Qemu-devel] [PATCH 7/8] sun4u: create single default onboard ne2k_pci NIC for machine |
Date: |
Tue, 11 Jul 2017 22:53:26 +0100 |
As we move towards a real Ultra 5 machine, allow only a single NIC
to be instantiated with the legacy net options. More devices can
be added with the new -netdev and -device options if required.
Signed-off-by: Mark Cave-Ayland <address@hidden>
---
hw/sparc64/sun4u.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 5ddd30f..3bb3bf2 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -427,7 +427,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
unsigned int i;
uint64_t initrd_addr, initrd_size, kernel_addr, kernel_size, kernel_entry;
PCIBus *pci_bus, *pci_busA, *pci_busB;
- PCIDevice *ebus;
+ PCIDevice *ebus, *pci_dev;
ISABus *isa_bus;
SysBusDevice *s;
qemu_irq *ivec_irqs, *pbm_irqs;
@@ -464,8 +464,10 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
serial_hds_isa_init(isa_bus, i, MAX_SERIAL_PORTS);
parallel_hds_isa_init(isa_bus, MAX_PARALLEL_PORTS);
- for(i = 0; i < nb_nics; i++)
- pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL);
+ pci_dev = pci_create(pci_bus, -1, "ne2k_pci");
+ dev = &pci_dev->qdev;
+ qdev_set_nic_properties(dev, &nd_table[0]);
+ qdev_init_nofail(dev);
ide_drive_get(hd, ARRAY_SIZE(hd));
--
1.7.10.4
- [Qemu-devel] [PATCH 0/8] sun4u: change PCI topology to better match a real Ultra 5, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 2/8] sun4u: switch to using qdev to instantiate fw_cfg interface, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 4/8] apb: fix up PCI bus nomenclature, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 3/8] sun4u: expose fw_cfg and NVRAM on ebus PCI IO address space, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 7/8] sun4u: create single default onboard ne2k_pci NIC for machine,
Mark Cave-Ayland <=
- [Qemu-devel] [PATCH 6/8] apb: add busA qdev property to PBM PCI bridge, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 8/8] sun4u: move in-built devices behind PCI bridge A, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 1/8] sun4u: pass PCIDevice into pci_ebus_init() instead of PCIBus, Mark Cave-Ayland, 2017/07/11
- [Qemu-devel] [PATCH 5/8] apb: fix endianness for APB and PCI config accesses, Mark Cave-Ayland, 2017/07/11
- Re: [Qemu-devel] [PATCH 0/8] sun4u: change PCI topology to better match a real Ultra 5, no-reply, 2017/07/11