[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 17/47] hw/ppc: use pci_init_nic_devices()
From: |
David Woodhouse |
Subject: |
[PATCH v4 17/47] hw/ppc: use pci_init_nic_devices() |
Date: |
Fri, 26 Jan 2024 17:24:54 +0000 |
From: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
hw/ppc/e500.c | 4 +---
hw/ppc/mac_newworld.c | 4 +---
hw/ppc/mac_oldworld.c | 4 +---
hw/ppc/ppc440_bamboo.c | 14 +++++---------
4 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 566f1200dd..3bd12b54ab 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -1079,9 +1079,7 @@ void ppce500_init(MachineState *machine)
if (pci_bus) {
/* Register network interfaces. */
- for (i = 0; i < nb_nics; i++) {
- pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL);
- }
+ pci_init_nic_devices(pci_bus, mc->default_nic);
}
/* Register spinning region */
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 535710314a..b36dbaf2b6 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -444,9 +444,7 @@ static void ppc_core99_init(MachineState *machine)
graphic_depth = 15;
}
- for (i = 0; i < nb_nics; i++) {
- pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL);
- }
+ pci_init_nic_devices(pci_bus, mc->default_nic);
/* The NewWorld NVRAM is not located in the MacIO device */
if (kvm_enabled() && qemu_real_host_page_size() > 4096) {
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 9acc7adfc9..1981d3d8f6 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -277,9 +277,7 @@ static void ppc_heathrow_init(MachineState *machine)
pci_vga_init(pci_bus);
- for (i = 0; i < nb_nics; i++) {
- pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL);
- }
+ pci_init_nic_devices(pci_bus, mc->default_nic);
/* MacIO IDE */
ide_drive_get(hd, ARRAY_SIZE(hd));
diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c
index a189942de4..c75c3083e6 100644
--- a/hw/ppc/ppc440_bamboo.c
+++ b/hw/ppc/ppc440_bamboo.c
@@ -161,7 +161,6 @@ static void bamboo_init(MachineState *machine)
DeviceState *uicdev;
SysBusDevice *uicsbd;
int success;
- int i;
if (kvm_enabled()) {
error_report("machine %s does not support the KVM accelerator",
@@ -234,14 +233,11 @@ static void bamboo_init(MachineState *machine)
}
if (pcibus) {
- /* Register network interfaces. */
- for (i = 0; i < nb_nics; i++) {
- /*
- * There are no PCI NICs on the Bamboo board, but there are
- * PCI slots, so we can pick whatever default model we want.
- */
- pci_nic_init_nofail(&nd_table[i], pcibus, mc->default_nic, NULL);
- }
+ /*
+ * There are no PCI NICs on the Bamboo board, but there are
+ * PCI slots, so we can pick whatever default model we want.
+ */
+ pci_init_nic_devices(pcibus, mc->default_nic);
}
/* Load kernel. */
--
2.43.0
- [PATCH v4 05/47] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices(), (continued)
- [PATCH v4 05/47] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 21/47] hw/arm/allwinner: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 04/47] hw/pci: add pci_init_nic_devices(), pci_init_nic_in_slot(), David Woodhouse, 2024/01/26
- [PATCH v4 25/47] hw/net/smc91c111: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 37/47] hw/net/lasi_i82596: Re-enable build, David Woodhouse, 2024/01/26
- [PATCH v4 35/47] hw/mips/mipssim: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 38/47] hw/net/lasi_i82596: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 39/47] hw/openrisc/openrisc_sim: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 14/47] hw/mips/loongson3_virt: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 26/47] hw/net/lan9118: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 17/47] hw/ppc: use pci_init_nic_devices(),
David Woodhouse <=
- [PATCH v4 20/47] hw/xtensa/virt: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 36/47] hw/mips/jazz: use qemu_find_nic_info(), David Woodhouse, 2024/01/26
- [PATCH v4 02/47] net: report list of available models according to platform, David Woodhouse, 2024/01/26
- [PATCH v4 30/47] hw/arm: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 41/47] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 24/47] hw/arm/fsl: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 40/47] hw/riscv: use qemu_configure_nic_device(), David Woodhouse, 2024/01/26
- [PATCH v4 46/47] net: remove qemu_show_nic_models(), qemu_find_nic_model(), David Woodhouse, 2024/01/26
- [PATCH v4 13/47] hw/mips/malta: use pci_init_nic_devices(), David Woodhouse, 2024/01/26
- [PATCH v4 12/47] hw/mips/fuloong2e: use pci_init_nic_devices(), David Woodhouse, 2024/01/26