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/e1000.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/e1000.c') diff --git a/hw/e1000.c b/hw/e1000.c index 6f841d66a8..14c8297b31 100644 --- a/hw/e1000.c +++ b/hw/e1000.c @@ -1034,7 +1034,7 @@ e1000_mmio_map(PCIDevice *pci_dev, int region_num, excluded_regs[i] - 4); } -void +PCIDevice * pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn) { E1000State *d; @@ -1092,4 +1092,6 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn) qemu_format_nic_info_str(d->vc, d->nd->macaddr); register_savevm(info_str, -1, 2, nic_save, nic_load, d); + + return (PCIDevice *)d; } -- cgit v1.2.3