Date: Tue, 05 Oct 2004 01:36:19 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: bmah@freebsd.org Cc: freebsd-current@freebsd.org Subject: Re: 5.3-BETA6 boot-time hang Message-ID: <20041005.013619.44056186.imp@bsdimp.com> In-Reply-To: <1096952687.972.7.camel@localhost> References: <20041005040604.GB875@tomcat.kitchenlab.org> <20041004.221256.74799405.imp@bsdimp.com> <1096952687.972.7.camel@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <1096952687.972.7.camel@localhost>
"Bruce A. Mah" <bmah@freebsd.org> writes:
: On Mon, 2004-10-04 at 21:12, M. Warner Losh wrote:
: > In message: <20041005040604.GB875@tomcat.kitchenlab.org>
: > "Bruce A. Mah" <bmah@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
@@ -99,8 +100,7 @@
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);
@@ -116,9 +116,9 @@
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041005.013619.44056186.imp>
