Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 1998 10:04:34 +0200 (MEST)
From:      Søren Schmidt <sos@FreeBSD.ORG>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        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:  <199804100804.KAA01596@sos.freebsd.dk>
In-Reply-To: <199804100055.KAA08006@godzilla.zeta.org.au> from Bruce Evans at "Apr 10, 98 10:55:03 am"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Bruce Evans who wrote:
> 
> The right geometry is usually given by the default translation mode
> for drives smaller than 8G (same as previously).

Maybe.

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

Maybe.

> 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).

This might be possible, but according to the ATA4 std. the CHS
mode is "optional" for the drive makers, so we cannot knwo.
Its also easier to just use LBA all over :)

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

Right, but this only works if the drives implements the optional
part above. I dont knwo before I get HW to test on.

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

Oops, fixed.

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

I know, I didn't say it was perfect :)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt               (sos@FreeBSD.org)               FreeBSD Core Team
                Even more code to hack -- will it ever end
..

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?199804100804.KAA01596>