ia64/xen-unstable

changeset 407:b780057c9d40

bitkeeper revision 1.195 (3eaec8596pxD7fZFaOTkio2qijGk9g)

xl_ide.c:
Small Xenolinux IDE fix.
author kaf24@scramble.cl.cam.ac.uk
date Tue Apr 29 18:45:45 2003 +0000 (2003-04-29)
parents ca730caf1aad
children c1dae0dfefff 4fbd3d5146a8
files xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c
line diff
     1.1 --- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c	Tue Apr 29 18:23:00 2003 +0000
     1.2 +++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_ide.c	Tue Apr 29 18:45:45 2003 +0000
     1.3 @@ -45,9 +45,9 @@ static struct gendisk *setup_major(xen_d
     1.4      struct gendisk *gd;
     1.5  
     1.6      blk_size[major]      = NULL;
     1.7 -    blksize_size[major]  = xlide_blksize_size + base*XLIDE_DEVS_PER_MAJOR;
     1.8 -    hardsect_size[major] = xlide_hardsect_size + base*XLIDE_DEVS_PER_MAJOR;
     1.9 -    max_sectors[major]   = xlide_max_sectors + base*XLIDE_DEVS_PER_MAJOR;
    1.10 +    blksize_size[major]  = xlide_blksize_size + base*(1<<XLIDE_PARTN_SHIFT);
    1.11 +    hardsect_size[major] = xlide_hardsect_size + base*(1<<XLIDE_PARTN_SHIFT);
    1.12 +    max_sectors[major]   = xlide_max_sectors + base*(1<<XLIDE_PARTN_SHIFT);
    1.13      read_ahead[major]    = 8;
    1.14  
    1.15      blk_init_queue(BLK_DEFAULT_QUEUE(major), do_xlblk_request);
    1.16 @@ -134,7 +134,7 @@ int xlide_init(xen_disk_info_t *xdi)
    1.17      for ( i = 0; i < xdi->count; i++ )
    1.18          if ( IS_IDE_XENDEV(xdi->disks[i].device) &&
    1.19               ((xdi->disks[i].device & XENDEV_IDX_MASK) <
    1.20 -              XLIDE_DEVS_PER_MAJOR) ) 
    1.21 +              (2*XLIDE_DEVS_PER_MAJOR)) ) 
    1.22              units++;
    1.23      if ( units == 0 ) return 0;
    1.24