VxWorks Reference Manual : Libraries

if_nicEvb

NAME

if_nicEvb - National Semiconductor ST-NIC Chip network interface driver

ROUTINES

nicEvbattach( ) - publish and initialize the nicEvb network interface driver
nicTxStartup( ) - the driver's actual output routine

DESCRIPTION

This module implements the National Semiconductor 83902A ST-NIC Ethernet network interface driver.

This driver is non-generic and is for use on the IBM EVB403 board. Only unit number zero is supported. The driver must be given several target-specific parameters. These parameters, and the mechanisms used to communicate them to the driver, are detailed below.

BOARD LAYOUT

This device is on-board. No jumpering diagram is necessary.

EXTERNAL INTERFACE

This driver provides the standard external interface with the following exceptions. All initialization is performed within the attach routine; there is no separate initialization routine. Therefore, in the global interface structure, the function pointer to the initialization routine is NULL.

The only user-callable routine is nicEvbattach( ), which publishes the nicEvb interface and initializes the driver and device.

TARGET-SPECIFIC PARAMETERS

device I/O address
This parameter is passed to the driver by nicEvbattach( ). It specifies the base address of the device's I/O register set.

interrupt vector
This parameter is passed to the driver by nicEvbattach( ). It specifies the interrupt vector to be used by the driver to service an interrupt from the ST-NIC device. The driver will connect the interrupt handler to this vector by calling intConnect( ).

device restart/reset delay
The global variable nicRestartDelay (UINT32), defined in this file, should be initialized in the BSP sysHwInit( ) routine. nicRestartDelay is used only with PowerPC platform and is equal to the number of time base increments which makes for 1.6 msec. This corresponds to the delay necessary to respect when restarting or resetting the device.

EXTERNAL SUPPORT REQUIREMENTS

The driver requires the following support functions:

STATUS sysEnetAddrGet (int unit, UINT8 * addr)
The driver expects this routine to provide the six-byte Ethernet hardware address that will be used by unit. This routine must copy the six-byte address to the space provided by addr. This routine is expected to return OK on success, or ERROR. The driver calls this routine, during device initialization, from the nicEnetAddrGet( ) routine.

SYSTEM RESOURCE USAGE

When implemented, this driver requires the following system resources:

    - one mutual exclusion semaphore
    - one interrupt vector

SEE ALSO

if_nicEvb, ifLib


Libraries : Routines

nicEvbattach( )

NAME

nicEvbattach( ) - publish and initialize the nicEvb network interface driver

SYNOPSIS

STATUS nicEvbattach
    (
    int          unit, /* unit number */
    NIC_DEVICE * pNic, /* address of NIC chip */
    int          ivec  /* interrupt vector to use */
    )

DESCRIPTION

This routine publishes the nicEvb interface by filling in a network interface record and adding this record to the system list. It also initializes the driver and the device to the operational state.

RETURNS

OK, or ERROR if the receive buffer memory could not be allocated.

SEE ALSO

if_nicEvb


Libraries : Routines

nicTxStartup( )

NAME

nicTxStartup( ) - the driver's actual output routine

SYNOPSIS

#ifdef BSD43_DRIVER LOCAL STATUS nicTxStartup
    (
    int unit
    )

DESCRIPTION

This routine accepts outgoing packets from the if_snd queue, and then gains exclusive access to the DMA (through a mutex semaphore), then calls nicTransmit( ) to send the packet out onto the interface.

RETURNS

OK, or ERROR if the packet could not be transmitted.

SEE ALSO

if_nicEvb