diff options
author | Markus Armbruster <armbru@redhat.com> | 2009-06-18 15:14:08 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-22 10:15:29 -0500 |
commit | 5607c38820366954c38dd702e979499486057481 (patch) | |
tree | 9d7f6624fc7b24c6eb887d4b634f57cb6f2b33f1 /hw/mips_malta.c | |
parent | 07b7d05377a5e2b242ef0cce3d461d3284700fc0 (diff) |
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 <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/mips_malta.c')
-rw-r--r-- | hw/mips_malta.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) { |