lkml.org 
[lkml]   [1999]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 10.2 Gig HDD : 2.0.36 patch for better C/H/S translation
    From: Riley Williams <rhw@BigFoot.Com>

> Yes, that is more or less correct. But not good enough:
> For example, I have also seen BIOSes that produce 1027/255/63
> probably because they compute 16383*16/255 = 1027.

I've also seen a BIOS produce 1023/255/63, presumably because 1023 is
the largest valid 9-bit unsigned number...

Those case can be dealt with by applying the following modification to
the above patch:

You misunderstood my post.
I gave my old code once more (which I posted here a month or maybe
two ago and which found its way into 2.2.0pre* but is not into 2.0.36)
and then commented a bit on why the patch proposed by espel
was not precisely what is needed. Modifications to that patch
are not needed either.

Basically, does it matter if we were given valid figures, but
recalculate them anyway?

That is what my old code does: recalculate bios_cyl.

(However, in 2.2.0pre* we discovered one flaw with that: there are
disks that report that they are smaller than they are in reality.
A strange thing to do, no doubt in order to avoid BIOS hangs
in the times that BIOSes were disturbed by > 2 GB disks.
That is why 2.2.0pre8 is slightly more cautious, and sometimes
believes the BIOS if it claims the disk is large.

On the other hand, as I reported a few days ago, there is the problem
that the BIOS report may well be for an entirely different disk:
what the BIOS reports for hd0 and hd1 may be sda and sdb instead
of hda and hdb. I do not know how to find out which disk is
described by the int 41 and int 46 vectors when both SCSI and IDE
disks are present.

So, at present I have no code that covers all known cases.

These days I tend to think that all mention of geometries should
be removed from the kernel, just like the HDIO_GETGEO ioctl itself;
instead, the kernel should make available all information there is:
the SCSI defaults, what the BIOS said, what the IDENTIFY DRIVE
command returned, and userspace may figure out what to do with that.
A much cleaner kernel, and two pages of code that can be used by
both LILO and *fdisk.)

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:49    [W:0.028 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site