[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 13/45] hw/mips/malta: use pci_init_nic_devices()
From: |
David Woodhouse |
Subject: |
[PATCH 13/45] hw/mips/malta: use pci_init_nic_devices() |
Date: |
Sun, 22 Oct 2023 16:51:28 +0100 |
From: David Woodhouse <dwmw@amazon.co.uk>
The Malta board setup code would previously place the first NIC into PCI
slot 11 if was a PCNet card, and the rest (including the first if it was
anything other than a PCNet card) would be dynamically assigned.
Now it will place any PCNet NIC into slot 11, and then anything else will
be dynamically assigned.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/mips/malta.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index dac27fad9d..9357cb4c91 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -606,18 +606,9 @@ static MaltaFPGAState *malta_fpga_init(MemoryRegion
*address_space,
/* Network support */
static void network_init(PCIBus *pci_bus)
{
- int i;
-
- for (i = 0; i < nb_nics; i++) {
- NICInfo *nd = &nd_table[i];
- const char *default_devaddr = NULL;
-
- if (i == 0 && (!nd->model || strcmp(nd->model, "pcnet") == 0))
- /* The malta board has a PCNet card using PCI SLOT 11 */
- default_devaddr = "0b";
-
- pci_nic_init_nofail(nd, pci_bus, "pcnet", default_devaddr);
- }
+ /* The malta board has a PCNet card using PCI SLOT 11 */
+ pci_init_nic_in_slot(pci_bus, "pcnet", NULL, "0b");
+ pci_init_nic_devices(pci_bus, "pcnet");
}
static void bl_setup_gt64120_jump_kernel(void **p, uint64_t run_addr,
--
2.40.1
- [PATCH 28/45] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases, (continued)
- [PATCH 28/45] hw/arm/npcm7xx: use qemu_configure_nic_device, allow emc0/emc1 as aliases, David Woodhouse, 2023/10/22
- [PATCH 29/45] hw/arm/stellaris: use 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 25/45] hw/net/smc91c111: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 39/45] hw/s390x/s390-virtio-ccw: use qemu_create_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 36/45] hw/net/lasi_i82596: use qemu_configure_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 01/45] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info(), David Woodhouse, 2023/10/22
- [PATCH 44/45] net: remove qemu_show_nic_models(), qemu_find_nic_model(), David Woodhouse, 2023/10/22
- [PATCH 21/45] hw/arm/allwinner: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [PATCH 13/45] hw/mips/malta: use pci_init_nic_devices(),
David Woodhouse <=
- [PATCH 31/45] hw/net/etraxfs-eth: use qemu_configure_nic_device(), David Woodhouse, 2023/10/22
- [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