From owner-cvs-sys Thu Apr 9 18:00:24 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA14752 for cvs-sys-outgoing; Thu, 9 Apr 1998 18:00:24 -0700 (PDT) (envelope-from owner-cvs-sys) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA14737; Thu, 9 Apr 1998 18:00:13 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id KAA08006; Fri, 10 Apr 1998 10:55:03 +1000 Date: Fri, 10 Apr 1998 10:55:03 +1000 From: Bruce Evans Message-Id: <199804100055.KAA08006@godzilla.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 Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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