mirror of
https://github.com/mii443/qemu.git
synced 2025-09-03 23:59:38 +00:00
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 <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
@ -777,7 +777,7 @@ static void ne2000_map(PCIDevice *pci_dev, int region_num,
|
||||
register_ioport_read(addr + 0x1f, 1, 1, ne2000_reset_ioport_read, s);
|
||||
}
|
||||
|
||||
void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
|
||||
PCIDevice *pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
|
||||
{
|
||||
PCINE2000State *d;
|
||||
NE2000State *s;
|
||||
@ -807,4 +807,6 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
|
||||
qemu_format_nic_info_str(s->vc, s->macaddr);
|
||||
|
||||
register_savevm("ne2000", -1, 3, ne2000_save, ne2000_load, s);
|
||||
|
||||
return (PCIDevice *)d;
|
||||
}
|
||||
|
Reference in New Issue
Block a user