Subject: Re: how to write/port network drivers?
To: Christoph Fuchs <christoph@fuchs.cc>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-net
Date: 10/14/2006 11:58:19
--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Oct 13, 2006 at 04:57:08PM +0200, Christoph Fuchs wrote:
> Hello,
>=20
> I'm trying hard to make the Intel 82573 network controllers work with=20
> the NetBSD 3.0 kernel.
>=20
> Somehow I managed it to "port" the if_em.c mentioned at=20
> <http://users.ece.gatech.edu/~dheeraj/netbsd.html> to kernel 3.0 - the=20
> network interface works with with some major flaws (only 100mbit=20
> connections work "correct", but if you pull the cable and plug it in=20
> again the connection is very slow -- setting the device down and up=20
> makes it fast again; gigabit support doesn't really work (very slow,=20
> just 4 MB/s)).
>=20
> I have no previous experience in writing device drivers, are there any=20
> hints on writing/porting network device drivers for NetBSD? Is there any=
=20
> documentation? The things I already found don't help that much. Where=20
> can I find more information about when the driver functions get called=20
> by the stack?

Wright/Stevens, TCP/IP Illustrated Volume 2, should get you the background.
However, a lot of stuff has changed a bit since 4.4BSD. I've written a=20
device driver porting guide for the 4.4BSD / new ARP subsystem (that I=20
wrote) transition[1], but there have been more small changes. I *think*
most should be transparent to the device driver writer...

	-is

[1] http://ezine.daemonnews.org/199809/underhood.html
--=20
seal your e-mail: http://www.gnupg.org/

--BXVAT5kNtrzKuDFl
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iD8DBQFFMLS6N4tiz3B8hB0RAp/PAJ44lsX3NMBxh7uh7BK+gAssKEJkUACgzun4
crls3fc9PRrNRZYGUXuml3g=
=l5HP
-----END PGP SIGNATURE-----

--BXVAT5kNtrzKuDFl--