patch-2.4.2 linux/drivers/ide/hd.c
Next file: linux/drivers/ide/icside.c
Previous file: linux/drivers/ide/cmd640.c
Back to the patch index
Back to the overall index
- Lines: 39
- Date:
Fri Feb 16 16:02:36 2001
- Orig file:
v2.4.1/linux/drivers/ide/hd.c
- Orig date:
Thu Jan 4 12:50:17 2001
diff -u --recursive --new-file v2.4.1/linux/drivers/ide/hd.c linux/drivers/ide/hd.c
@@ -22,6 +22,9 @@
* This is now a lightweight ST-506 driver. (Paul Gortmaker)
*
* Modified 1995 Russell King for ARM processor.
+ *
+ * Bugfix: max_sectors must be <= 255 or the wheels tend to come
+ * off in a hurry once you queue things up - Paul G. 02/2001
*/
/* Uncomment the following if you want verbose error reports. */
@@ -36,7 +39,7 @@
#include <linux/kernel.h>
#include <linux/hdreg.h>
#include <linux/genhd.h>
-#include <linux/malloc.h>
+#include <linux/slab.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/mc146818rtc.h> /* CMOS defines */
@@ -104,6 +107,7 @@
static int hd_sizes[MAX_HD<<6];
static int hd_blocksizes[MAX_HD<<6];
static int hd_hardsectsizes[MAX_HD<<6];
+static int hd_maxsect[MAX_HD<<6];
static struct timer_list device_timer;
@@ -730,9 +734,11 @@
for(drive=0; drive < (MAX_HD << 6); drive++) {
hd_blocksizes[drive] = 1024;
hd_hardsectsizes[drive] = 512;
+ hd_maxsect[drive]=255;
}
blksize_size[MAJOR_NR] = hd_blocksizes;
hardsect_size[MAJOR_NR] = hd_hardsectsizes;
+ max_sectors[MAJOR_NR] = hd_maxsect;
#ifdef __i386__
if (!NR_HD) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)