
This is a driver-breaking update to the netdriver library, which is used by all network drivers. The aim of this change is to make the library more compatible with NetBSD, and in particular with various features that are expected to be supported by the NetBSD userland. The main changes made by this patch are the following: - each network driver now has a NetBSD-style short device name; - drivers are not expected to receive packets right after startup; - extended support for receipt modes, including multicast lists; - support for multiple parallel send, receive requests; - embedding of I/O vectors in send and receive requests; - support for capabilities, including checksum offloading; - support for reporting link status updates to the TCP/IP stack; - support for setting and retrieving media status; - support for changing the hardware (MAC) address; - support for NetBSD interface flags IFF_DEBUG, IFF_LINK[0-2]; - support for NetBSD error statistics; - support for regular time-based ("tick") callbacks. IMPORTANT: this patch applies a minimal update to the existing drivers in order to make them work at all with the new netdriver library. It however does *not* change all drivers to make use of the new features. In fact, strictly speaking, all drivers are now violating requirements imposed by the new library in one way or another, most notably by enabling packet receipt when starting the driver. Changing all the drivers to be compliant, and to support the newly added options, is left to future patches. The existing drivers should currently *not* be taken as examples of how to implement a new network driver! With that said, a few drivers have already been changed to make use of some of the new features: fxp, e1000, rtl8139, and rtl8169 now report link and media status, and the last three of those now support setting the hardware MAC address on the fly. In addition, dp8390 has been changed to default to PCI autoconfiguration if no configuration is specified through environment variables. Change-Id: I4b3ea9c0b9bc25d5b0609c6ff256fb0db71cdc42
This is my implementation of a new network task for the Minix kernel. I did it initially to handle a 3c501 board (Etherlink), but those board are so unstable that it is not worth using them except for learning how to implement a driver. When I got a 3c509b board (Etherlink III) it was easier to write the code to handle them. The Minix code in 'dp8390.c' is too specific for the National chip set, so what I did was to remove as much as I needed of the code dependant from the chip and produce a generic task that, I hope, will be able to handle many more cards. $Log$ Revision 1.1 2005/06/29 10:16:46 beng Import of dpeth 3c501/3c509b/.. ethernet driver by Giovanni Falzoni <fgalzoni@inwind.it>. Revision 1.3 2004/04/14 12:49:07 lsodgf0 Changes for porting to Minix 2.0.4 run on BOCHS Revision 1.2 2002/03/25 14:16:09 lsodgf0 The driver for the NEx000 has been rewritten to be operational with the ACCTON 18xx (an NE1000 clone) The I/O routines for 16 bit cards are still untested.. Revision 1.1 2002/02/09 09:35:09 lsodgf0 Initial revision The package is not fully tested, i.e. I had only 3Com boards (3c501, 3c503, 3c503/16 and 3c509b) and WD8003. I got also a NE1000 clone but it was not fully operational and I could not appreciate the results. For this reason the changes done to the interface to I/O for 8 and 16 bits are not tested.