Subject: port-i386/4132: Kernel link failure on non-PCI machine, autoconf.c
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 09/22/1997 00:28:11
>Number:         4132
>Category:       port-i386
>Synopsis:       Kernel link failure on non-PCI machine, autoconf.c
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 21 13:35:01 1997
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 21 Sep 1997
>Environment:
	
System: NetBSD erik-be.uni-c.dk 1.2G NetBSD 1.2G (ERIKBE) #49: Mon Sep 15 11:09:37 MEST 1997 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386


>Description:
	i386/i386/autoconf.c calls pci_decompose_tag which is not compiled into
	the kernel on a non-PCI machine.
>How-To-Repeat:
>Fix:
maybe something along this:
Index: autoconf.c
===================================================================
RCS file: /home/cvs-base/src/sys/arch/i386/i386/autoconf.c,v
retrieving revision 1.1.1.4
diff -c -r1.1.1.4 autoconf.c
*** autoconf.c	1997/09/21 11:42:03	1.1.1.4
--- autoconf.c	1997/09/21 20:15:03
***************
*** 288,294 ****
--- 288,296 ----
  }
  
  #include <dev/isa/isavar.h>
+ #if NPCI > 0
  #include <dev/pci/pcivar.h>
+ #endif
  
  void
  device_register(dev, aux)
***************
*** 317,322 ****
--- 319,325 ----
  			if(bin->addr.iobase == iaa->ia_iobase)
  				goto found;;
  		}
+ #if NPCI > 0
  		if(bin->bus == BI_BUS_PCI &&
  		   !strcmp(dev->dv_parent->dv_cfdata->cf_driver->cd_name, "pci")) {
  			struct pci_attach_args *paa = aux;
***************
*** 328,333 ****
--- 331,337 ----
  			if(bin->addr.tag == ((b << 8) | (d << 3) | f))
  				goto found;
  		}
+ #endif
  	}
  	return;
===========================================

regards Erik Bertelsen

>Audit-Trail:
>Unformatted: