qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: QEMU Developers <qemu-devel@nongnu.org>,
	"Michael S . Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH] eepro100: Update ROM file support
Date: Thu,  7 Jan 2010 17:13:30 +0100	[thread overview]
Message-ID: <1262880810-16210-1-git-send-email-weil@mail.berlios.de> (raw)

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 <weil@mail.berlios.de>
---
 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 <stddef.h>             /* offsetof */
 #include <stdbool.h>
 #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

             reply	other threads:[~2010-01-07 16:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 16:13 Stefan Weil [this message]
2010-01-11 18:37 ` [Qemu-devel] Re: [PATCH] eepro100: Update ROM file support Michael S. Tsirkin
2010-01-13 12:14   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262880810-16210-1-git-send-email-weil@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).