From owner-freebsd-current Mon Nov 4 10: 3:24 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4602B37B404 for ; Mon, 4 Nov 2002 10:03:23 -0800 (PST) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 181DD43E3B for ; Mon, 4 Nov 2002 10:03:22 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id gA4I2x9d001870; Mon, 4 Nov 2002 19:03:01 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: John Hay Cc: n_hibma@van-laarhoven.org (Nick Hibma), imp@bsdimp.com, current@FreeBSD.ORG Subject: Re: umass CF geometry problems, was Re: fdisk -BI ob clean disk broken In-Reply-To: Your message of "Sat, 04 Nov 2002 19:19:57 +0200." <200211041719.gA4HJvaG014484@zibbi.icomtek.csir.co.za> Date: Mon, 04 Nov 2002 19:02:59 +0100 Message-ID: <1869.1036432979@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200211041719.gA4HJvaG014484@zibbi.icomtek.csir.co.za>, John Hay wri tes: >> >> Let's work on the 'proper' solution first. >> >> What SCSI commands are suitable for getting the geometry, generically >> on a device? > >Hmmm, I made an interesting discovery. I searched through some of the >scsi drivers, sys/dev/{aha|ahb|aic*|sym}, looking for XPT_CALC_GEOMETRY >and they all fake the geometry. :-/ I noticed this too recently when studying PC98 related disk code. Solaris on the other hand, pokes some random mode-page which contains some numbers which may, but more likely may not, have any relationship to the real hardwares format. Few if any drives have constant number of sectors per track these days. At least our scsi code never returns degenerate numbers. Anyway, what I really wanted to say is that the reason I put the "FW" in the name of the DIOCGFW{SECTORS,HEADS} ioctls was that at this time and date, the only possible utility of such archaic values are to avoid breaking stupid firmware. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message