mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries Brouwer <aebr@win.tue.nl>
To: John Riggs <jriggs@altiris.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 48-bit Drives Incorrectly reporting 255 Heads?
Date: Wed, 20 Aug 2003 21:47:12 +0200	[thread overview]
Message-ID: <20030820214712.A3065@pclin040.win.tue.nl> (raw)
In-Reply-To: <88A7BC80FA2797498AF6D865CAD3EA43180E95@iceman.altiris.com>; from jriggs@altiris.com on Wed, Aug 20, 2003 at 01:31:08PM -0600

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.


  reply	other threads:[~2003-08-20 19:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-20 19:31 John Riggs
2003-08-20 19:47 ` Andries Brouwer [this message]
2003-08-20 20:00 ` Richard B. Johnson
2003-08-21  5:38 ` jw schultz
2003-08-21  6:26   ` Valdis.Kletnieks
2003-08-21  7:41   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030820214712.A3065@pclin040.win.tue.nl \
    --to=aebr@win.tue.nl \
    --cc=jriggs@altiris.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®