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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244109201 -3600
# Node ID be44729000d345b41be1741492619e89f35eb69b
# Parent  ab1718dc8024e3b14d79f867cef7066593270d8e
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>
xen-unstable changeset:   19709:011948e1b5a7
xen-unstable date:        Wed Jun 03 16:12:34 2009 +0100
---
 tools/firmware/hvmloader/hvmloader.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -r ab1718dc8024 -r be44729000d3 tools/firmware/hvmloader/hvmloader.c
--- a/tools/firmware/hvmloader/hvmloader.c      Thu Jun 04 10:52:50 2009 +0100
+++ b/tools/firmware/hvmloader/hvmloader.c      Thu Jun 04 10:53:21 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®.