From owner-cvs-src@FreeBSD.ORG Wed Sep 29 07:59:49 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0DDD16A4CE; Wed, 29 Sep 2004 07:59:49 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3197543D31; Wed, 29 Sep 2004 07:59:49 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i8T7xd36019682; Wed, 29 Sep 2004 09:59:40 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: John Birrell From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 29 Sep 2004 17:45:52 +1000." <20040929074552.GA909@freebsd3.cimlogic.com.au> Date: Wed, 29 Sep 2004 09:59:39 +0200 Message-ID: <19681.1096444779@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: "M. Warner Losh" Subject: Re: cvs commit: src/sys/dev/fdc fdc_isa.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Sep 2004 07:59:50 -0000 In message <20040929074552.GA909@freebsd3.cimlogic.com.au>, John Birrell writes: >On Wed, Sep 29, 2004 at 09:17:18AM +0200, Poul-Henning Kamp wrote: >> + >> + printf("Contents of fdc_data at start of fdc_attach:\n"); >> + printf(" portt=0x%0x porth=0x%0x stst=0x%0x stsh=0x%0x\n", >> + fdc->portt, fdc->porth, fdc->stst, fdc->stsh); >> + printf(" ctlt=0x%0x ctlh=0x%0x\n", fdc->ctlt, fdc->ctlh); >> + printf(" port_off=0x%0x ctl_off=0x%0x sts_off=0x%0x\n", >> + fdc->port_off, fdc->ctl_off, fdc->sts_off); >> + > >fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 >Contents of fdc_data at start of fdc_attach: > portt=0x0 porth=0x3f0 stst=0x0 stsh=0x3f0 > ctlt=0x0 ctlh=0x3f7 > port_off=0x0 ctl_off=0x0 sts_off=0x0 >fdc0: [FAST] >fd0: <1440-KB 3.5" drive> on fdc0 drive 0 OK, that looks all right. My best guess right now is that your DRIVECHANGE line doesn't work. If you let the boot proceed and set the debugflags to 0x40, can you try to see if it discovers when you insert and remove a disk ? You need to access the drive before it will find out, so something like: (empty drive) dd if=/dev/fd0 count=1 of=/dev/null (insert floppy) dd if=/dev/fd0 count=1 of=/dev/null (remove floppy) dd if=/dev/fd0 count=1 of=/dev/null (insert floppy) dd if=/dev/fd0 count=1 of=/dev/null (remove floppy) (insert floppy) dd if=/dev/fd0 count=1 of=/dev/null Should tell us. (BTW, Warner: Shouldn't this: static u_int8_t fdsts_rd(struct fdc_data *fdc) { return bus_space_read_1(fdc->portt, fdc->porth, FDSTS+fdc->port_off); } be changed to: static u_int8_t fdsts_rd(struct fdc_data *fdc) { return bus_space_read_1(fdc->stst, fdc->stsh, FDSTS+fdc->sts_off); } ) -- 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.