Subject: kern/5260: clean up ISA bus autoconf printing
To: None <gnats-bugs@gnats.netbsd.org>
From: Soren S. Jorvang <soren@t.dk>
List: netbsd-bugs
Date: 04/07/1998 17:44:04
>Number:         5260
>Category:       kern
>Synopsis:       clean up ISA bus autoconf printing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr  7 08:50:01 1998
>Last-Modified:
>Originator:     Soren S. Jorvang
>Organization:
Should the organization field be appeased, or is it the reply-to header that is required?
>Release:        NetBSD-current 19980407
>Environment:
System: NetBSD gnyf 1.3E i386


>Description:
I believe the 0x666 hack in src/sys/dev/isa/isa.c is no longer necessary.
[Alternatively, isaprint should mask out devices with iosize == 0x666. I
was reminded of this by an ISA driver that does not make use io ports.]

Also, perhaps the isaprint should output io port sizes the same way as isapnp.c .


>How-To-Repeat:
$ grep -c '\->ia_iosize *=' /sys/arch/*/isa/*.c /sys/dev/isa/*.c|grep :0$ | cut -f 1 -d: | xargs grep -c isa_attach_args | grep -v :0$
/sys/dev/isa/isa.c:3


>Fix:
--- src/sys/dev/isa/isa.c.orig	Sun Mar 29 23:32:06 1998
+++ src/sys/dev/isa/isa.c	Sun Mar 29 23:32:24 1998
@@ -180,7 +180,7 @@
 	ia.ia_dmat = sc->sc_dmat;
 	ia.ia_ic = sc->sc_ic;
 	ia.ia_iobase = cf->cf_iobase;
-	ia.ia_iosize = 0x666;/* cf->cf_iosize; */
+	ia.ia_iosize = cf->cf_iosize;
 	ia.ia_maddr = cf->cf_maddr;
 	ia.ia_msize = cf->cf_msize;
 	ia.ia_irq = cf->cf_irq == 2 ? 9 : cf->cf_irq;
@@ -210,7 +210,7 @@
 		ia.ia_dmat = sc->sc_dmat;
 		ia.ia_ic = sc->sc_ic;
 		ia.ia_iobase = cf->cf_iobase;
-		ia.ia_iosize = 0x666; /* cf->cf_iosize; */
+		ia.ia_iosize = cf->cf_iosize;
 		ia.ia_maddr = cf->cf_maddr;
 		ia.ia_msize = cf->cf_msize;
 		ia.ia_irq = cf->cf_irq == 2 ? 9 : cf->cf_irq;
--- src/sys/dev/isa/isa.c.orig	Sun Mar 29 23:32:24 1998
+++ src/sys/dev/isa/isa.c	Tue Apr  7 17:34:56 1998
@@ -145,7 +145,7 @@
 	if (ia->ia_iosize)
 		printf(" port 0x%x", ia->ia_iobase);
 	if (ia->ia_iosize > 1)
-		printf("-0x%x", ia->ia_iobase + ia->ia_iosize - 1);
+		printf("/%d", ia->ia_iosize);
 	if (ia->ia_msize)
 		printf(" iomem 0x%x", ia->ia_maddr);
 	if (ia->ia_msize > 1)
>Audit-Trail:
>Unformatted: