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

From: Andrzej Krzysztofowicz (ankry@pg.gda.pl)
Date: Mon May 22 2000 - 03:13:06 EST


> 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.]
>
> 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.)

Is there any reason for introducing another __setup function instead of
modifying the original hd_setup ?
hd_setup is not used for anything else.

Moreover:
- I do not see any reason for ints[6]. ints[4] should be enough as
  only three parameters are allowed.
- shouldn't ide.c driver also accept these parameters ?

> 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);

--
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

- 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:21 EST