ia64/xen-unstable

changeset 19709:011948e1b5a7

hvmloader: Scan for gpxe-capable NICs until one is found.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 03 16:12:34 2009 +0100 (2009-06-03)
parents c4b048ce6a4b
children 6e100efd4b48
files tools/firmware/hvmloader/hvmloader.c
line diff
     1.1 --- a/tools/firmware/hvmloader/hvmloader.c	Wed Jun 03 14:40:34 2009 +0100
     1.2 +++ b/tools/firmware/hvmloader/hvmloader.c	Wed Jun 03 16:12:34 2009 +0100
     1.3 @@ -451,8 +451,9 @@ static int scan_etherboot_nic(uint32_t c
     1.4  {
     1.5      uint8_t devfn;
     1.6      uint16_t class, vendor_id, device_id;
     1.7 +    int rom_size = 0;
     1.8  
     1.9 -    for ( devfn = 0; devfn < 128; devfn++ )
    1.10 +    for ( devfn = 0; (devfn < 128) && !rom_size; devfn++ )
    1.11      {
    1.12          class     = pci_readw(devfn, PCI_CLASS_DEVICE);
    1.13          vendor_id = pci_readw(devfn, PCI_VENDOR_ID);
    1.14 @@ -462,11 +463,11 @@ static int scan_etherboot_nic(uint32_t c
    1.15          if ( (vendor_id != 0xffff) &&
    1.16               (device_id != 0xffff) &&
    1.17               (class == 0x0200) )
    1.18 -            return scan_option_rom(
    1.19 +            rom_size = scan_option_rom(
    1.20                  devfn, vendor_id, device_id, etherboot, copy_rom_dest);
    1.21      }
    1.22  
    1.23 -    return 0;
    1.24 +    return rom_size;
    1.25  }
    1.26  
    1.27  /*