lkml.org 
[lkml]   [2000]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Detecting BIG ( 17.2 GB ) hard drives under Linux
On Wed, Feb 09, 2000 at 03:19:00PM -0600, Hugo Varotto wrote:

> Thanks for all who have answered my original question. Among other things, I
> tried what Alan told me ( to install 2.2.14 ) but with no success.

Hmm. Please do
dmesg | grep hdb
hdparm -i /dev/hdb
hdparm -I /dev/hdb
and tell us the results.

Ah, wait! I see what is wrong!
One bogus assignment has not been removed yet.
Mea culpa - I must have overlooked it when I made the 2.2.* patch.

Until 2.0.37 and since 2.3.21 we have the correct

/* Use physical geometry if what we have still makes no sense */
if (drive->head > 16 && id->heads && id->heads <= 16) {
drive->cyl = id->cyls;
drive->head = id->heads;
drive->sect = id->sectors;
}

but 2.0.38 and 2.2.0pre2 - 2.2.14 have the bad

/* Use physical geometry if what we have still makes no sense */
if ((!drive->head || drive->head > 16) &&
id->heads && id->heads <= 16) {
if ((id->lba_capacity > 16514064) || (id->cyls == 0x3fff)) {
id->cyls = ((int)(id->lba_capacity/(id->heads * id->sectors)));
}
drive->cyl = id->cyls;
drive->head = id->heads;
drive->sect = id->sectors;
}

that still destroys id->cyls.
Aha! Please remove this assignment to id->cyls, and things will be much better.
(this was in ide-disk.c)

[Indeed, id->cyls is read-only and must never be changed.
The result of changing it is that afterwards id->cyls no
longer is 16383, so that lba_capacity_is_ok() fails.
You will be hit by this only if you have asked the BIOS
for a translation.]


Andries



-
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/

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