patch-2.1.75 linux/drivers/block/ide-probe.c

Next file: linux/drivers/block/ide-proc.c
Previous file: linux/drivers/block/ide-floppy.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.74/linux/drivers/block/ide-probe.c linux/drivers/block/ide-probe.c
@@ -582,7 +582,7 @@
 {
 	struct gendisk *gd, **gdp;
 	unsigned int unit, units, minors;
-	int *bs, *max_sect;
+	int *bs, *max_sect, *max_ra;
 
 	/* figure out maximum drive number on the interface */
 	for (units = MAX_DRIVES; units > 0; --units) {
@@ -595,15 +595,18 @@
 	gd->part  = kmalloc (minors * sizeof(struct hd_struct), GFP_KERNEL);
 	bs        = kmalloc (minors*sizeof(int), GFP_KERNEL);
 	max_sect  = kmalloc (minors*sizeof(int), GFP_KERNEL);
+	max_ra    = kmalloc (minors*sizeof(int), GFP_KERNEL);
 
 	memset(gd->part, 0, minors * sizeof(struct hd_struct));
 
 	/* cdroms and msdos f/s are examples of non-1024 blocksizes */
 	blksize_size[hwif->major] = bs;
 	max_sectors[hwif->major] = max_sect;
+	max_readahead[hwif->major] = max_ra;
 	for (unit = 0; unit < minors; ++unit) {
 		*bs++ = BLOCK_SIZE;
-		*max_sect++ = 244;
+		*max_sect++ = MAX_SECTORS;
+		*max_ra++ = MAX_READAHEAD;
 	}
 
 	for (unit = 0; unit < units; ++unit)
@@ -673,6 +676,10 @@
 	}
 	return hwif->present;
 }
+
+
+int ideprobe_init(void);
+
 
 static ide_module_t ideprobe_module = {
 	IDE_PROBE_MODULE,

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov