From owner-freebsd-current Tue Dec 17 6:41:47 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 5920137B401; Tue, 17 Dec 2002 06:41:45 -0800 (PST) Received: from spider.deepcore.dk (cpe.atm2-0-56339.0x50c6aa0a.abnxx2.customer.tele.dk [80.198.170.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4FE943ED1; Tue, 17 Dec 2002 06:41:32 -0800 (PST) (envelope-from sos@spider.deepcore.dk) Received: (from sos@localhost) by spider.deepcore.dk (8.12.5/8.12.6) id gBHEfHT7002955; Tue, 17 Dec 2002 15:41:17 +0100 (CET) (envelope-from sos) From: Soeren Schmidt Message-Id: <200212171441.gBHEfHT7002955@spider.deepcore.dk> Subject: Re: ata driver In-Reply-To: <20021217.231116.71144639.nyan@jp.FreeBSD.org> To: Takahashi Yoshihiro Date: Tue, 17 Dec 2002 15:41:11 +0100 (CET) Cc: phk@FreeBSD.ORG, sos@FreeBSD.ORG, current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL98b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 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 It seems Takahashi Yoshihiro wrote: > In article <19314.1040132436@critter.freebsd.dk> > phk@FreeBSD.ORG writes: > > > Is it only for ATA/IDE disks ? > > Does it depend on the size of the disks ? > > Only for the internal IDE controller. The internal IDE controller on > pc98 uses the fixed geometry which is 8 heads and 17 sectors. If the > size of the disk is larger than 4.2GB (65535C x 8H x 17S x 512B), a > different geometry depend on the disk is used. OK, could you try this patch then (and probably still rip out the stuff in GEOM)... Index: ata-all.h =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-all.h,v retrieving revision 1.55 diff -u -r1.55 ata-all.h --- ata-all.h 3 Dec 2002 20:19:37 -0000 1.55 +++ ata-all.h 17 Dec 2002 14:29:12 -0000 @@ -213,9 +213,10 @@ int flags; /* controller flags */ #define ATA_NO_SLAVE 0x01 #define ATA_USE_16BIT 0x02 -#define ATA_ATAPI_DMA_RO 0x04 -#define ATA_QUEUED 0x08 -#define ATA_DMA_ACTIVE 0x10 +#define ATA_USE_PC98GEOM 0x04 +#define ATA_ATAPI_DMA_RO 0x08 +#define ATA_QUEUED 0x10 +#define ATA_DMA_ACTIVE 0x20 struct ata_device device[2]; /* devices on this channel */ #define MASTER 0x00 Index: ata-cbus.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-cbus.c,v retrieving revision 1.1 diff -u -r1.1 ata-cbus.c --- ata-cbus.c 3 Dec 2002 20:19:37 -0000 1.1 +++ ata-cbus.c 17 Dec 2002 14:28:21 -0000 @@ -239,7 +239,7 @@ ch->unit = i; } free(children, M_TEMP); - ch->flags |= ATA_USE_16BIT; + ch->flags |= ATA_USE_16BIT | ATA_USE_PC98GEOM; ch->intr_func = ata_cbus_intr; ch->lock_func = ata_cbus_banking; return ata_probe(dev); Index: ata-disk.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v retrieving revision 1.138 diff -u -r1.138 ata-disk.c --- ata-disk.c 6 Dec 2002 19:29:53 -0000 1.138 +++ ata-disk.c 17 Dec 2002 14:34:27 -0000 @@ -124,6 +124,11 @@ adp->sectors = atadev->param->sectors; adp->total_secs = atadev->param->cylinders * adp->heads * adp->sectors; adp->max_iosize = 256 * DEV_BSIZE; + if (adp->device->channel->flags & ATA_USE_PC98GEOM && + adp->total_secs < 17 * 8 * 65536) { + adp->sectors = 17; + adp->heads = 8; + } bioq_init(&adp->queue); lbasize = (u_int32_t)atadev->param->lba_size_1 | -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message