Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Nov 2000 15:25:23 +0900
From:      Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
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
Message-ID:  <86d7fnryr0.wl@tkc.att.ne.jp>
In-Reply-To: In your message of "Thu, 23 Nov 2000 09:57:44 %2B0700" <004a01c054f9$2866f5c0$2904020a@unpar.ac.id>
References:  <004a01c054f9$2866f5c0$2904020a@unpar.ac.id>

next in thread | previous in thread | raw e-mail | index | archive | help

At Thu, 23 Nov 2000 09:57:44 +0700,
Thomas Wahyudi <thomas@home.unpar.ac.id> 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 <mzaki@e-mail.ne.jp> 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86d7fnryr0.wl>