summaryrefslogtreecommitdiffstats
path: root/hw/rtl8139.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-12-18 12:01:08 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-18 11:26:34 -0600
commit8c52c8f320b27684ec3b1a649925b75af376b1f7 (patch)
tree3319fe6f7e835d0a718000ae04be89f380d72406 /hw/rtl8139.c
parentc2039bd0ffce8807e0eaac55254fde790825fa92 (diff)
downloadhqemu-8c52c8f320b27684ec3b1a649925b75af376b1f7.zip
hqemu-8c52c8f320b27684ec3b1a649925b75af376b1f7.tar.gz
pci romfiles: add property, add default to PCIDeviceInfo
This patch adds a romfile property to the pci bus. It allows to specify a romfile to load into the rom bar of the pci device. The default value comes from a new field in PCIDeviceInfo. The property allows to change the file and also to disable the rom loading using an empty string. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/rtl8139.c')
-rw-r--r--hw/rtl8139.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 2cee97b..fcdcd1d 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3353,14 +3353,6 @@ static int pci_rtl8139_init(PCIDevice *dev)
qemu_mod_timer(s->timer,
rtl8139_get_next_tctr_time(s,qemu_get_clock(vm_clock)));
#endif /* RTL8139_ONBOARD_TIMER */
-
- if (!dev->qdev.hotplugged) {
- static int loaded = 0;
- if (!loaded) {
- pci_add_option_rom(&s->dev, "pxe-rtl8139.bin");
- loaded = 1;
- }
- }
return 0;
}
@@ -3371,6 +3363,7 @@ static PCIDeviceInfo rtl8139_info = {
.qdev.vmsd = &vmstate_rtl8139,
.init = pci_rtl8139_init,
.exit = pci_rtl8139_uninit,
+ .romfile = "pxe-rtl8139.bin",
.qdev.props = (Property[]) {
DEFINE_NIC_PROPERTIES(RTL8139State, conf),
DEFINE_PROP_END_OF_LIST(),
OpenPOWER on IntegriCloud