Re: PROBLEM: Illegal IDE probing

Guest section DW (dwguest@win.tue.nl)
Fri, 29 Jan 1999 23:46:50 +0100 (MET)


From wvmourik@usa.net Fri Jan 29 22:26:47 1999

Hello Andries,

] From: Willem van Mourik <wvmourik@usa.net>
]
] The 1,6Gb harddisk shows the illegal size 7680Mb instead of 1536Mb
]
] version 2.0.36:
] hda: SAMSUNG WNR-31601A (1600MB), 1536MB w/256kB Cache, CHS=780/64/63
]
] version 2.2.1:
] hda: SAMSUNG WNR-31601A (1600MB), 7680MB w/256kB Cache, CHS=3900/64/63
]
]Interesting. I can leave worrying about the detection to Andre.
]But I would like to understand this size change.
]
]So, in your case, what does the disk say, i.e., what is the hdparm output?

Here the 'hdparm' outputs you have asked for:

hdparm -I /dev/hda
RawCHS=3121/16/63, CurCHS=3121/16/63, CurSects=3145968, LBA=yes, LBAsects=15728688

linux 2.0.36: hdparm -i /dev/hda
RawCHS=3121/16/63, CurCHS=3121/16/63, CurSects=3145968, LBA=yes, LBAsects=3145968

linux 2.2.1: hdparm -i /dev/hda
RawCHS=15603/16/63, CurCHS=3900/64/63, CurSects=15728688, LBA=yes, LBAsects=15728688

Very good. That makes it all clear.
Yes, it was painful, it hurt the eye, to see the changes made
to the geometry code by our new IDE maintainer. By now it is
clear that every single change was buggy.

Please remove the lines

/*
* This is a split test for drives less than 8 Gig only.
* Drives less than 8GB sometimes declare that they have 15 heads.
* This is an accounting trick (0-15) == (1-16), just an initial
* zero point difference.
*/
if ((id->lba_capacity < 16514064) && (lba_sects > chs_sects) &&
((id->heads == 15) || (id->heads == 16)) && (id->sectors == 63)) {
if (id->heads == 15)
id->cyls = lba_sects / (15 * 63); /* correct cyls */
if (id->heads == 16)
id->cyls = lba_sects / (16 * 63); /* correct cyls */
return 1; /* lba_capacity is our only option */
}

from ide-disk.c, and report on whether this solves the size problem.

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/