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

[Xen-changelog] [xen-unstable] hvmloader: Scan for gpxe-capable NICs until one is found.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244041954 -3600
# Node ID 011948e1b5a7a01def6780093c46ebe99c4d25ba
# Parent  c4b048ce6a4b61111382ce37c6afaeed0234282e
hvmloader: Scan for gpxe-capable NICs until one is found.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/firmware/hvmloader/hvmloader.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r c4b048ce6a4b -r 011948e1b5a7 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Wed Jun 03 14:40:34 2009 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Wed Jun 03 16:12:34 2009 +0100
@@ -451,8 +451,9 @@ static int scan_etherboot_nic(uint32_t c
 {
     uint8_t devfn;
     uint16_t class, vendor_id, device_id;
-
-    for ( devfn = 0; devfn < 128; devfn++ )
+    int rom_size = 0;
+
+    for ( devfn = 0; (devfn < 128) && !rom_size; devfn++ )
     {
         class     = pci_readw(devfn, PCI_CLASS_DEVICE);
         vendor_id = pci_readw(devfn, PCI_VENDOR_ID);
@@ -462,11 +463,11 @@ static int scan_etherboot_nic(uint32_t c
         if ( (vendor_id != 0xffff) &&
              (device_id != 0xffff) &&
              (class == 0x0200) )
-            return scan_option_rom(
+            rom_size = scan_option_rom(
                 devfn, vendor_id, device_id, etherboot, copy_rom_dest);
     }
 
-    return 0;
+    return rom_size;
 }
 
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.