ia64/xen-unstable

changeset 1114:6f46495a58dd

bitkeeper revision 1.740.1.1 (403b2d9cPtJ1eKIhZY0pelA-D7cKLA)

cciss.c:
Fix CCISS driver when no controller present.
author kaf24@scramble.cl.cam.ac.uk
date Tue Feb 24 10:55:24 2004 +0000 (2004-02-24)
parents dbdb7faab4c9
children bc02f2f73b0e
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 10:55:24 2004 +0000
     1.3 @@ -443,6 +443,10 @@ void cciss_probe_devices(xen_disk_info_t
     1.4  
     1.5      ctlr = 0;  /* XXX SMH: only deal with 1 controller for now */
     1.6  
     1.7 +    /* Bail if there is no controller. */
     1.8 +    if ( hba[ctlr] == NULL )
     1.9 +        return;
    1.10 +
    1.11      /* Loop through each real device */ 
    1.12      for(i=0; i < NWD; i++) {
    1.13  	
    1.14 @@ -450,11 +454,10 @@ void cciss_probe_devices(xen_disk_info_t
    1.15  	
    1.16  	if (!(drv->nr_blocks))
    1.17              continue;
    1.18 -	
    1.19 +
    1.20  	if ( xdi->count == xdi->max )
    1.21  	    BUG();
    1.22 -	
    1.23 -	
    1.24 +
    1.25  	hba[ctlr]->hd[i << NWD_SHIFT].nr_sects = 
    1.26  	    hba[ctlr]->sizes[i << NWD_SHIFT] = drv->nr_blocks;
    1.27  	
    1.28 @@ -3409,7 +3412,7 @@ static struct pci_driver cciss_pci_drive
    1.29  int __init cciss_init(void)
    1.30  {
    1.31  
    1.32 -	printk(KERN_INFO DRIVER_NAME "\n");
    1.33 +/*	printk(KERN_INFO DRIVER_NAME "\n");*/
    1.34  	/* Register for out PCI devices */
    1.35  	return pci_module_init(&cciss_pci_driver);
    1.36  }