From owner-freebsd-current Fri Nov 29 22:14:51 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 412E037B401 for ; Fri, 29 Nov 2002 22:14:48 -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 8011043E88 for ; Fri, 29 Nov 2002 22:14:47 -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 gAU6EXnq085883; Sat, 30 Nov 2002 15:14:40 +0900 (JST) (envelope-from nyan@jp.FreeBSD.org) Date: Sat, 30 Nov 2002 15:14:19 +0900 (JST) Message-Id: <20021130.151419.112534450.nyan@jp.FreeBSD.org> To: sos@spider.deepcore.dk Cc: current@FreeBSD.ORG Subject: Re: ATA patches for PC98 - Please test! From: Takahashi Yoshihiro In-Reply-To: <200211292044.gATKipVT018982@spider.deepcore.dk> References: <200211292044.gATKipVT018982@spider.deepcore.dk> X-Mailer: Mew version 2.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable 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 article <200211292044.gATKipVT018982@spider.deepcore.dk> Soeren Schmidt writes: > I'm trying to get this into 5.0 (I know its late, but life's tough) > = > This brings ATA support to the PC98 arch will all bells and whistles.= > --- sys/conf/files 28 Nov 2002 01:17:48 -0000 1.738 > +++ sys/conf/files 28 Nov 2002 20:01:52 -0000 > @@ -290,6 +290,7 @@ > dev/asr/asr.c optional asr pci > dev/ata/ata-all.c optional ata > dev/ata/ata-isa.c optional ata isa > +dev/ata/ata-cbus.c optional ata pc98 This should be 'dev/ata/ata-cbus.c optional ata isa' and moved into files.pc98. > --- sys/pc98/conf/GENERIC 31 Oct 2002 12:14:05 -0000 1.220 > +++ sys/pc98/conf/GENERIC 27 Nov 2002 10:06:46 -0000 > @@ -78,11 +78,18 @@ > # Floppy drives > device fdc > = > -# IDE controller and disks > -device wdc 1 > +# ATA and ATAPI devices > +device ata > +device atadisk # ATA disk drives > +device atapicd # ATAPI CDROM drives > +device atapifd # ATAPI floppy drives > +device atapist # ATAPI tape drives > +options ATA_STATIC_ID # Static device numbering > = > +# IDE controller and disks > +#device wdc 1 > # ATAPI devices on wdc > -device wcd 1 #IDE CD-ROM > +#device wcd 1 #IDE CD-ROM > #device wfd 1 #IDE Floppy (e.g. LS-120) > #device wst 1 #IDE Tape (e.g. Travan) What about GENERIC.hints? > --- /dev/null Fri Nov 29 21:35:31 2002 > +++ sys/dev/ata/ata-cbus.c Thu Oct 31 19:32:25 2002 > @@ -0,0 +1,270 @@ > +/*- > + * Copyright (c) 2002 S=F8ren Schmidt > + * All rights reserved. The original author of this file is IMAI Takeshi. Where is his copyright? > +static int > +ata_cbus_attach(device_t dev) > +{ > + struct ata_cbus_controller *scp =3D device_get_softc(dev); > + int rid; > + > + /* allocate resources */ > + rid =3D ATA_IOADDR_RID; > + scp->io =3D isa_alloc_resourcev(dev, SYS_RES_IOPORT, &rid, ata_p= c98_ports, > + ATA_IOSIZE, RF_ACTIVE); > + if (!scp->io) > + return ENOMEM; > + isa_load_resourcev(scp->io, ata_pc98_ports, ATA_IOSIZE); > + > + rid =3D ATA_IOADDR_RID + ATA_IOSIZE + 1; > + scp->altio =3D bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, > + rman_get_start(scp->io)+ATA_PC98_ALTOFFSET, > + ~0, ATA_ALTIOSIZE, RF_ACTIVE); > + if (!scp->altio) > + return ENOMEM; > + > + rid =3D ATA_IOADDR_RID + ATA_IOSIZE + ATA_ALTIOSIZE + 1; > + scp->bankio =3D bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, > + ATA_PC98_BANK, ~0, > + ATA_PC98_BANKIOSIZE, RF_ACTIVE); > + if (!scp->bankio) > + return ENOMEM; > + > + rid =3D 0; > + scp->irq =3D bus_alloc_resource(dev, SYS_RES_IRQ, &rid, > + 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); > + > + scp->current_bank =3D -1; > + if (!device_add_child(dev, "ata", 0)) > + return ENOMEM; > + if (!device_add_child(dev, "ata", 1)) > + return ENOMEM; > + > + return bus_generic_attach(dev); > +} Where is vaild bank checking code? = And, what about all atapi-* changes? These changes are needed to support buggy atapi devices. --- TAKAHASHI Yoshihiro To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message