From patchwork Fri Oct 16 13:42:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 36217 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AB353B7BBB for ; Sat, 17 Oct 2009 01:15:04 +1100 (EST) Received: from localhost ([127.0.0.1]:51338 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myna9-0006zA-RF for incoming@patchwork.ozlabs.org; Fri, 16 Oct 2009 10:15:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myn4Y-0001uY-6E for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Myn4S-0001rq-1B for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:19 -0400 Received: from [199.232.76.173] (port=40526 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myn4Q-0001rX-Uy for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23478) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Myn4Q-0007o1-Fu for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:14 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9GDgDd4021377 for ; Fri, 16 Oct 2009 09:42:13 -0400 Received: from zweiblum.home.kraxel.org (vpn2-9-112.ams2.redhat.com [10.36.9.112]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n9GDgAqo000431; Fri, 16 Oct 2009 09:42:11 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id 24D1B7010A; Fri, 16 Oct 2009 15:42:04 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 16 Oct 2009 15:42:03 +0200 Message-Id: <1255700523-15270-11-git-send-email-kraxel@redhat.com> In-Reply-To: <1255700523-15270-1-git-send-email-kraxel@redhat.com> References: <1255700523-15270-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [RfC PATCH v3 10/10] ne2k_pci: load rom. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/ne2000.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/ne2000.c b/hw/ne2000.c index f296b10..6cb5f58 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -25,6 +25,7 @@ #include "pci.h" #include "net.h" #include "ne2000.h" +#include "loader.h" /* debug NE2000 card */ //#define DEBUG_NE2000 @@ -767,6 +768,14 @@ static int pci_ne2000_init(PCIDevice *pci_dev) ne2000_cleanup, s); qemu_format_nic_info_str(s->vc, s->c.macaddr.a); + if (!pci_dev->qdev.hotplugged) { + static int loaded = 0; + if (!loaded) { + rom_add_option("pxe-ne2k_pci.bin"); + loaded = 1; + } + } + register_savevm("ne2000", -1, 3, pci_ne2000_save, pci_ne2000_load, d); return 0; }