Subject: Intel 82557 NIC device driver for MIP running older BSD
To: None <tech-net@netbsd.org>
From: David Christensen <dpchrist@pacbell.net>
List: tech-net
Date: 09/13/2000 18:16:59
tech-net@netbsd.org:


I am trying to port the current NetBSD Intel 82557 Ethernet driver to an
embedded MIPS board that is running an older Tulip driver and NetBSD/
OpenBSD code.


Section 14.4 of [1] states that the cfdriver struct contains pointers to the
driver's _match() and _attach() routines.

1. My board's existing Tulip driver [2] seems to follow the above
   method.

2. The current NetBSD Tulip driver [3] is putting the function pointers
   into:

   a. struct cfdriver (#ifdef __bsdi__ ?);

   b. struct pci_device (#ifdef __FreeBSD__ ?); and

   c. struct cfattach (#ifdef __NetBSD__ ?).

3. The current NetBSD Intel 82557 driver [4] puts the function pointers
   into a cfattach struct.

Questions:

1. Is there something I can read to help me understand the NOS DDI/DDK?

2. Is there something I can read to help me understand autoconfiguration
   using cfattach?



Thank you,

David Christensen
dchrist@dnai.com



References:

[1] Marshall Kirk McKusick, et al, 1996, "The design and implementation
    of the 4.4BSD operating system", Addison-Wesley Longman, Inc.,
    ISBN 0-201-54979-4.

[2] Embedded MIPS board Tulip driver is based upon the following:

    OpenBSD: if_devar.h,v 1.8 1998/10/08 05:51:19 jason Exp
    NetBSD: if_devar.h,v 1.13 1997/06/08 18:46:36 thorpej Exp

    OpenBSD: if_de.c,v 1.37 1998/12/02 07:34:59 deraadt Exp
    NetBSD: if_de.c,v 1.45 1997/06/09 00:34:18 thorpej Exp

[3] Current (?) NetBSD Tulip driver:

    NetBSD: if_devar.h,v 1.35 2000/05/03 20:52:29 thorpej Exp
    NetBSD: if_de.c,v 1.92 2000/06/28 16:08:42 mrg Exp

[4] Current (?) NetBSD Intel 82557 driver:

    NetBSD: i82557reg.h,v 1.3 1999/12/12 17:46:36 thorpej Exp
    NetBSD: i82557reg.h,v 1.3 1999/12/12 17:46:36 thorpej Exp
    NetBSD: i82557.c,v 1.36 2000/06/29 16:53:48 thorpej Exp
    NetBSD: if_fxp_pci.c,v 1.10 2000/07/15 21:36:19 jhawk Exp