ia64/xen-unstable

changeset 1118:ff30aea0a126

bitkeeper revision 1.744 (403b3e998qfunbnRrA28QT9bw3Ynkw)

undo kaf interim fix
author smh22@tempest.cl.cam.ac.uk
date Tue Feb 24 12:07:53 2004 +0000 (2004-02-24)
parents 8829a6af2d2c b9d4e1aaee8c
children 33e3adc72d8b
files xen/drivers/block/cciss.c
line diff
     1.1 --- a/xen/drivers/block/cciss.c	Tue Feb 24 11:35:44 2004 +0000
     1.2 +++ b/xen/drivers/block/cciss.c	Tue Feb 24 12:07:53 2004 +0000
     1.3 @@ -441,37 +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 -    /* Bail if there is no controller. */
    1.10 -    if ( hba[ctlr] == NULL )
    1.11 -        return;
    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 +    for(ctlr = 0; ctlr < MAX_CTLR; ctlr++) { 
    1.21 +
    1.22 +	if(hba[ctlr] != NULL) { 
    1.23  
    1.24 -	if ( xdi->count == xdi->max )
    1.25 -	    BUG();
    1.26 -
    1.27 -	hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
    1.28 -	    hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
    1.29 +	    /* Loop through each real device */ 
    1.30 +	    for(i=0; i < NWD; i++) {
    1.31 +		
    1.32 +		drv = &(hba[ctlr]->drv[i]);
    1.33 +		
    1.34 +		if (!(drv->nr_blocks))
    1.35 +		    continue;
    1.36 +		
    1.37 +		if ( xdi->count == xdi->max )
    1.38 +		    BUG();
    1.39 +	
    1.40  	
    1.41 -	/* We export 'raw' linux device numbers to domain 0. */
    1.42 -	xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
    1.43 -	xd->info     = XD_TYPE_DISK;   /* XXX should check properly   */
    1.44 -        xd->capacity = drv->nr_blocks; /* in terms of 512byte sectors */
    1.45 -	xd->domain   = 0;
    1.46 +		hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
    1.47 +		    hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
    1.48  	
    1.49 -	xdi->count++;
    1.50 -        xd++;
    1.51 +		/* We export 'raw' linux device numbers to domain 0. */
    1.52 +		xd->device   = MKDEV(hba[ctlr]->major, i << 4); 
    1.53 +		xd->info     = XD_TYPE_DISK;   /* XXX should check properly  */
    1.54 +		xd->capacity = drv->nr_blocks; /* number of 512 byte sectors */
    1.55 +		xd->domain   = 0;
    1.56 +		
    1.57 +		xdi->count++;
    1.58 +		xd++;
    1.59  	
    1.60 +	    }
    1.61 +
    1.62 +	}
    1.63      }
    1.64  
    1.65 +    return; 
    1.66  }
    1.67  
    1.68  /*
    1.69 @@ -3412,7 +3416,7 @@ static struct pci_driver cciss_pci_drive
    1.70  int __init cciss_init(void)
    1.71  {
    1.72  
    1.73 -/*	printk(KERN_INFO DRIVER_NAME "\n");*/
    1.74 +	printk(KERN_INFO DRIVER_NAME "\n");
    1.75  	/* Register for out PCI devices */
    1.76  	return pci_module_init(&cciss_pci_driver);
    1.77  }