[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 12/45] hw/mips/fuloong2e: use pci_init_nic_devices(), (continued)
- [PATCH 12/45] hw/mips/fuloong2e: 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 42/45] net: remove qemu_check_nic_model(), David Woodhouse, 2023/10/22
- [PATCH 10/45] hw/hppa: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 45/45] net: make nb_nics and nd_table[] static in net/net.c, David Woodhouse, 2023/10/22
- [PATCH 17/45] hw/ppc: use pci_init_nic_devices(), David Woodhouse, 2023/10/22
- [PATCH 11/45] hw/loongarch: use 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 43/45] hw/pci: remove pci_nic_init_nofail(), David Woodhouse, 2023/10/22
- [PATCH 03/45] net: add qemu_create_nic_bus_devices(), David Woodhouse, 2023/10/22
- [PATCH 15/45] hw/ppc/prep: use pci_init_nic_devices(),
David Woodhouse <=
- [PATCH 09/45] hw/arm/virt: use pci_init_nic_devices(), David Woodhouse, 2023/10/22