Subject: kern/2803: isa/if_ed.c driver does not support non-memory-mapped 3c503
To: None <gnats-bugs@gnats.netbsd.org>
From: Marc Horowitz <marc@cygnus.com>
List: netbsd-bugs
Date: 10/03/1996 19:46:24
>Number:         2803
>Category:       kern
>Synopsis:       isa/if_ed.c driver does not support non-memory-mapped 3c503
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct  3 16:50:00 1996
>Last-Modified:
>Originator:     Marc Horowitz
>Organization:
	Cygnus Support
>Release:        $NetBSD: if_ed.c,v 1.101 1996/06/25 20:47:02 thorpej Exp $
>Environment:
System: NetBSD rover 1.2A NetBSD 1.2A (MARCWL) #43: Tue Oct 1 23:50:04 EDT 1996 marc@rover:/u3/netbsd/src/sys/arch/i386/compile/MARCWL i386


>Description:

The 3C503 card jumpers which configure memory mapping can be set to
four different memory locations, or to disable memory mapping.  This
last configuration is not supported by the driver, and silently fails.

>How-To-Repeat:

Install a 3c503 card with memory mapping disabled.  Boot a kernel with
an ed driver.  The probe fails silently, even though it can tell a
card is present in the system.

>Fix:

This patch will at least cause the driver to explain the problem to
the user.  Fixing the driver is more involved.

*** if_ed.c~	Thu Oct  3 19:21:34 1996
--- if_ed.c	Thu Oct  3 19:24:06 1996
***************
*** 732,739 ****
  		ia->ia_iobase = ed_3com_iobase[ptr];	/* XXX --thorpej */
  
  	x = bus_io_read_1(bc, ioh, asicbase + ED_3COM_PCFR);
! 	if (x == 0 || (x & (x - 1)) != 0)
  		goto err;
  	ptr = ffs(x) - 1;
  	if (ia->ia_maddr != MADDRUNK) {
  		if (ia->ia_maddr != ed_3com_maddr[ptr]) {
--- 732,742 ----
  		ia->ia_iobase = ed_3com_iobase[ptr];	/* XXX --thorpej */
  
  	x = bus_io_read_1(bc, ioh, asicbase + ED_3COM_PCFR);
! 	if (x == 0 || (x & (x - 1)) != 0) {
! 		printf("%s: The 3c503 is not currently supported with memory maping diabled.\n%s: Change your jumpers to enable memory mapping.\n",
! 		       sc->sc_dev.dv_xname, sc->sc_dev.dv_xname);
  		goto err;
+ 	}
  	ptr = ffs(x) - 1;
  	if (ia->ia_maddr != MADDRUNK) {
  		if (ia->ia_maddr != ed_3com_maddr[ptr]) {

>Audit-Trail:
>Unformatted: