Bug 22141

Summary: Missing include file in if_tx.c
Product: Base System Reporter: lars.koeller <Lars.Koeller>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: Lars.Koeller
Priority: Normal    
Version: 4.1-RELEASE   
Hardware: Any   
OS: Any   

Description lars.koeller 2000-10-20 06:50:00 UTC
	When doing an "make depend" for an customized kernel with the 
	tx network card driver, one gets an

	../../pci/if_tx.c:80: miibus_if.h: No such file or directory


	If I comment the following line in if_tx.c

	#include "miibus_if.h"   

	I get a compile error:

cc -c -O -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -fformat-extensions -ansi  -nostdinc -I- -I. -I../.. -I../../../include  -D_KERNEL -include opt_global.h -elf  -mpreferred-stack-boundary=2  ../../pci/if_tx.c
../../pci/if_tx.c:346: `miibus_readreg_desc' undeclared here (not in a function)
../../pci/if_tx.c:346: initializer element is not constant
../../pci/if_tx.c:346: (near initialization for `epic_methods[6].desc')
../../pci/if_tx.c:347: `miibus_writereg_desc' undeclared here (not in a function)
../../pci/if_tx.c:347: initializer element is not constant
../../pci/if_tx.c:347: (near initialization for `epic_methods[7].desc')
../../pci/if_tx.c:348: `miibus_statchg_desc' undeclared here (not in a function)
../../pci/if_tx.c:348: initializer element is not constant
../../pci/if_tx.c:348: (near initialization for `epic_methods[8].desc')
../../pci/if_tx.c:349: `miibus_mediainit_desc' undeclared here (not in a function)
../../pci/if_tx.c:349: initializer element is not constant
../../pci/if_tx.c:349: (near initialization for `epic_methods[9].desc')
*** Error code 1

Fix: 

Reinstall the 

	miibus_if.h

	out of cvs!
How-To-Repeat: 
	Compile an kernel with the tx network device and 4.1-STABLE
Comment 1 Gregory Bond 2000-10-20 08:14:54 UTC
If you use "device tx", you also need "device miibus" as is documented in LINT.
Comment 2 lars.koeller 2000-10-20 12:45:15 UTC
----------

Hi!

In reply to Gregory Bond who wrote:
 =

 > If you use "device tx", you also need "device miibus" as is documented=
 in LI
     NT.

Thanks, I found it, too, but the documentation didn't state =

clearly for what cards I need it.

Is it very complicate to check this during the config phase?

Best regards

Lars

-- =

E-Mail:                                 \  Lars K=F6ller (Unix Sysadmin)
  Lars.Koeller@Uni-Bielefeld.DE           \  Computing Center
  lkoeller@cc.FH-Lippe.DE                   \  University of Bielefeld
PGP-key:                                      \  Germany
  http://www.pgp.net/pgpnet/www-key.html        \  Tel: +49 521 106 4964
----------- FreeBSD, what else? ---- http://www.freebsd.org -------------=
Comment 3 Alfred Perlstein freebsd_committer freebsd_triage 2000-11-30 20:34:26 UTC
State Changed
From-To: open->closed

user should have included "device miibus" in kernel config file. 
kernel compile errors are not "critical" !