From owner-freebsd-current Tue Dec 17 4:47:52 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 9155037B401; Tue, 17 Dec 2002 04:47:50 -0800 (PST) Received: from watery.cc.kogakuin.ac.jp (watery.cc.kogakuin.ac.jp [133.80.152.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E92743EB2; Tue, 17 Dec 2002 04:47:49 -0800 (PST) (envelope-from nyan@jp.FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) by watery.cc.kogakuin.ac.jp (8.12.6/8.12.6) with ESMTP id gBHClbnq017851; Tue, 17 Dec 2002 21:47:38 +0900 (JST) (envelope-from nyan@jp.FreeBSD.org) Date: Tue, 17 Dec 2002 21:46:22 +0900 (JST) Message-Id: <20021217.214622.74695206.nyan@jp.FreeBSD.org> To: sos@FreeBSD.org Cc: current@FreeBSD.org Subject: ata driver From: Takahashi Yoshihiro X-Mailer: Mew version 3.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 The current ata driver on pc98 has a problem. I think that the following patch solves the problem. Please review it. This change must be in RELENG_5_0 branch. Index: sys/dev/ata/ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.137 diff -u -r1.137 ata-disk.c --- sys/dev/ata/ata-disk.c 3 Dec 2002 20:19:37 -0000 1.137 +++ sys/dev/ata/ata-disk.c 8 Dec 2002 08:50:01 -0000 @@ -123,6 +123,14 @@ adp->heads = atadev->param->heads; adp->sectors = atadev->param->sectors; adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors; +#ifdef PC98 + if (adp->total_secs < 17 * 8 * 65536) { + /* convert PC98 geometry */ + adp->sectors = 17; + adp->heads = 8; + atadev->param->cylinders = adp->total_secs / (17 * 8); + } +#endif adp->max_iosize = 256 * DEV_BSIZE; bioq_init(&adp->queue); Index: sys/geom/geom_pc98.c =================================================================== RCS file: /home/ncvs/src/sys/geom/geom_pc98.c,v retrieving revision 1.20 diff -u -r1.20 geom_pc98.c --- sys/geom/geom_pc98.c 3 Dec 2002 20:18:35 -0000 1.20 +++ sys/geom/geom_pc98.c 8 Dec 2002 04:47:43 -0000 @@ -190,10 +190,6 @@ sectorsize = cp->provider->sectorsize; if (sectorsize < 512) break; - if (cp->provider->mediasize / sectorsize < 17 * 8 * 65536) { - fwsectors = 17; - fwheads = 8; - } gsp->frontstuff = sectorsize * fwsectors; spercyl = (off_t)fwsectors * fwheads * sectorsize; buf = g_read_data(cp, 0, --- TAKAHASHI Yoshihiro To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message