[PATCH] KVM : Qemu: update call pci_nic_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <yang.zhang@xxxxxxxxx>
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 <xiantao.zhang@xxxxxxxxx>
Signed-off-by: Yang Zhang <yang.zhang@xxxxxxxxx>
---
 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!
-- 
1.6.0.rc1

Attachment: 0001-KVM-Qemu-update-pci_nic_init.patch
Description: 0001-KVM-Qemu-update-pci_nic_init.patch


[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux