Re: ide-disk.c rev 1.13 killed CONFIG_IDEDISK_STROKE

Andries Brouwer
2003-08-02T12:45:41Z

On Sat, Aug 02, 2003 at 02:42:05AM -0600, Erik Andersen wrote:

> Anybody know what the intent of this IDE_STROKE_LIMIT macro is?
> I ask since it completely breaks CONFIG_IDEDISK_STROKE and I can't see
> any reason for it being there. It looks to me like it just needs to be
> ripped right back out.

I agree entirely.

> I have created the following patch which makes this option work
> as expected once again in 2.4.x.

Will you also submit the corresponding 2.6 patch?

> #define IDE_STROKE_LIMIT (32000*1024*2)

I can guess where this limit came from.
The most common way people meet this situation is when they have a
large disk, so large that their BIOS faints when seeing it, so that
they have to use a clipping jumper to fake a smaller disk. Such
jumpers usually clip to about 32 GB (namely 66055248 sectors).
So 65536000 is a lower limit to what one sees with clips.

Maybe it is intended to protect against old disks that do not
understand these new commands. Andre? Bart? Alan?

> + printk(KERN_INFO "%s: Host Protected Area detected.\n"

This text might lead to some confusion: as just remarked, usually
we have a clipping jumper, not a proper Host Protected Area.

#ifdef CONFIG_IDEDISK_STROKE

I am also unhappy about the fact that this is a configuration option,
one of the zillion we have. A boot parameter would be a better choice.

Does anyone know about disks that get unhappy if we just do this
stuff unconditionally (or, to be more precise, do it when the IDENTIFY
output says we can) ?
Maybe not even a boot parameter is needed and we can do the right thing
automatically.

Andries