ia64/xen-unstable

changeset 1117:b9d4e1aaee8c

bitkeeper revision 1.740.2.1 (403b3e314yY3Ukw__2nvEZDN9Hks9A)

fix schoolboy error in cciss probe :-)
author smh22@tempest.cl.cam.ac.uk
date Tue Feb 24 12:06:09 2004 +0000 (2004-02-24)
parents dbdb7faab4c9
children ff30aea0a126
files xen/drivers/block/cciss.c
line diff
     1.1 --- a/xen/drivers/block/cciss.c	Mon Feb 23 15:55:27 2004 +0000
     1.2 +++ b/xen/drivers/block/cciss.c	Tue Feb 24 12:06:09 2004 +0000
     1.3 @@ -441,34 +441,41 @@ void cciss_probe_devices(xen_disk_info_t
     1.4      drive_info_struct *drv; 
     1.5      xen_disk_t *xd = &xdi->disks[xdi->count];
     1.6  
     1.7 -    ctlr = 0;  /* XXX SMH: only deal with 1 controller for now */
     1.8 +
     1.9 +    for(ctlr = 0; ctlr < MAX_CTLR; ctlr++) { 
    1.10 +
    1.11 +	if(hba[ctlr] != NULL) { 
    1.12  
    1.13 -    /* Loop through each real device */ 
    1.14 -    for(i=0; i < NWD; i++) {
    1.15 -	
    1.16 -        drv = &(hba[ctlr]->drv[i]);
    1.17 -	
    1.18 -	if (!(drv->nr_blocks))
    1.19 -            continue;
    1.20 -	
    1.21 -	if ( xdi->count == xdi->max )
    1.22 -	    BUG();
    1.23 +	    /* Loop through each real device */ 
    1.24 +	    for(i=0; i < NWD; i++) {
    1.25 +		
    1.26 +		drv = &(hba[ctlr]->drv[i]);
    1.27 +		
    1.28 +		if (!(drv->nr_blocks))
    1.29 +		    continue;
    1.30 +		
    1.31 +		if ( xdi->count == xdi->max )
    1.32 +		    BUG();
    1.33  	
    1.34  	
    1.35 -	hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
    1.36 -	    hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
    1.37 +		hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
    1.38 +		    hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
    1.39  	
    1.40 -	/* We export 'raw' linux device numbers to domain 0. */
    1.41 -	xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
    1.42 -	xd->info     = XD_TYPE_DISK;   /* XXX should check properly   */
    1.43 -        xd->capacity = drv->nr_blocks; /* in terms of 512byte sectors */
    1.44 -	xd->domain   = 0;
    1.45 +		/* We export 'raw' linux device numbers to domain 0. */
    1.46 +		xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
    1.47 +		xd->info     = XD_TYPE_DISK;   /* XXX should check properly  */
    1.48 +		xd->capacity = drv->nr_blocks; /* number of 512 byte sectors */
    1.49 +		xd->domain   = 0;
    1.50 +		
    1.51 +		xdi->count++;
    1.52 +		xd++;
    1.53  	
    1.54 -	xdi->count++;
    1.55 -        xd++;
    1.56 -	
    1.57 +	    }
    1.58 +
    1.59 +	}
    1.60      }
    1.61  
    1.62 +    return; 
    1.63  }
    1.64  
    1.65  /*