VxWorks Reference Manual : Libraries
if_elt - 3Com 3C509 Ethernet network interface driver
eltattach( ) - publish the elt interface and initialize the driver and device
eltTxOutputStart( ) - start output on the board
eltShow( ) - display statistics for the 3C509 elt network interface
This module implements the 3Com 3C509 network adapter driver.
The 3C509 (EtherLink® III) is not well-suited for use in real-time systems. Its meager on-board buffering (4K total; 2K transmit, 2K receive) forces the host processor to service the board at a high priority. 3Com makes a virtue of this necessity by adding fancy lookahead support and adding the label "Parallel Tasking" to the outside of the box. Using 3Com's drivers, this board will look good in benchmarks that measure raw link speed. The board is greatly simplified by using the host CPU as a DMA controller.
This device is soft-configured by a DOS-hosted program supplied by the manufacturer. No jumpering diagram is required.
This driver provides the standard external interface with the following exceptions. All initialization is performed within the attach routine and there is no separate initialization routine. Thus, in the global interface structure, the function pointer to the initialization routine is NULL.
There are two user-callable routines:
- eltattach( )
- publishes the elt interface and initializes the driver and device.
- eltShow( )
- displays statistics that are collected in the interrupt handler.
See the manual entries for these routines for more detail.
- one mutual exclusion semaphore
- one interrupt vector
- 16 bytes in the uninitialized data section (bss)
- 180 bytes (plus overhead) of malloc'ed memory per unit
- 1530 bytes (plus overhead) of malloc'ed memory per frame buffer,
minimum 5 frame buffers.
The EISA and MCA versions of the board are not supported.
Attachment selection assumes the board is in power-on reset state; a warm restart will not clear the old attachment selection out of the hardware, and certain new selections may not clear it either. For example, if RJ45 was selected, the system is warm-booted, and AUI is selected, the RJ45 connector is still functional.
Attachment type selection is not validated against the board's capabilities, even though there is a register that describes which connectors exist.
The loaned buffer cluster type is MC_EI; no new type is defined yet.
Although it seems possible to put the transmitter into a non-functioning state, it is not obvious either how to do this or how to detect the resulting state. There is therefore no transmit watchdog timer.
No use is made of the tuning features of the board; it is possible that proper dynamic tuning would reduce or eliminate the receive overruns that occur when receiving under task control (instead of in the ISR).
More receive buffers (than the default 20) could help by allowing more loaning in cases of massive reception; four per receiving TCP connection plus four extras should be considered a minimum.
eltattach( ) - publish the elt interface and initialize the driver and device
STATUS eltattach ( int unit, /* unit number */ int port, /* base I/O address */ int ivec, /* interrupt vector number */ int intLevel, /* interrupt level */ int nRxFrames, /* # of receive frames (0=default) */ int attachment, /* Ethernet connector to use */ char * ifName /* interface name */ )
The routine publishes the elt interface by filling in a network interface record and adding this record to the system list. This routine also initializes the driver and the device to the operational state.
OK or ERROR.
eltTxOutputStart( ) - start output on the board
#ifdef BSD43_DRIVER static void eltTxOutputStart ( int unit )
This routine is called from ether_output( ) when a new packet is enqueued in the interface mbuf queue.
Note that this function is ALWAYS called between an splnet( ) and an splx( ). This is true because netTask( ), and ether_output( ) take care of this when calling this function. Therefore, no calls to these spl functions are needed anywhere in this output thread.
eltShow( ) - display statistics for the 3C509 elt network interface
void eltShow ( int unit, /* interface unit */ BOOL zap /* 1 = zero totals */ )
This routine displays statistics about the elt Ethernet network interface. It has two parameters:
- unit
- interface unit; should be 0.
- zap
- if 1, all collected statistics are cleared to zero.
N/A