IDE signed/unsigned problem in /proc (2.2 Kernel)

Vladislav Malyshkin (mal@mail1.nai.net)
Sat, 25 Dec 1999 17:34:49 -0500


It looks like there is a problem in 2.2.12-20 (RedHat 6.1)
in signed/unsigned conversion for IDE disk geometry.
On a computer with 4Gb IDE the
cat /proc/ide/hda/geometry
gives
physical 8930/15/63
logical 525/255/63
which are correct values.

In the same time on a computer with 27 Gb IDE I have:
cat /proc/ide/hda/geometry
physical -12781/16/63
logical -12781/16/63

It prints negative values which are obviously incorrect.
I expect some kind of signed/unsigned conversion problem.

The hdparm print correct values in both cases:

For 4Gb IDE:
/sbin/hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 525/255/63, sectors = 8439184, start = 0

For 27 Gb IDE
/sbin/hdparm /dev/hda

/dev/hda:
multcount = 0 (off)
I/O support = 0 (default 16-bit)
unmaskirq = 0 (off)
using_dma = 0 (off)
keepsettings = 0 (off)
nowerr = 0 (off)
readonly = 0 (off)
readahead = 8 (on)
geometry = 52755/16/63, sectors = 53177040, start = 0

Vladislav

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