Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 1998 10:55:03 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-sys@FreeBSD.ORG, sos@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/i386/isa wd.c
Message-ID:  <199804100055.KAA08006@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>  Modified files:
>    sys/i386/isa         wd.c 
>  Log:
>  Try to use the "right" CHS translations of a LBA device.
>  Drives bigger than 8.4G is still in question until I get a drive
>  to test on...

The right geometry is usually given by the default translation mode
for drives smaller than 8G (same as previously).

There's nothing better than 255H/63C for larger drives.  Presumably
the default translation mode gives this if the drive supports CHS.

The Quantum Bigfoot 12G can probably be supported without using
LBA mode.  Since the old driver sort of worked, this drive must
support CHS mode, so it should all be accessible using any CHS
translation with 65535 * heads * sectors >= wp->wdp_lbasize.
Just set its size to wp->wdp_lbasize instead of to the default,
and adjust the number of cylinders.  (diskslice_machdep.c already
does similar adjustments if any slice seems to go beyond the
end of the disk, but it is too CHS-centric and only works up to
C=1024).

The need for LBA can probably be determined automatically using
(wp->wdp_heads == 0 && wp->wdp_sectors == 0).  (ATA-4 permits
drives larger than 8G to not support CHS.  If it is not supported,
then the default translation is 0/0.)  I think we won't see any
drives that don't support it until 8G is a tiny drive.

Bugs:
- all driver flags except DKFL_LBA are clobbered by `&='ing with
  DKFL_LBA instead of `&'ing with it.  This pessimizes even the
  non-LBA case.
- LBA is not used for dumps when it is used for normal i/o.  This
  is serious on drives that support CHS, since the guessed geometry
  may differ from the current (= default) geometry, so dumps may be
  written to the wrong place.

Bruce

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804100055.KAA08006>