VxWorks Reference Manual : Libraries

if_fn

NAME

if_fn - Fujitsu MB86960 NICE Ethernet network interface driver

ROUTINES

fnattach( ) - publish the fn network interface and initialize the driver and device

DESCRIPTION

This module implements the Fujitsu MB86960 NICE Ethernet network interface driver.

This driver is non-generic and has only been run on the Fujitsu SPARClite Evaluation Board. It currently supports only unit number zero. The driver must be given several target-specific parameters, and some external support routines must be provided. 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 fnattach( ), which publishes the fn interface and initializes the driver and device.

TARGET-SPECIFIC PARAMETERS

External support routines provide all parameters:

device I/O address
This parameter specifies the base address of the device's I/O register set. This address is assumed to live in SPARClite alternate address space.

interrupt vector
This parameter specifies the interrupt vector to be used by the driver to service an interrupt from the NICE device. The driver will connect the interrupt handler to this vector by calling intConnect( ).

Ethernet address
This parameter specifies the unique, six-byte address assigned to the VxWorks target on the Ethernet.

EXTERNAL SUPPORT REQUIREMENTS

This driver requires five external support functions:

char *sysEnetIOAddrGet (int unit)
This routine returns the base address of the NICE control registers. The driver calls this routine once, using fnattach( ).

int sysEnetVectGet (int unit)
This routine returns the interrupt vector number to be used to connect the driver's interrupt handler. The driver calls this routine once, using fnattach( ).

STATUS sysEnetAddrGet (int unit, char *pCopy)
This routine provides the six-byte Ethernet address used by unit. It must copy the six-byte address to the space provided by pCopy. It returns OK, or ERROR if it fails. The driver calls this routine once, using fnattach( ).

void sysEnetIntEnable (int unit), void sysEnetIntDisable (int unit)
These routines enable or disable the interrupt from the NICE for the specified unit. Typically, this involves interrupt controller hardware, either internal or external to the CPU. The driver calls these routines only during initialization, using fnattach( ).

SYSTEM RESOURCE USAGE

When implemented, this driver requires the following system resources:

    - one mutual exclusion semaphore
    - one interrupt vector
    - 3944 bytes in text section (text)
    - 0 bytes in the initialized data section (data)
    - 3152 bytes in the uninitialized data section (BSS)

The above data and BSS requirements are for the SPARClite architecture and may vary for other architectures. Code size (text) varies greatly between architectures and is therefore not quoted here.

The NICE device maintains a private buffer for all packets transmitted and received. Therefore, the driver does not require any system memory to share with the device. This also eliminates all data cache coherency issues.

SEE ALSO

if_fn, ifLib


Libraries : Routines

fnattach( )

NAME

fnattach( ) - publish the fn network interface and initialize the driver and device

SYNOPSIS

STATUS fnattach
    (
    int unit /* unit number */
    )

DESCRIPTION

The routine publishes the fn 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.

RETURNS

OK or ERROR.

SEE ALSO

if_fn