At Thu, 23 Nov 2000 09:57:44 +0700,
Thomas Wahyudi <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>
Dept. of Biological Sciences, Grad. School of Science, Univ. of Tokyo, Japan
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message