Revision 32a8f6ae hw/eepro100.c
b/hw/eepro100.c | ||
---|---|---|
1710 | 1710 |
qemu_put_buffer(f, s->configuration, sizeof(s->configuration)); |
1711 | 1711 |
} |
1712 | 1712 |
|
1713 |
static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd, |
|
1714 |
const char *name, uint32_t device) |
|
1713 |
static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd, uint32_t device) |
|
1715 | 1714 |
{ |
1716 | 1715 |
PCIEEPRO100State *d; |
1717 | 1716 |
EEPRO100State *s; |
1718 | 1717 |
|
1719 | 1718 |
logout("\n"); |
1720 | 1719 |
|
1721 |
d = (PCIEEPRO100State *) pci_register_device(bus, name,
|
|
1720 |
d = (PCIEEPRO100State *) pci_register_device(bus, nd->model,
|
|
1722 | 1721 |
sizeof(PCIEEPRO100State), -1, |
1723 | 1722 |
NULL, NULL); |
1724 | 1723 |
|
... | ... | |
1757 | 1756 |
|
1758 | 1757 |
qemu_register_reset(nic_reset, s); |
1759 | 1758 |
|
1760 |
register_savevm(name, -1, 3, nic_save, nic_load, s);
|
|
1759 |
register_savevm(s->vc->model, -1, 3, nic_save, nic_load, s);
|
|
1761 | 1760 |
return (PCIDevice *)d; |
1762 | 1761 |
} |
1763 | 1762 |
|
1764 | 1763 |
PCIDevice *pci_i82551_init(PCIBus * bus, NICInfo * nd, int devfn) |
1765 | 1764 |
{ |
1766 |
return nic_init(bus, nd, "i82551", i82551); |
|
1767 |
//~ uint8_t *pci_conf = d->dev.config; |
|
1765 |
return nic_init(bus, nd, i82551); |
|
1768 | 1766 |
} |
1769 | 1767 |
|
1770 | 1768 |
PCIDevice *pci_i82557b_init(PCIBus * bus, NICInfo * nd, int devfn) |
1771 | 1769 |
{ |
1772 |
return nic_init(bus, nd, "i82557b", i82557B);
|
|
1770 |
return nic_init(bus, nd, i82557B); |
|
1773 | 1771 |
} |
1774 | 1772 |
|
1775 | 1773 |
PCIDevice *pci_i82559er_init(PCIBus * bus, NICInfo * nd, int devfn) |
1776 | 1774 |
{ |
1777 |
return nic_init(bus, nd, "i82559er", i82559ER);
|
|
1775 |
return nic_init(bus, nd, i82559ER); |
|
1778 | 1776 |
} |
1779 | 1777 |
|
1780 | 1778 |
/* eof */ |
Also available in: Unified diff