From 72da42085924f65c78e6ec478373f51a9e49e48d Mon Sep 17 00:00:00 2001 From: aliguori Date: Wed, 11 Feb 2009 15:19:52 +0000 Subject: qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti) Change the PCI network drivers init functions to return the PCIDev, to inform which slot has been hot-plugged. Also record PCIDevice structure on NICInfo to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/pci.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'hw/pci.h') diff --git a/hw/pci.h b/hw/pci.h index 255ba30..d827d12 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -220,7 +220,7 @@ typedef int (*pci_map_irq_fn)(PCIDevice *pci_dev, int irq_num); PCIBus *pci_register_bus(pci_set_irq_fn set_irq, pci_map_irq_fn map_irq, qemu_irq *pic, int devfn_min, int nirq); -void pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn, +PCIDevice *pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn, const char *default_model); void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len); uint32_t pci_data_read(void *opaque, uint32_t addr, int len); @@ -269,23 +269,23 @@ void usb_ohci_init_pci(struct PCIBus *bus, int num_ports, int devfn); /* eepro100.c */ -void pci_i82551_init(PCIBus *bus, NICInfo *nd, int devfn); -void pci_i82557b_init(PCIBus *bus, NICInfo *nd, int devfn); -void pci_i82559er_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_i82551_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_i82557b_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_i82559er_init(PCIBus *bus, NICInfo *nd, int devfn); /* ne2000.c */ -void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn); /* rtl8139.c */ -void pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_rtl8139_init(PCIBus *bus, NICInfo *nd, int devfn); /* e1000.c */ -void pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn); /* pcnet.c */ -void pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn); +PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn); /* prep_pci.c */ PCIBus *pci_prep_init(qemu_irq *pic); -- cgit v1.1