[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-8.3 v2 13/46] hw/mips/malta: use pci_init_nic_devices()
From: |
David Woodhouse |
Subject: |
[PATCH for-8.3 v2 13/46] hw/mips/malta: use pci_init_nic_devices() |
Date: |
Mon, 6 Nov 2023 19:49:18 +0000 |
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 049de46a9e..0998d94053 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -605,18 +605,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.41.0
- [PATCH for-8.3 v2 24/46] hw/arm/fsl: use qemu_configure_nic_device(), (continued)
- [PATCH for-8.3 v2 24/46] hw/arm/fsl: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 16/46] hw/ppc/spapr: use qemu_get_nic_info() and pci_init_nic_devices(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 15/46] hw/ppc/prep: use pci_init_nic_devices(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 21/46] hw/arm/allwinner: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 06/46] hw/xen: use qemu_create_nic_bus_devices() to instantiate Xen NICs, David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 30/46] hw/arm: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 10/46] hw/hppa: use pci_init_nic_devices(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 25/46] hw/net/smc91c111: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 41/46] hw/sparc/sun4m: use qemu_find_nic_info(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 26/46] hw/net/lan9118: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 13/46] hw/mips/malta: use pci_init_nic_devices(),
David Woodhouse <=
- [PATCH for-8.3 v2 35/46] hw/mips/mipssim: use qemu_create_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 37/46] hw/net/lasi_i82596: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 46/46] net: make nb_nics and nd_table[] static in net/net.c, David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 03/46] net: add qemu_create_nic_bus_devices(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 31/46] hw/net/etraxfs-eth: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 18/46] hw/sh4/r2d: use pci_init_nic_devices(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 34/46] hw/microblaze: use qemu_configure_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 32/46] hw/m68k/mcf5208: use qemu_create_nic_device(), David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 02/46] net: report list of available models according to platform, David Woodhouse, 2023/11/06
- [PATCH for-8.3 v2 36/46] hw/mips/jazz: use qemu_find_nic_info(), David Woodhouse, 2023/11/06