From 5607c38820366954c38dd702e979499486057481 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Jun 2009 15:14:08 +0200 Subject: Support addr=... in option argument of -net nic Make net_client_init() accept addr=, put the value into struct NICinfo. Use it in pci_nic_init(), and remove arguments bus and devfn. Don't support addr= in third argument of monitor command pci_add, because that clashes with its first argument. Admittedly unelegant. Machines "malta" and "r2d" have a default NIC with a well-known PCI address. Deal with that the same way as the NIC model: make pci_nic_init() take an optional default to be used when the user doesn't specify one. Signed-off-by: Markus Armbruster Signed-off-by: Anthony Liguori --- hw/mips_malta.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'hw/mips_malta.c') diff --git a/hw/mips_malta.c b/hw/mips_malta.c index ed104f0742..e9164682a3 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -474,19 +474,19 @@ static void audio_init (PCIBus *pci_bus) #endif /* Network support */ -static void network_init (PCIBus *pci_bus) +static void network_init(void) { int i; for(i = 0; i < nb_nics; i++) { NICInfo *nd = &nd_table[i]; - int devfn = -1; + 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 */ - devfn = 88; + default_devaddr = "0b"; - pci_nic_init(pci_bus, nd, devfn, "pcnet"); + pci_nic_init(nd, "pcnet", default_devaddr); } } @@ -943,7 +943,7 @@ void mips_malta_init (ram_addr_t ram_size, #endif /* Network card */ - network_init(pci_bus); + network_init(); /* Optional PCI video card */ if (cirrus_vga_enabled) { -- cgit v1.2.3-55-g7522