lkml.org 
[lkml]   [2003]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 48-bit Drives Incorrectly reporting 255 Heads?
On Wed, Aug 20, 2003 at 01:31:08PM -0600, John Riggs wrote:

> With the 2.4.20 kernel, I have a 40GB disk with 240 heads, with 48-bit
> mode enabled. The Linux ide driver automatically declares that anything
> with 48-bit mode enabled has 255 heads. This is a problem, as I am
> writing a utility to fix up a Windows PBR, and the PBR relies on the
> head count as counted by the BIOS.
> The Linux code in question is in ide-disk.c:
>
> if (id->cfs_enable_2 & 0x0400) {
> .
> drive->head = drive->bios_head = 255;
> .
> }
>
> What I would like to do is change the above to:
>
> if (id->cfs_enable_2 & 0x0400) {
> .
> drive->head = 255;
> .
> }
>
> Thereby not changing the bios head count. My initial tests seem to
> have worked okay, with the correct geometry getting reported. Can
> anybody point out to me why this will break something else?
> Two more specific questions are:
> 1) Will this break drives > 137 GB?
> 2) Why would the head count be set to 255 in the first place?

No, this does not break anything.
Setting drive->head to 255 is completely ridiculous.
Setting drive->bios_head to 255 is rather pointless.
In 2.6 this junk has been removed already.

On the other hand, you are badly mistaken if you think that your changes
do anything useful. The value drive->bios_head must be regarded as
random, and is only vaguely related to what the BIOS thinks.
In 2.6 that vague relation has entirely disappeared.

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

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.089 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site