Re: [one more PATCH] Re: Old HD driver does not compile in 2.3.99pre9-2

From: Andre Hedrick (andre@linux-ide.org)
Date: Sun May 21 2000 - 01:32:30 EST


On Sun, 21 May 2000, Andries Brouwer wrote:

>
> Yes, sorry, I was too quick in blaming all on you.
> A second look at hd.c shows that hd_setup() is never called.
>
> In the above you see CHS=1108/255/63, but that can never work - hd.c
> does not work with translated geometries, so 255 heads is nonsense,
> and no doubt that explains the "cannot mount root" part.
>
> [Andre writes:
> :
> : That is what I was looking for, but it truncates drives to 8.4GB still
> :
> but that cannot be otherwise. Look at hd.c - no LBA.]

I know.........oops.........hda != hd to pass params.....
Fixed now.........

> So, Andrzej Krzysztofowicz must either change BIOS setup,
> or add "hd=16383,16,63" or so (the actual values!) on the
> kernel command line. The patch below will make sure that
> the command line is actually read.
> (I have other stuff in these files - line numbers may differ a bit.)
>
> Andries
>
> ----------------------------------------------------------
> diff -u --recursive --new-file ../linux-2.3.99p8/linux/drivers/ide/hd.c ./linux/drivers/ide/hd.c
> --- ../linux-2.3.99p8/linux/drivers/ide/hd.c Sun Mar 26 13:06:12 2000
> +++ ./linux/drivers/ide/hd.c Sun May 21 05:31:45 2000
> @@ -881,3 +883,12 @@
> return 0;
> }
>
> +static int parse_hd_setup (char *line) {
> + int ints[6];
> +
> + (void) get_options(line, ARRAY_SIZE(ints), ints);
> + hd_setup(NULL, ints);
> +
> + return 0;
> +}
> +__setup("hd=", parse_hd_setup);
> diff -u --recursive --new-file ../linux-2.3.99p8/linux/include/linux/hdreg.h ./linux/include/linux/hdreg.h
> --- ../linux-2.3.99p8/linux/include/linux/hdreg.h Sun Apr 30 21:49:36 2000
> +++ ./linux/include/linux/hdreg.h Sun May 21 04:48:11 2000
> @@ -313,10 +314,6 @@
> * These routines are used for kernel command line parameters from main.c:
> */
> #include <linux/config.h>
> -
> -#ifdef CONFIG_BLK_DEV_HD
> -void hd_setup(char *, int *);
> -#endif /* CONFIG_BLK_DEV_HD */
>
> #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
> int ide_register(int io_port, int ctl_port, int irq);
> ----------------------------------------------------------
>

Andre Hedrick
The Linux ATA/IDE guy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:19 EST