From owner-freebsd-hackers Wed Nov 22 22:25:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from tkc.att.ne.jp (tkc.att.ne.jp [165.76.16.7]) by hub.freebsd.org (Postfix) with ESMTP id 0169337B4D7 for ; Wed, 22 Nov 2000 22:25:39 -0800 (PST) Received: from work.mzaki.nom (108.pool9.ipctokyo.att.ne.jp [165.76.205.108]) by tkc.att.ne.jp (8.8.8+Spin/3.6W-CONS(10/06/00)) id PAA14122; Thu, 23 Nov 2000 15:25:29 +0900 (JST) Date: Thu, 23 Nov 2000 15:25:23 +0900 Message-ID: <86d7fnryr0.wl@tkc.att.ne.jp> From: Motomichi Matsuzaki To: thomas@home.unpar.ac.id Cc: freebsd-hackers@freebsd.org Subject: Re: 2 pci , 1 isa, same type NIC makes freebsd seems to be confused In-Reply-To: In your message of "Thu, 23 Nov 2000 09:57:44 +0700" <004a01c054f9$2866f5c0$2904020a@unpar.ac.id> References: <004a01c054f9$2866f5c0$2904020a@unpar.ac.id> X-Mailer: Wanderlust/1.1.1 (Purple Rain) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 (generated by WEMI 1.13.7 - "Shimada") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG At Thu, 23 Nov 2000 09:57:44 +0700, Thomas Wahyudi wrote: > I have FreeBSd 4.1 with 2 PCI NIC and 1 ISA NIC > all of them detected as ed0, ed1. ed2 > at kernel, I put ISA NIC as ed0. Currently, many of NIC drivers can not handle this situation. Many drivers shoud be used on single bus. These are occured from miss-using of devclass. For example, 'ed', In /sys/dev/ed/if_ed_isa.c: static devclass_t ed_isa_devclass; And in /sys/dev/ed/if_ed_pci.c: static devclass_t ed_devclass; These separated devclass leads to confusable situation. Drivers which have same name (such like 'ed') should share one devclass, or multiple 'ed0' appear on the host. Sadly, this type of mistakes are widely spreaded on the tree. The 'snc' driver (which I ported) does right things on this point. /sys/dev/snc/if_sncvar.h extern declaration /sys/dev/snc/if_snc.c real declaration /sys/dev/snc/if_snc_cbus.c use devclass in DRIVER_MODULE /sys/dev/snc/if_snc_pccard.c use devclass in DRIVER_MODULE -- Motomichi Matsuzaki Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message