aboutsummaryrefslogtreecommitdiff
path: root/hw/pcnet.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-11 15:19:52 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-02-11 15:19:52 +0000
commit72da42085924f65c78e6ec478373f51a9e49e48d (patch)
tree1b065d0e96fb147fd75447a5fec8ed119a746e2d /hw/pcnet.c
parent3ae806189842c70cf47e041b3c498c65683e5a21 (diff)
downloadqemu-72da42085924f65c78e6ec478373f51a9e49e48d.zip
qemu-72da42085924f65c78e6ec478373f51a9e49e48d.tar.gz
qemu-72da42085924f65c78e6ec478373f51a9e49e48d.tar.bz2
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
Diffstat (limited to 'hw/pcnet.c')
-rw-r--r--hw/pcnet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/pcnet.c b/hw/pcnet.c
index 5642099..15167ac 100644
--- a/hw/pcnet.c
+++ b/hw/pcnet.c
@@ -1985,7 +1985,7 @@ static void pci_physical_memory_read(void *dma_opaque, target_phys_addr_t addr,
cpu_physical_memory_read(addr, buf, len);
}
-void pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn)
+PCIDevice *pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn)
{
PCNetState *d;
uint8_t *pci_conf;
@@ -2032,6 +2032,7 @@ void pci_pcnet_init(PCIBus *bus, NICInfo *nd, int devfn)
d->pci_dev = &d->dev;
pcnet_common_init(d, nd);
+ return (PCIDevice *)d;
}
/* SPARC32 interface */