Date: Wed, 8 Apr 1998 01:33:39 +0200 (MET DST) From: Stefan Bethke <stb@transit.hanse.de> To: Chris Radek <cradek@in221.inetnebr.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Accton EtherPocket device driver porting help Message-ID: <Pine.BSF.3.91.980408012215.1647E-100000@transit.hanse.de> In-Reply-To: <m0yMhVN-000PTVC@hoser.inetnebr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 7 Apr 1998, Chris Radek wrote: > I am wanting to port the Linux driver for the Accton EtherPocket > parallel port ethernet device to FreeBSD. I am having trouble finding a > starting point - the FreeBSD Device Driver Writer's Guide looks great > for character devices, but is unhelpful (empty!) for network devices. [ snip ] > If not, where does a person begin when porting a network driver? I am > not allergic to digging through existing code, but a summary of the > necessary parts would be very helpful. Perhaps something like Linux's > skeleton.c? For "standard" ISA or PCI devices, take a look at one of the existing drivers; many of them are quite simple in their structure. In your case, however, you'd might be better off by looking at lp(4), the IP-over-parallel (aka PLIP) driver, in sys/isa/lpt.c, which basically does what you want, but with a different low-level interface. If you have enougth info on how to communicate with the adapter, this is probably the way to go (note, however, that having the Linux source might not necessarily be considered "enought info", depending on how much you'd be willing to do trial-and-error). You might also consider adding a line discipline a la PPP or SLIP to be loaded on top of the standard lpt driver, if that would be more suitable for the way to communicate to the adapter. Stefan -- Stefan Bethke Muehlendamm 12 Phone: +49-40-256848, +49-177-3504009 D-22087 Hamburg <stefan.bethke@hanse.de> Hamburg, Germany <stb@freebsd.org> 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?Pine.BSF.3.91.980408012215.1647E-100000>