Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 2004 09:59:39 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        John Birrell <jb@cimlogic.com.au>
Cc:        "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: cvs commit: src/sys/dev/fdc fdc_isa.c 
Message-ID:  <19681.1096444779@critter.freebsd.dk>
In-Reply-To: Your message of "Wed, 29 Sep 2004 17:45:52 %2B1000." <20040929074552.GA909@freebsd3.cimlogic.com.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
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: <floppy drive controller> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19681.1096444779>