ia64/xen-unstable

changeset 1101:461c357d9b39

bitkeeper revision 1.734 (4034eab5pHmnxsktQQEh03xZcwCoJw)

cciss fix
author smh22@tempest.cl.cam.ac.uk
date Thu Feb 19 16:56:21 2004 +0000 (2004-02-19)
parents 7a9e36d29982
children c052158ca3e0
files BitKeeper/etc/ignore BitKeeper/etc/logging_ok xen/drivers/block/Makefile xen/drivers/block/cciss.c
line diff
     1.1 --- a/BitKeeper/etc/ignore	Wed Feb 18 20:18:09 2004 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Thu Feb 19 16:56:21 2004 +0000
     1.3 @@ -539,3 +539,6 @@ xen/common/rbtree.o
     1.4  xen/drivers/block/cciss.o
     1.5  xen/drivers/block/cciss_scsi.o
     1.6  TAGS
     1.7 +tools/xc/lib/xc_netbsd_build.o
     1.8 +xen/arch/i386/pdb-stub.o
     1.9 +xen/common/debug-linux.o
     2.1 --- a/BitKeeper/etc/logging_ok	Wed Feb 18 20:18:09 2004 +0000
     2.2 +++ b/BitKeeper/etc/logging_ok	Thu Feb 19 16:56:21 2004 +0000
     2.3 @@ -29,6 +29,7 @@ rneugeba@wyvis.research
     2.4  rneugeba@wyvis.research.intel-research.net
     2.5  smh22@boulderdash.cl.cam.ac.uk
     2.6  smh22@labyrinth.cl.cam.ac.uk
     2.7 +smh22@tempest.cl.cam.ac.uk
     2.8  smh22@uridium.cl.cam.ac.uk
     2.9  sos22@labyrinth.cl.cam.ac.uk
    2.10  tlh20@elite.cl.cam.ac.uk
     3.1 --- a/xen/drivers/block/Makefile	Wed Feb 18 20:18:09 2004 +0000
     3.2 +++ b/xen/drivers/block/Makefile	Thu Feb 19 16:56:21 2004 +0000
     3.3 @@ -1,6 +1,14 @@
     3.4  
     3.5  include $(BASEDIR)/Rules.mk
     3.6  
     3.7 +
     3.8 +# SMH: need to ensure cciss init function called /after/ generic blkdev 
     3.9 +# stuff in ll_rw_blk etc. Linux barking link-order invocation of init 
    3.10 +# functions means we need to explicitly order things here. 
    3.11 +OBJS := blkpg.o elevator.o ll_rw_blk.o xen_vbd.o genhd.o xen_block.o 
    3.12 +OBJS += cciss.o cciss_scsi.o
    3.13 +
    3.14 +
    3.15  default: $(OBJS)
    3.16  	$(LD) -r -o driver.o $(OBJS)
    3.17  
     4.1 --- a/xen/drivers/block/cciss.c	Wed Feb 18 20:18:09 2004 +0000
     4.2 +++ b/xen/drivers/block/cciss.c	Thu Feb 19 16:56:21 2004 +0000
     4.3 @@ -1624,11 +1624,13 @@ static int register_new_disk(int ctlr, i
     4.4  	}
     4.5  	if (hba[ctlr]->drv[logvol].raid_level > 5)
     4.6  		hba[ctlr]->drv[logvol].raid_level = RAID_UNKNOWN;
     4.7 +
     4.8  	printk(KERN_INFO "      heads= %d, sectors= %d, cylinders= %d RAID %s\n\n",
     4.9 -		hba[ctlr]->drv[logvol].heads,
    4.10 -		hba[ctlr]->drv[logvol].sectors,
    4.11 -		hba[ctlr]->drv[logvol].cylinders, 
    4.12 -		raid_label[hba[ctlr]->drv[logvol].raid_level]);
    4.13 +	       hba[ctlr]->drv[logvol].heads,
    4.14 +	       hba[ctlr]->drv[logvol].sectors,
    4.15 +	       hba[ctlr]->drv[logvol].cylinders, 
    4.16 +	       raid_label[hba[ctlr]->drv[logvol].raid_level]);
    4.17 +
    4.18  
    4.19  	/* special case for c?d0, which may be opened even when
    4.20  	   it does not "exist".  In that case, don't mess with usage count.
    4.21 @@ -1644,6 +1646,7 @@ static int register_new_disk(int ctlr, i
    4.22  
    4.23  	for(i=max_p-1; i>=0; i--) {
    4.24  		int minor = start+i;
    4.25 +
    4.26  		invalidate_device(MKDEV(hba[ctlr]->major, minor), 1);
    4.27  		gdev->part[minor].start_sect = 0;
    4.28  		gdev->part[minor].nr_sects = 0;
    4.29 @@ -1653,8 +1656,12 @@ static int register_new_disk(int ctlr, i
    4.30  		hba[ctlr]->hardsizes[minor] = block_size;
    4.31  	}
    4.32  
    4.33 +
    4.34 +
    4.35  	++hba[ctlr]->num_luns;
    4.36  	gdev->nr_real = hba[ctlr]->highest_lun + 1;
    4.37 +
    4.38 +
    4.39  	/* setup partitions per disk */
    4.40  	grok_partitions(gdev, logvol, MAX_PART,
    4.41  			hba[ctlr]->drv[logvol].nr_blocks);
    4.42 @@ -2422,7 +2429,7 @@ next:
    4.43  		h->maxSG = seg; 
    4.44  
    4.45  #ifdef CCISS_DEBUG
    4.46 -	printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n", sect, seg);
    4.47 +	printk(KERN_DEBUG "cciss: Submitting %d sectors in %d segments\n", creq->nr_sectors, seg);
    4.48  #endif /* CCISS_DEBUG */
    4.49  
    4.50  	c->Header.SGList = c->Header.SGTotal = seg;
    4.51 @@ -2929,7 +2936,7 @@ static void cciss_getgeometry(int cntl_n
    4.52  	kfree(ld_buff);
    4.53  	kfree(size_buff);
    4.54  	kfree(inq_buff);
    4.55 -}	
    4.56 +}
    4.57  
    4.58  /* Function to find the first free pointer into our hba[] array */
    4.59  /* Returns -1 if no free entries are left.  */