hdc: -612473816857182208 sectors
Well, clearly your bug is here.
This number is F7800E4F00000000 hex.
On the other hand, your disk has 240121728 sectors, which is 0E4FF780 hex.
So, someone assumed somewhere that the world is little-endian
with long the same size as int.
Precisely what happened is easiest to trace with the identify data in hand.
For example, maybe the sparc code still has to be extended to fix the
order of lba_capacity48 or so (in ide_fix_driveid).
Andries
[So, if you cannot find the culprit yourself, please give the identify data.
On some old kernel, the real, clean, identify data, as read directly from
the disk; not the stuff modified by the kernel. Maybe "cat /proc/ide/hdc/identify"
or so works.]
BTW, this fixing in-place of the driveid is a very bad idea.
Nobody should ever touch driveid. It is a read-only variable.
-
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/