Re: 5.3-BETA6 boot-time hang

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Tue, 05 Oct 2004 01:36:19 -0600 (MDT)
In message: <1096952687.972.7.camel_at_localhost>
            "Bruce A. Mah" <bmah_at_freebsd.org> writes:
: On Mon, 2004-10-04 at 21:12, M. Warner Losh wrote:
: > In message: <20041005040604.GB875_at_tomcat.kitchenlab.org>
: >             "Bruce A. Mah" <bmah_at_freebsd.org> writes:
: > : No joy...booting with the 5.3-BETA7 bootonly CD-ROM produces the same
: > : symptoms.
: 
: [snip]
: 
: > What does your fdc line say?
: 
: (Copied by hand onto another machine...transcription errors possible...)
: 
: fdc0: <floppy drive controller> port 0x3f7,0x3f4-0x3f5,0x3f0-0x3f3 irq 6
: drq 2 acpi0
: fdc0: ic_type 90 part_id 80
: fdc0: [MPSAFE]
: fdc0: [FAST]
: fd0: <1440-KB 3.5" drive> on fdc0 drive 0
: 
: Oh, waitasec.  I remember someone on this list having some other bizarro
: hardware with the port number ranges similarly fragmented.  Could this
: be the cause?

Yes.  Try the following patch.  It should fix your problem.

Index: fdc_isa.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/fdc/fdc_isa.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- fdc_isa.c	20 Sep 2004 06:12:19 -0000	1.15
+++ fdc_isa.c	5 Oct 2004 07:18:11 -0000	1.16
_at__at_ -99,8 +100,7 _at__at_
 		    nports);
 		return (ENXIO);
 	}
-	if ((rman_get_start(fdc->res_ioport) & 0x7) == 0 &&
-	    rman_get_size(fdc->res_ioport) == 2) {
+	if ((rman_get_end(fdc->res_ioport) & 0x7) == 1) {
 		/* Case 8 */
 		bus_release_resource(dev, SYS_RES_IOPORT, fdc->rid_ioport,
 		    fdc->res_ioport);
_at__at_ -116,9 +116,9 _at__at_
 	fdc->port_off = -(fdc->porth & 0x7);
 
 	/*
-	 * Deal with case 6, 7, and 8: FDSTS and FDSATA are in rid 1.
+	 * Deal with case 6-9: FDSTS and FDDATA.
 	 */
-	if (rman_get_size(fdc->res_ioport) == 2) {
+	if ((rman_get_end(fdc->res_ioport) & 0x7) == 3) {
 		fdc->rid_sts = fdc->rid_ioport + 1;
 		fdc->res_sts = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
 		    &fdc->rid_sts, RF_ACTIVE);


Warner
Received on Tue Oct 05 2004 - 05:37:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:15 UTC