[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 15/45] hw/ppc/prep: use pci_init_nic_devices()
From: |
David Woodhouse |
Subject: |
[PATCH 15/45] hw/ppc/prep: use pci_init_nic_devices() |
Date: |
Sun, 22 Oct 2023 16:51:30 +0100 |
From: David Woodhouse <dwmw@amazon.co.uk>
Previously, the first PCI NIC would be placed in PCI slot 3 and the rest
would be dynamically assigned. Even if the user overrode the default NIC
type and made it something other than PCNet.
Now, the first PCNet NIC (that is, anything not explicitly specified
to be anything different) will go to slot 3 even if it isn't the first
NIC specified on the commnd line. And anything else will be dynamically
assigned.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/ppc/prep.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index 137276bcb9..1a08e74945 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -336,10 +336,9 @@ static void ibm_40p_init(MachineState *machine)
/* XXX: s3-trio at PCI_DEVFN(2, 0) */
pci_vga_init(pci_bus);
- for (i = 0; i < nb_nics; i++) {
- pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic,
- i == 0 ? "3" : NULL);
- }
+ /* First PCNET device at PCI_DEVFN(3, 0) */
+ pci_init_nic_in_slot(pci_bus, mc->default_nic, NULL, "3");
+ pci_init_nic_devices(pci_bus, mc->default_nic);
}
/* Prepare firmware configuration for OpenBIOS */
--
2.40.1
- [PATCH 01/45] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), (continued)
- [PATCH 01/45] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), David Woodhouse, 2023/10/22
- [PATCH 05/45] hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 23/45] hw/arm/exynos4: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 35/45] hw/mips: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 14/45] hw/mips/loongson3_virt: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 44/45] net: remove qemu_show_nic_models(), qemu_find_nic_model(), David Woodhouse, 2023/10/22
- [PATCH 29/45] hw/arm/stellaris: use qemu_find_nic_info(), David Woodhouse, 2023/10/22
- [PATCH 13/45] hw/mips/malta: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 26/45] hw/net/lan9118: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 10/45] hw/hppa: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 15/45] hw/ppc/prep: use pci_init_nic_devices(),
David Woodhouse <=
- [PATCH 02/45] net: report list of available models according to platform, David Woodhouse, 2023/10/22
- [PATCH 37/45] hw/openrisc/openrisc_sim: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 38/45] hw/riscv: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 16/45] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 34/45] hw/microblaze: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 28/45] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases, David Woodhouse, 2023/10/22
- [PATCH 25/45] hw/net/smc91c111: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 36/45] hw/net/lasi_i82596: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22