aboutsummaryrefslogtreecommitdiff
path: root/hw/mips
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2013-06-06 18:48:51 +1000
committerMichael S. Tsirkin <mst@redhat.com>2013-07-07 23:10:57 +0300
commit29b358f93a48a415853d11fc9b02f711b5ec8f76 (patch)
treeb09d6014da1942fe62614830996552dec90fd18d /hw/mips
parent85c6e4fabb4c26e5cd8a024415ed2f5bcdd578db (diff)
pci: Add root bus parameter to pci_nic_init()
At present, pci_nic_init() and pci_nic_init_nofail() assume that they will only create a NIC under the primary PCI root. As we add support for multiple PCI roots, that may no longer be the case. This patch adds a root bus parameter to pci_nic_init() (and updates callers accordingly) to allow the machine init code using it to specify the right PCI root for NICs created by old-style -net nic parameters. NICs created new-style, with -device can of course be put anywhere. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/mips')
-rw-r--r--hw/mips/mips_fulong2e.c6
-rw-r--r--hw/mips/mips_malta.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c
index 00c9071af1..db67966531 100644
--- a/hw/mips/mips_fulong2e.c
+++ b/hw/mips/mips_fulong2e.c
@@ -231,7 +231,7 @@ static void audio_init (PCIBus *pci_bus)
}
/* Network support */
-static void network_init (void)
+static void network_init (PCIBus *pci_bus)
{
int i;
@@ -244,7 +244,7 @@ static void network_init (void)
default_devaddr = "07";
}
- pci_nic_init_nofail(nd, "rtl8139", default_devaddr);
+ pci_nic_init_nofail(nd, pci_bus, "rtl8139", default_devaddr);
}
}
@@ -393,7 +393,7 @@ static void mips_fulong2e_init(QEMUMachineInitArgs *args)
/* Sound card */
audio_init(pci_bus);
/* Network card */
- network_init();
+ network_init(pci_bus);
}
static QEMUMachine mips_fulong2e_machine = {
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 8a4459d0b2..5843fadcb0 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -468,7 +468,7 @@ static MaltaFPGAState *malta_fpga_init(MemoryRegion *address_space,
}
/* Network support */
-static void network_init(void)
+static void network_init(PCIBus *pci_bus)
{
int i;
@@ -480,7 +480,7 @@ static void network_init(void)
/* The malta board has a PCNet card using PCI SLOT 11 */
default_devaddr = "0b";
- pci_nic_init_nofail(nd, "pcnet", default_devaddr);
+ pci_nic_init_nofail(nd, pci_bus, "pcnet", default_devaddr);
}
}
@@ -985,7 +985,7 @@ void mips_malta_init(QEMUMachineInitArgs *args)
fdctrl_init_isa(isa_bus, fd);
/* Network card */
- network_init();
+ network_init(pci_bus);
/* Optional PCI video card */
pci_vga_init(pci_bus);