]> git.proxmox.com Git - qemu.git/blobdiff - hw/ne2000.c
Devfn number for network PCI cards, by Aurelien Jarno.
[qemu.git] / hw / ne2000.c
index 94700c17b9988f6362a4780e12ee85eadc95f63f..a045a204307fd09731e136f111c9a0cf7dcdeb65 100644 (file)
@@ -781,7 +781,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)
+void pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
 {
     PCINE2000State *d;
     NE2000State *s;
@@ -789,7 +789,7 @@ void pci_ne2000_init(PCIBus *bus, NICInfo *nd)
     
     d = (PCINE2000State *)pci_register_device(bus,
                                               "NE2000", sizeof(PCINE2000State),
-                                              -1
+                                              devfn
                                               NULL, NULL);
     pci_conf = d->dev.config;
     pci_conf[0x00] = 0xec; // Realtek 8029