From patchwork Thu Jan 15 07:36:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Yang" X-Patchwork-Id: 2431 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0F7YJ9Z025613 for ; Wed, 14 Jan 2009 23:34:20 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762540AbZAOHh5 (ORCPT ); Thu, 15 Jan 2009 02:37:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762549AbZAOHh5 (ORCPT ); Thu, 15 Jan 2009 02:37:57 -0500 Received: from mga09.intel.com ([134.134.136.24]:39796 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762371AbZAOHhz (ORCPT ); Thu, 15 Jan 2009 02:37:55 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 14 Jan 2009 23:29:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.37,268,1231142400"; d="scan'208,223";a="378640058" Received: from fmsmsxpoc001.amr.corp.intel.com ([132.233.49.22]) by orsmga002.jf.intel.com with ESMTP; 14 Jan 2009 23:36:05 -0800 Received: from fmsmsxTAP001.amr.corp.intel.com (10.19.9.33) by fmsmsxpoc001.amr.corp.intel.com (132.233.49.22) with Microsoft SMTP Server (TLS) id 8.1.311.2; Wed, 14 Jan 2009 23:37:33 -0800 Received: from pdsmsx602.ccr.corp.intel.com (172.16.12.184) by fmsmsxTAP001.amr.corp.intel.com (10.19.9.33) with Microsoft SMTP Server (TLS) id 8.1.311.2; Wed, 14 Jan 2009 23:37:32 -0800 Received: from pdsmsx502.ccr.corp.intel.com ([172.16.12.96]) by pdsmsx602.ccr.corp.intel.com ([172.16.12.184]) with mapi; Thu, 15 Jan 2009 15:37:31 +0800 From: "Zhang, Yang" To: "kvm-ia64@vger.kernel.org" CC: "kvm@vger.kernel.org" , Avi Kivity , "Zhang, Xiantao" Date: Thu, 15 Jan 2009 15:36:53 +0800 Subject: [PATCH] KVM : Qemu: update call pci_nic_init Thread-Topic: [PATCH] KVM : Qemu: update call pci_nic_init Thread-Index: Acl25AjlREA2VVy5SDanIzH49Rt85w== Message-ID: <10C63FAD690C13458F0B32BCED571F1403D74F21@pdsmsx502.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hi As the definition pci_nic_init has modified, this patch update the corresponding calling in ipf_init1(). From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00 2001 From: Yang Date: Thu, 15 Jan 2009 13:09:43 +0800 Subject: [PATCH] KVM : Qemu: update call pci_nic_init update call pci_nic_init in ipf_init1 Signed-off-by: Xiantao Zhang Signed-off-by: Yang Zhang Acked-by: Mark McLoughlin --- qemu/hw/ipf.c | 26 +++++--------------------- 1 files changed, 5 insertions(+), 21 deletions(-) diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c index 4e9b052..0326ee9 100644 --- a/qemu/hw/ipf.c +++ b/qemu/hw/ipf.c @@ -550,28 +550,12 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size, } for(i = 0; i < nb_nics; i++) { - nd = &nd_table[i]; - if (!nd->model) { - if (pci_enabled) { - nd->model = "ne2k_pci"; - } else { - nd->model = "ne2k_isa"; - } - } - if (strcmp(nd->model, "ne2k_isa") == 0) { + NICInfo *nd = &nd_table[i]; + + if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0)) pc_init_ne2k_isa(nd, i8259); - } else if (pci_enabled) { - if (strcmp(nd->model, "?") == 0) - fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n"); - if (!pci_nic_init(pci_bus, nd, -1)) - exit(1); - } else if (strcmp(nd->model, "?") == 0) { - fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n"); - exit(1); - } else { - fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model); - exit(1); - } + else + pci_nic_init(pci_bus, nd, -1, "e1000"); } #undef USE_HYPERCALL //Disable it now, need to implement later!