Makefile README bin instal man wdnet README IBM PS/2 WD8003Ex/A Ethernet Adapter Support Introduction and Configuration
Before installing the WD8003E board in your system, it may be necessary
to manually set the Transceiver Type using the two jumpers on the WD8003E
board. If you intend to use an external transceiver, select the AUI option.
If you intend to use the onboard transceiver, select the BNC option. If
no WD8003E adapter is currently installed in the system, follow the instructions
for
To configure the system to recognize the adapter, copy the option diskette which came with the adapter to a backup copy of the Reference Diskette which came with the system. For instructions on how to copy an option diskette, see the appropriate IBM PS/2 Quick Reference Guide. After the option information has been copied to the backup copy of the Reference Diskette, the system may be configured. The WD8003E adapter has several configuration options such as Enable/Disable Adapter, I/O Address Range, Interrupt Level, Packet Buffer RAM Address Range. All are set using the reference diskette. When running the reference diskette, the default values may generally be used. Only if conflicts occur is it necessary to use values other than the default values. Now boot the system under AIX PS/2. The AIX PS/2 TCP/IP LPP must be installed before the AIX PS/2 WD8003Ex/A software. This LPP provides the network applications such as ftp, telnet, rlogin, and others which are used to communicate over an Ethernet or Token Ring network. You may check to see if the TCP/IP LPP is installed (and at what level) on your system by using the following command: "grep tcpip /etc/lpp/ghf". See the AIX PS/2 TCP/IP User's Guide for instructions on how to install AIX PS/2 TCP/IP. Superuser (root) authority is required to install the WD8003Ex/A software under AIX. Once superuser authority is established, change directories to /usr/nifl/wd and enter the command "make install". This will install the appropriate code into the kernel, modify some system files and rebuild the kernel. Before rebooting with the new kernel, you may want to configure your
machines local startup script. When the system boots, the "/etc/rc.tcpip"
script searches for a file called "/<LOCAL>/rc.tcpip.local" which is
located in the "/<LOCAL>" directory of the system which has the WD8003Ex/A
installed. While it is usually advisable to configure your system
from the "/etc/rc.tcpip" file, for unique configurations, /<LOCAL>/rc.tcpip.local
comes in handy. For
To correctly configure rc.tcpip.local, make sure to remove any extra lines for "net0", "en0", etc. For each adapter, there should be one line to configure each device. Use "ifconfig wd? IPaddr", where "?" can be either "0" or "1", and "IPaddr" is the symbolic name (often the systemname) found in the /etc/hosts file. It is always advisable to check /etc/hosts for correctness when adding new sites to a cluster. After the startup scripts are set up, boot the system and make sure there are no errors. The WD8003Ex/A network device should be available immediately after rebooting the system. If your machine fails to reboot and "ping" other sites, reread this procedure or refer to the "AIX TCPIP USERS GUIDE". INSTALLATION/TROUBLESHOOTING HINTS: o Always check the *simple* things first, like: a. Did I check the release notes up to the current PTF level?
(ha-ha, very funny)
o When the following message is displayed, you may not
be using the fixed version of if_ena.o, or it may not named correctly:
o If newkernel -install fails, the /local or /tmp filesystems
may not have enough space. Truncate any excess log files in /<LOCAL>/adm/{messages.old,pacct},
etc. *NEVER* remove a log file. Simply "cat
/dev/null > filename". You should issue a "kill
-1 PID" to the syslogd process after truncating a file like /local/adm/messages.
Run "make install" again.
o "make install" may have run to completion with no errors and rebuilt the kernel correctly. If, after rebooting the machine, "ifconfig wc0" shows no sign of wd0, you probably did not boot off of the new kernel. Make sure that /<LOCAL>/unix.std is the latest (check the date) kernel with newly installed wd support, and reboot the machine with the good kernel. If this doesn't fix the problem, as a last resort, you may wish to copy a working kernel from another machine of the same type, patch it, and restore it by typing following steps: a. cd /local
o Even after successfully installing the WD8003E/A driver and rebooting the machine, you may still not be on the network although you have configured "wd0", and netstat -r shows correct routes. This could mean that the machine has not been configured to use the WD8003Ex/A adapter with the correct transceiver type. To correct this problem complete the following steps: a. Halt the machine.
NOTE: Some boards may use the reference diskette to set the transceiver type. If there are no jumpers on the WD ethernet board, set the transceiver type by booting with the reference diskette and choosing the "Set Configuration" option. Removal
If_ena.n WD8003E Ethernet/IEEE 802.3 Interface SYNOPSIS The wd device implements a LAN interface driver for the WD8003E/A family of LAN adaptors. The interface is supported for use with the AIX TCP/IP network package. The driver implements both the Ethernet and IEEE 802.3 modes of operation with the default being the Ethernet mode. The wd driver follows the normal AIX conventions for a LAN interface driver. It may be installed by using the devices command and adding wd8003e in the LAN section. The wd driver may only be installed once via the devices command
no matter the number of adaptors installed. The driver automatically detects
the number and types of adaptors installed and configures itself accordingly.
The adaptor found in the lowest numbered slot is named wd0. If more than
one adaptor is found, they are sequentially numbered in increasing slot
order.
IF_ENA Driver Description Introduction
The basic driver form is based on drivers for the 4.3BSD version of UNIX. As a result, there are few surprises to be found in the driver. This document describes the driver functions and data structures. Data structures which are a generic part of AIX will not be described in detail since they are documented elsewhere. The last section of this document gives a brief overview of the flow of control through the driver. Driver Functions
wdinit(dev)
The init function starts by querying AIX for all boards found for each
adaptor ID defined in the array wd_adaptids. As each board is found, it
is inserted into the slotmap array with an insertion sort on the slot number.
After the board's presence has been recorded, a count of the number of
If no boards are found, the init function exits. If boards were found the device is installed with SM DEV_INSTALL. The boards are then examined starting at the lowest slot number found and working to the highest slot number found. This results in sequential unit numbers being assigned with zero for the board in the lowest numbered slot, increasing by one for each additional board found in slot order. As each board is examined, the board type and configuration information is obtained and stored in a struct wdsoftc structure in the array wd_ifs, the driver interrupt handler is then inserted as a handler for the IRQ level the board is configured for, the shared memory segment is mapped into kernel address space, and the wdattach function is called with the unit number corresponding to the board. When the init function exits, the driver is ready to be configured and the hardware initialized. wdattach(unit)
It is here that the name and unit number of the device become associated with the ifnet structure. This is the name used by 2ifconfig and displayed by netstat -i wdintr(vec)
When the interrupt handler is called, it searches all of its device data structures for all devices which match the IRQ level specified by the vec parameter. For each device found, the interrupt handler first disables the device interrupts and then checks to see if this device did, in fact, interrupt. If the device didn't interrupt, the handler restores the interrupt status to its original value and continues the search. This allows the IRQ to be shared with other drivers. If the device did interrupt, a number of conditions are checked for and the events indicated in the status word are processed. The events handled are: Receive Ring Overrun
Packet Received
If the type is a value less than SM ETHERNETMTU, it is interpreted as an IEEE 802.2 LLC (Logical Link Control) packet. In the current version of the driver, only SNAP packets (802.1 Sub-Network Access Protocol) are actually interpreted. The XID (eXchange ID) and TEST packets of the LLC protocol are responded to if received. If the type is greater than SM ETHERNETMTU, it is interpreted as an Ethernet packet. In both data link protocol modes, 802.2 and Ethernet, only the IP (Internet Protocol) and ARP (Address Resolution Protocol) are retained and queued to the appropriate input queue. ARP packets are processed directly by calling arpinput and IP is placed on the ipintrq and a network, software interrupt is scheduled. Transmit Complete Interrupt
wdreset(ifp)
wdoutput(ifp, m0, dst)
wdstart(ifp)
wdinput(ifp, wdif)
wdioctl(ifp, cmd, data)
SIOCSIFADDR
SIOCSIFFLAGS
If the SM IF_IEEE flag is set, the if_mtu member of the ifnet structure for the device is changed from SM ETHERNETMTU to SM ETHERMTU to account for the size of the IEEE 802.2 header. wd_insert_slot(map, nwd, slot)
The map parameter is the unsigned character array of slots and the nwd parameter is the size of the array. wdinitboard(unit)
The board is first reset to a powerup state and the buffer RAM is configured to the required physical address and enabled for use. The remaining setup consists of: Check if a 16-bit board requiring additional setup.
wdgetboardtype(port, wdif)
Hardware revision level
wdtype(type)
wdbufflen(m0)
wdwatchdog(wdif)
Driver Data Structures
unsigned int wd_adaptids[]
When new boards that have different IDs become available, this array should be added to struct wdsoftc *wd_ifs. This pointer will be initialized to point to a data area which is large enough to have one wdsoftc structure per board found in the system. The wdsoftc structure contains a number of structure members which hold the data necessary to control each board. It also contains one member which is the ARP table which in turn contains the standard AIX ifnet structure for the board. The rest of the structure members are used to control the board and keep track of which transmit buffers are in use. The structure is defined as follows: struct wdsoftc {
struct ifnet This structure is contained within the wdsoftc structure described above. It is contained within the wd_ac member of the wdsoftc structure. The ifnet structure is in turn linked into a list of devices by the wdattach function in order for the interface to be found by the protocols which might use the interface. The ifnet structure is the primary mechanism for associating the device specific driver with protocol drivers. All output gets queued through this structure while waiting on the hardware to become ready. Since this is a standard AIX data structure, it won't be described further. Flow of Control
Initialization Path
Output Path
Input Path
|