ia64/xen-unstable

changeset 14942:2b09108f365e

hvm ioemu: Do not initialise the LSI SCSI interface if no SCSI discs
are attached to the guest.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Apr 25 18:12:03 2007 +0100 (2007-04-25)
parents 189efb0b27f9
children 59ea9dadfd07
files tools/ioemu/hw/pc.c
line diff
     1.1 --- a/tools/ioemu/hw/pc.c	Wed Apr 25 16:18:34 2007 +0100
     1.2 +++ b/tools/ioemu/hw/pc.c	Wed Apr 25 18:12:03 2007 +0100
     1.3 @@ -923,11 +923,12 @@ static void pc_init1(uint64_t ram_size, 
     1.4  #else
     1.5      if (pci_enabled) {
     1.6          void *scsi;
     1.7 -
     1.8 -        scsi = lsi_scsi_init(pci_bus, -1);
     1.9          for (i = 0; i < MAX_SCSI_DISKS ; i++) {
    1.10 -            if (bs_table[i + MAX_DISKS]) 
    1.11 -                lsi_scsi_attach(scsi, bs_table[i + MAX_DISKS], -1);
    1.12 +            if (!bs_table[i + MAX_DISKS])
    1.13 +                continue;
    1.14 +            if (!scsi)
    1.15 +                scsi = lsi_scsi_init(pci_bus, -1);
    1.16 +            lsi_scsi_attach(scsi, bs_table[i + MAX_DISKS], -1);
    1.17          }
    1.18      }
    1.19  #endif /* !CONFIG_DM */