From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSuza-0004n2-UV for qemu-devel@nongnu.org; Thu, 07 Jan 2010 11:13:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSuzV-0004ld-9O for qemu-devel@nongnu.org; Thu, 07 Jan 2010 11:13:45 -0500 Received: from [199.232.76.173] (port=54331 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSuzV-0004la-2g for qemu-devel@nongnu.org; Thu, 07 Jan 2010 11:13:41 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:56597) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSuzU-0006Iw-Im for qemu-devel@nongnu.org; Thu, 07 Jan 2010 11:13:40 -0500 From: Stefan Weil Date: Thu, 7 Jan 2010 17:13:30 +0100 Message-Id: <1262880810-16210-1-git-send-email-weil@mail.berlios.de> Subject: [Qemu-devel] [PATCH] eepro100: Update ROM file support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers , "Michael S . Tsirkin" Use new way to associate ROM files to devices. Currently, there is only a ROM file for i82559er included in QEMU, so the patch does not add .romfile for the other devices. When flexible mode is fixed in eepro100, adding more ROM files will be possible. It should be possible to create them from pxe-i82559er.bin, because etherboot uses the same driver for all eepro100 devices (only PCI ids differ). Maybe it is even possible to create a single pxe-i8255x.bin which supports all eepro100 devices (not supported with current etherboot). Signed-off-by: Stefan Weil --- hw/eepro100.c | 11 +---------- 1 files changed, 1 insertions(+), 10 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index a21c984..b33dbb8 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -40,7 +40,6 @@ #include /* offsetof */ #include #include "hw.h" -#include "loader.h" /* rom_add_option */ #include "pci.h" #include "net.h" #include "eeprom93xx.h" @@ -1894,15 +1893,6 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device) s->vmstate->name = s->nic->nc.model; vmstate_register(-1, s->vmstate, s); - if (!pci_dev->qdev.hotplugged) { - static int loaded = 0; - if (!loaded) { - char fname[32]; - snprintf(fname, sizeof(fname), "pxe-%s.bin", s->nic->nc.model); - rom_add_option(fname); - loaded = 1; - } - } return 0; } @@ -2062,6 +2052,7 @@ static PCIDeviceInfo eepro100_info[] = { .qdev.size = sizeof(EEPRO100State), .init = pci_i82559er_init, .exit = pci_nic_uninit, + .romfile = "pxe-i82559er.bin", .qdev.props = (Property[]) { DEFINE_NIC_PROPERTIES(EEPRO100State, conf), DEFINE_PROP_END_OF_LIST(), -- 1.6.5