Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ e1x7(7) — Motorola System V 88k Release 4 Version 4.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ifconfig(1M)

mvmecpu(1M)

slink(1M)

strace(1M)

edt_data(4)

master(4)

strcf(4N)

arp(7)

clone(7)

intro(7)

ip(7)

streamio(7)

e1x7(7)  —  SPECIAL FILES AND DEVICES

NAME

e1x7 − MVME1X7 Local Area Network Interface

SYNOPSIS

#include <sys/dlpi.h>
#include <sys/macioctl.h>
fd = open("/dev/e1x7_c0", O_RDWR);

DESCRIPTION

The MVME1X7 on-board Intel LANC chip (82596CA) is a Local Area Network Controller for Ethernet and IEEE 802.3 compatible networks.  The LANC can handle all IEEE802.3 Medium Access Control and channel interface functions.  The e1x7 device driver supports TCP/IP and OSI protocol stacks. 

The e1x7 is a STREAMS-based driver used with MVME1X7 cpu boards.  The e1x7 interface conforms to the Data Link Provider Interface (DLPI).  In addition, the e1x7 driver accepts the MAC management commands specified in the MAC Provider Interface (MPI).  To account for possible cpu board expansion, the driver data structures are designed to accomodate more than one LANC controller on a single cpu board via changes to the edt_data and master.d files. 

The e1x7 driver can be opened directly or indirectly from the clone device driver.  During TCP/IP startup, the e1x7 device is clone opened and linked to the IP and ARP STREAMS modules via the slink command.  From then on, e1x7 converts all the outgoing packets received from IP/ARP to the format defined by the LANC controller and then passes these packets to the chip.  If the OSI-DP package is installed on the system and linked into the kernel, the e1x7 driver will accept outgoing packets from the DLR (OSI LLC1) module. 

Upon receiving incoming packets from the LANC controller, e1x7 converts these packets to STREAMS-based DLPI format messages and passes these packets to the appropriate user (e.g., ARP, IP, or DLR). 

The mvmecpu namer program creates or deletes the device special files for the e1x7 driver at boot time.  The device special filenames, representing the clone devices, are composed of the string e1x7_cy, where y is the controller number.  Controllers are numbered beginning at 0.  The device special filename for the first controller in the system is /dev/e1x7_c0.  If the MVME1X7 board has a second LANC controller, then its device filename would be /dev/e1x7_c1.  The default maximum number of controllers supported by the driver is two (from the /etc/master.d/enet1x7 file), but the driver currently forces support for only a single controller since MVME1X7 boards contain just a single LANC chip. 

An e1x7 device special file major device number is the major device number of the clone device driver.  An e1x7 minor device number follows the format described in the intro(7) man page, i.e., bits 17 through 15 contain the controller number, bit 14 is set, and bits 13 through 0 contain the real major number, which is found in the file /etc/master.d/enet1x7. 

Besides the device special filename, the driver prefix, e1x7, is also used as part of the Ethernet network interface name by both cenet in the network database file /etc/strcf and ifconfig in the script /etc/inet/rc.inet. 

Each e1x7 device may have up to seven (7) minor devices open simultaneously.  If no changes are made to the default /etc/strcf file, slink will, on TCP/IP startup, open minor devices 0 and 1 via the clone device, e1x7_c0, and link these to IP and ARP, respectively.  Users may want to create their own direct-open minor device files (such as /dev/e1x7_c0d0, /dev/e1x7_c0d1, ..., /dev/e1x7_c0d6).  Users wishing to access the driver through these direct-open devices instead of the clone device should consider starting with the last device and working their way backwards. 

USAGE

STREAM Message Processing

The following are the types of STREAMS messages the driver can process:

M_PROTO/M_PCPROTO
Six DLPI protocol message types are supported: DL_INFO_REQ, DL_UNITDATA_REQ, DL_BIND_REQ, DL_UNBIND_REQ, DL_ENABMULTI_REQ, and DL_DISABMULTI_REQ.  Unsupported message types that are received cause an error message of type dl_error_ack_t with dl_errno set to DL_NOTSUPPORTED to be sent back up the stream. 

DL_INFO_REQ is a request for driver information.  Driver information is passed back up the stream in a message of type dl_info_ack_t with dl_primitive set to DL_INFO_ACK.  However, if enough memory is not available for the driver information, an error message of type dl_error_ack_t is sent back up the stream with dl_primitive set to DL_ERROR_ACK. 

DL_UNITDATA_REQ is a request to transmit data.  The message is in the dl_unitdata_req_t format.  The driver will process this message and send data to the appropriate destination address.  Most errors that can occur during this message are turned around in the message itself and sent back up stream in a message with dl_primitive set to DL_UDERROR_IND.  If enough memory is not available for processing, an error message of type dl_error_ack_t is sent back up the stream with dl_primitive set to DL_ERROR_ACK. 

DL_BIND_REQ is a request to bind a service access point (SAP) to the minor device number associated with the current stream.  The request message is of type dl_bind_req_t.  A SAP type, as long as it is valid, is assumed to be an Ethernet binding if it is not equal to IEEE8023_TYPE.  Any Ethernet type can be used as a binding SAP.  Only one stream may use IEEE8023_TYPE as a SAP.  All IEEE802.3 frames will be sent up this stream.  If the OSI-DP package has been installed, the DLR module will bind to this SAP and will receive all 802.3 frames.  Once the stream has been bound, an acknowledgement message type dl_bind_ack_t is sent back up the stream.  Errors generated during the processing of this message that cause an error message of type dl_error_ack_t to be sent back up the stream are: stream already bound, bad sap value, and cannot allocate memory for acknowledgement. 

DL_UNBIND_REQ is a request to unbind the minor device associated with the current stream.  Errors generated during message processing that cause an error message of type dl_error_ack_t are: minor device is not bound and cannot allocate enough memory for acknowledgement.  An acknowledgement message of type dl_ok_ack_t is generated when the stream has been unbound. 

DL_ENABMULTI_REQ is a request to enable a multicast address on a per-stream basis.  An individual stream may have a maximum of sixty-four multicast addresses in its table, subject to the following limitation.  There may be no more than sixty-four unique addresses for all streams associated with each controller.  An acknowledgement message of type dl_ok_ack_t is generated if the request is valid.  A message of type dl_error_ack_t is generated with dl_primitive set to DL_BADADDR if the multicast address is invalid or dl_primitive set to DL_TOOMANY if there is no space left in the controller’s multicast table. 

DL_DISABMULTI_REQ is a request to disable a multicast address on a per-stream basis.  The driver will not accept frames with this multicast address even if e1x7multi_all is enabled and the LANC is accepting multicast addresses.  An acknowledgement message of type dl_ok_ack_t is generated if the request is valid.  A message of type dl_error_ack_t is generated with dl_primitive set to DL_BADADDR if the multicast address is invalid or dl_primitive set to DL_NOTENAB if the requested address is not currently enabled. 

M_IOCTL
ioctl commands are received in messages of type iocblk.  Command data, as specified in each command description, must be stored in a connected message block of type M_DATA.  Data passed back upstream is always contained in an M_DATA block.  All of the ioctl #defines used can be found in the file include/sys/macioctl.h. 

A description of user ioctl stream messages can be found under the I_STR command in streamio(7).  A sample code extract can be found in the STREAMS Mechanism chapter of the Programmer’s Guide: STREAMS. 

MACIOC_DUMPSTATS is a request to display the driver software and hardware statistics to the system console.  This command does not require an M_DATA block.  Since this command uses printf to display the statistics to the screen, it is rather time consuming and will affect system performance.  This command should be used as a debugging tool.  Users should examine the MACIOC_GETSTATS command (described later) as a better alternative for acquiring driver statistics.  Upon receiving the MACIOC_DUMPSTATS command, the driver will display a message showing its controller number and its Ethernet address.  The driver will then display all of the software and hardware statistics gathered since driver init time.  All statistics are kept as unsigned long values.  Note that although the driver keeps track of MIB-II stats (as detailed in the file include/net/if.h), the software statistics shown are a proprietary set.  The following tables list the statistics dumped to the console and a definition for each stat:

SOFTWARE STATISTICS
Name Description
tx_pkts_in Number of packets sent to the driver for transmit. 
tx_err_state Number of tx_pkts_in dropped because the transmit packet’s stream is not in the bound (IDLE) state. 
tx_err_len Number of tx_pkts_in dropped due to an invalid message length in the DL_UNITDATA_REQ primitive. 
tx_err_addr Number of tx_pkts_in dropped due to an invalid destination DLSAP address length in the DL_UNITDATA_REQ primitive. 
tx_errors Total number of tx_pkts_in dropped due to errors, i.e., the sum of all the tx_err_ values. 
tx_discard_str Number of tx_pkts_in discarded due to lack of STREAMS buffers. 
tx_discard_drop Number of tx_pkts_in discarded bacause the e1x7txqu_drop flag is enabled (see Master.d Parameters). 
tx_queue_bak Number of tx_pkts_in placed on write queue because a write queue already exists, i.e., there is a backup, or because the e1x7txqu_quall flag is enabled (see Master.d Parameters). 
tx_queue_down Number of tx_pkts_in placed on write queue because the LANC was down. 
tx_queue_cmd Number of tx_pkts_in placed on write queue because of a lack of LANC command blocks. 
tx_queue_tbd Number of tx_pkts_in placed on write queue because of a lack of LANC transmit buffer descriptors. 
tx_queue_odd Number of tx_pkts_in placed on write queue because buffer is on an odd boundary and we could not msgpullup due to a lack of STREAMS buffers. 
tx_queued Total number of tx_pkts_in placed on the write queue, i.e., the sum of all the tx_queue_ values. 
tx_pkts_out Number of tx_pkts_in sent to the LANC for transmit.  This is the number of tx_pkts_in minus the total dropped and discarded packets.  A tx_pkts_in packet that becomes queued is counted under tx_pkts_out only when it is removed from the queue and sent for transmit. 
tx_mcast Number of tx_pkts_out w/ a multicast destination. 
tx_bcast Number of tx_pkts_out w/ a broadcast destination. 
SOFTWARE STATISTICS (cont.)
Name Description
rx_pkts_in Number of packets received from the LANC by the driver (doesn’t include those w/ hardware errors).  Also includes any tx_pkts_in that were looped back to the receive-side stream, e.g., broadcast packets. 
rx_err_len Number of rx_pkts_in dropped due to an invalid length packet. 
rx_discard_proto Number of rx_pkts_in discarded due to an unknown (or unbound) protocol in the Ethernet header type field. 
rx_discard_str Number of rx_pkts_in discarded due to lack of STREAMS buffers. 
rx_discard_flow Number of rx_pkts_in discarded due to STREAMS flow control on rsrv queue. 
rx_discard_multi Number of rx_pkts_in discarded because multicast destination is not this station. 
rx_discards Total number of rx_pkts_in discarded, i.e., the sum of all the rx_discard_ values. 
rx_pkts_out Number of rx_pkts_in w/o errors or discards that the driver sent up to a consumer. 
rx_mcast Number of rx_pkts_out w/ a multicast destination. 
rx_bcast Number of rx_pkts_out w/ a broadcast destination. 
HARDWARE STATISTICS
Name Description
scbintr Number of interrupts handled by the driver. 
badintr Number of scbintr that were either for a non-existent controller or were spurious. 
scbcx Number of scbintr with Command Xmit bit set in the SCB, i.e., the I bit was set in the corresponding command block. 
scbfr Number of scbintr with Receive Frame bit set in the SCB. 
scbcna Number of scbintr with Command unit Not Active bit set in the SCB. 
scbrnr Number of scbintr with Receive unit Not Ready bit set in the SCB. 
txpkts Number of packets LANC attempted to transmit. 
rxpkts Number of packets LANC received (includes those w/ hardware errors). 
txerrs Number of txpkts that failed due to a hardware error (either cmdrtry, cmduflo, cmdlcol, cmdlcar, or cmdlts). 
rxerrs Number of rxpkts that failed due to a hardware error (either rfdfram, rfdoflo, rfdcrc, rfdbuff, rfdrcol, or rfdshrt). 
cmdhbeat Number of txpkts where the collision test circuitry did not detect a CDT (heartbeat) signal from the transceiver.  cmdhbeat is not an error, and is not counted under txerrs. 
cmddef Number of txpkts where the LANC had to defer an attempt to transmit that packet.  cmddef is not an error, and is not counted under txerrs. 
cmdone Number of txpkts where exactly one collision was detected for that packet.  cmdone is not an error, and is not counted under txerrs. 
cmdmore Number of txpkts where more than one collision was detected for that packet.  cmdmore is not an error, and is not counted under txerrs. 
cmdrtry Number of txerrs where the LANC attempted to transmit the packet 16 times due to repeated collisions and finally aborted the transmit. 
HARDWARE STATISTICS (cont.)
Name Description
cmduflo Number of txerrs where the LANC underflowed, i.e., there was DMA underrun when the LANC tried to read a buffer from memory. 
cmdlcol Number of txerrs where the collision detection circuitry detected a late collision. 
cmdlcar Number of txerrs where the LANC detected loss of carrier sense. 
cmdlcts Number of txerrs where the LANC detected loss of clear to send. 
totcol Total number of collisions detected by the LANC. 
tdrlaunch Number of TDR commands launched from the driver. 
tdrprob Number of tdrlaunch attempts that discovered a problem. 
rfdfram Number of rxerrs where the received frame was misaligned, i.e., contained a non-integral number of octets, and there was a CRC error. 
rfdoflo Number of rxerrs where the LANC overflowed, i.e., there was a DMA overrun when the LANC attempted to write to a buffer in memory. 
rfdcrc Number of rxerrs where the received frame was aligned, but there was a CRC error. 
rfdbuff Number of rxerrs where a good (i.e., error free) frame could not be received because of a lack of resources (FDBs or RBDs). 
rfdrcol Number of rxerrs caused by collision detection during frame reception. 
rfdshrt Number of rxerrs where the frame was a short frame. 
nofrds Number of times LANC Receive Unit went to the Not Ready state due to lack of RFDs. 
norbds Number of times LANC Receive Unit went to the Not Ready state due to lack of RBDs. 
devto Number of times driver timed out while waiting for LANC to accept command. 
pcc2lto Number of local bus time outs seen by the PCCchip2. 
pcc2vmeto Number of VME bus time outs seen by the PCCchip2. 
pcc2perr Number of memory parity errors seen by the PCCchip2. 

MACIOC_GETSTATS is a request to have the driver return one or more statistics to the caller in an M_DATA block.  The command requires the caller to send an M_DATA block containing an array of maciocstat structures.  The structure (as defined in sys/macioctl.h) is shown below:


        struct maciocstat
        {
                unsigned int code;
                unsigned int value;
        }

The user must place a statistic’s code in the code field for each maciocstat structure in the array.  The driver will place the respective value for that statistic in the value field.  It will then return the filled-in structures back to the caller in the same format received. The codes supported by the driver are shown below.  The code name field is the name of the #define used in the sys/e1x7.h file.  The code value is the numerical value associated with the code name.  Examine the sys/macioctl.h file for a discussion on the format of the code value.  All but the last two code names relate directly to the statistic names shown under the MACIOC_DUMPSTATS description.  Look at that ioctl description for a discussion of all the statistic’s meanings.  The last two codes are described here.  MACIOCSTAT_EADDRHI and MACIOCSTAT_EADDRLO will return the upper 4 bytes of the controller’s Ethernet Address and the lower 2 bytes of the controller’s Ethernet Address, respectively. 

MACIOC_GETSTATS CODES
Code Name Code Value Code Name Code Value
MACIOCSTAT_TXPKTSIN 0x0 MACIOCSTAT_TXERRSTATE 0x1
MACIOCSTAT_TXERRLEN 0x2 MACIOCSTAT_TXERRADDR 0x3
MACIOCSTAT_TXERRORS 0x4 MACIOCSTAT_TXDISCSTR 0x5
MACIOCSTAT_TXDISCDROP 0x6 MACIOCSTAT_TXQUEBAK 0x7
MACIOCSTAT_TXQUEDOWN 0x8 MACIOCSTAT_TXQUECMD 0x9
MACIOCSTAT_TXQUETBD 0xa MACIOCSTAT_TXQUEODD 0xb
MACIOCSTAT_TXQUEUED 0xc MACIOCSTAT_TXPKTSOUT 0xd
MACIOCSTAT_TXMCAST 0xe MACIOCSTAT_TXBCAST 0xf
MACIOCSTAT_RXPKTSIN 0x10 MACIOCSTAT_RXERRLEN 0x11
MACIOCSTAT_RXDISCPROTO 0x12 MACIOCSTAT_RXDISCSTR 0x13
MACIOCSTAT_RXDISCFLOW 0x14 MACIOCSTAT_RXDISCMULTI 0x15
MACIOCSTAT_RXDISCARDS 0x16 MACIOCSTAT_RXPKTSOUT 0x17
MACIOCSTAT_RXMCAST 0x18 MACIOCSTAT_RXBCAST 0x19
MACIOCSTAT_SCBINTR 0x1a MACIOCSTAT_BADINTR 0x1b
MACIOCSTAT_SCBCX 0x1c MACIOCSTAT_SCBFR 0x1d
MACIOCSTAT_SCBCNA 0x1e MACIOCSTAT_SCBRNR 0x1f
MACIOCSTAT_TXPKTS 0x20 MACIOCSTAT_RXPKTS 0x21
MACIOCSTAT_TXERRS 0x22 MACIOCSTAT_RXERRS 0x23
MACIOCSTAT_CMDHBEAT 0x24 MACIOCSTAT_CMDDEF 0x25
MACIOCSTAT_CMDONE 0x26 MACIOCSTAT_CMDMORE 0x27
MACIOCSTAT_CMDRTRY 0x28 MACIOCSTAT_CMDUFLO 0x29
MACIOCSTAT_CMDLCOL 0x2a MACIOCSTAT_CMDLCAR 0x2b
MACIOCSTAT_CMDLCTS 0x2c MACIOCSTAT_TOTCOL 0x2d
MACIOCSTAT_TDRLAUNCH 0x2e MACIOCSTAT_TDRPROB 0x2f
MACIOCSTAT_RFDFRAM 0x30 MACIOCSTAT_RFDOFLO 0x31
MACIOCSTAT_RFDCRC 0x32 MACIOCSTAT_RFDBUFF 0x33
MACIOCSTAT_RFDRCOL 0x34 MACIOCSTAT_RFDSHRT 0x35
MACIOCSTAT_NORFDS 0x36 MACIOCSTAT_NORBDS 0x37
MACIOCSTAT_DEVTO 0x38 MACIOCSTAT_PCC2LTO 0x39
MACIOCSTAT_PCC2VMETO 0x3a MACIOCSTAT_PCC2PERR 0x3b
MACIOCSTAT_EADDRHI 0x1003c MACIOCSTAT_EADDRLO 0x1003d

MACDEBUG is a request to set the driver debug level to a new value.  The debug level regulates printing of debug messages to the system console.  Upon driver initialization, the debug level is set to 0, which means no debug messages are sent to the console.  Level 1 displays very high level information only.  Level 2 shows more detail, and level 3 displays the most detail.  Note that since the messages are displayed via printf, level 3 debugging can create long delays during print time, thus greatly affecting system performance.  This command requires an M_DATA block containing an int value representing the new debug level. 

MACDELAMCA is a request to delete all multicast table entries on the controller associated with this stream.  This command does not require an M_DATA block.  The driver will not accept any multicast frames even if e1x7multi_all is enabled and the LANC is accepting multicast addresses. 

MACDELMCA is a request to delete one multicast address from a multicast table on a per-stream basis.  This command requires an M_DATA block of type mc_frame.  The driver will not accept frames with this multicast address even if e1x7multi_all is enabled and the LANC is accepting multicast addresses. 

MACGETIA is a type of request to return the Ethernet address of the LANC controller associated with the current queue.  This command does not require an M_DATA block. 

MACGETMCA is a request to return the entire multicast table for the controller associated with the current queue.  This command does not require an M_DATA block. 

MACGETSTAT is a request to return a statistic the driver has been gathering.  A returned value of −1 indicates the statistic was not available.  This command requires an M_DATA block.  The data block is an array of structures.  Each structure has the following format (see macioctl.h):


        struct macstat
        {
                long name;
                long value;
        }

A table of number defines and their descriptions follows:

MACGETSTAT
Name Description
MACSTAT_DEV_TIMEOUTS total number of device timeouts
MACSTAT_XMITED number of successful transmits
MACSTAT_XMITED_DEF number of deferred transmits
MACSTAT_XMITED_1COLL number of transmits with >=1 collision
MACSTAT_COLLISIONS total number of collisions
MACSTAT_NOXMIT_BUFF total number dropped frames because of no STREAM buffer
MACSTAT_NOXMIT_COLL number of frames dropped due to excess collisions
MACSTAT_RECVD number of frames successfully received
MACSTAT_RECVD_CKSUM number of CRC errors
MACSTAT_RECVD_ALIGN number of frames with alignment errors
MACSTAT_NORECV_RES number of frames dropped because of resource lack
MACSTAT_NORECV_LENGTH number of frames dropped because of bad length
MACSTAT_RECVD_MCAST number of multicast frames received
MACSTAT_XMITED_MCAST number of multicast frames transmitted
MACSTAT_NORECV_MCAST number of multicast frames rejected
MACSTAT_NORECV_TYPE number of frames dropped because of unbound type
MACSTAT_NOXMIT_CARRIER number of times lost carrier
MACSTAT_NOXMIT_CTS number of times lost CTS
MACSTAT_DMA_ERRORS number of DMA errors
MACSTAT_RECVD_BCAST number broadcast frames received
MACSTAT_OUT_OF_WINDOW number of late collisions
MACSTAT_XMITED_BCAST number of broadcast frames transmitted

MACSETIA is a request to set the Ethernet address for the LANC controller associated with the current stream.  After executing MACSETIA, the networking subsystem must be stopped and then restarted.  The address is immediately changed in the LANC and the non-volatile RAM on the cpu board. 

MACSETMCA is a request to add one multicast address to a multicast table on a per-stream basis.  This command requires an M_DATA block of type mc_frame.  A multicast address must have the least significant bit of byte[0] of the Ethernet address set.  An individual stream may have a maximum of sixty-four multicast addresses in its table, subject to the following limitation.  There may be no more than sixty-four addresses for all streams associated with each controller. 

SIOCGENADDR is a type of request to return the Ethernet address of the LANC controller associated with the current queue.  This command requires an M_DATA block of type struct ifreq. 

M_FLUSH
If the command is a read queue flush, the read queue of the driver is flushed and the message is passed back up stream.  If the command is a write queue flush, the write queue of the driver is flushed.

Master.d Parameters

The driver’s master.d file is partitioned into two sections.  Section 1 declares data structure names to be accessed by the driver software, their type, and their initial value.  Section 2 contains the parameter declarations used in section 1 for setting data structure values.  Most data structures are defined as arrays, where the length of the array is determined by the number of LANC controllers in the Equipped Device Table.  The following table lists the section 1 parameters, their default section 2 declaration and value, and their description.  Some data structures mention that certain settings of a data structure may cause networking lock-up due to a LANC bug.  These settings can cause errors when the A-1 step of the LANC chip is used.  The B step of the LANC chip, when released, will correct these errors. 

Master.d Parameters
Parameter Default Description
e1x7buf_type STREAM (1) Use local or STREAM buffer control flag.  This parameter is only checked on cpu boards which can snoop the bus, for example, the 167 and the 197.  The 187 does not snoop the bus so this parameter’s setting for the 187 is not used.  The driver running on the 187 only allocates local buffers.  The other setting is LOCAL (0). 
e1x7rcv_nmrfd RFDS_DEFAULT (16) Number of receive frames that can be processed by the LANC before requiring more cpu resources.  The minimum number of receive frame descriptors is four.  The larger the value the more system resources may be consumed.
e1x7rcv_szbuff RBUFSZ_DEFAULT (1514) The size of a receive buffer in bytes.  Receive buffers can be chained together by the LANC if a frame larger than a receive buffer is being processed.  The minimum size for a receive buffer is 60 bytes; the maximum is 1514 bytes.  Receive buffer size must be even. The larger the value the more system resources are consumed.
e1x7rcv_nmbfdes RBUFDES_DEFAULT (17) The number of receive buffers allocated.  The minimum number allowed is four.  However, due to a bug in the LANC chip, software must ensure that receive frame descriptors always run out before all of the receive buffers are used. This means the value for the number of receive buffers must be > (number of receive frames ∗ 1514)/receive buffer size.  The larger the value the more system resources are consumed. 
e1x7tx_nmcbl NMTXCBL_DEFAULT (16) The number of transmit frames that can be handled by the LANC.  The minimum number allowed is four.  The larger the value the more system resources are consumed.
Master.d Parameters  (cont.)
Parameter Default Description
e1x7tx_szbuff TXBUFSIZ_DEFAULT (1514) The size of a local (not stream) transmit buffer in bytes.  The minimum buffer size is 60; the maximum is 1514.  However, due to a LANC bug, the size should be kept at the maximum. If more than one buffer is used per transmit frame, networking may at some point lock-up.  This would probably not occur in single-segment networks but networks with repeaters may see this error. 
e1x7tx_nmbfdes TXBUFDES_DEFAULT (20) The number of transmit buffer descriptors.  Transmit command blocks point to transmit buffer descriptors which then point to transmit buffers.  With the default setting for e1x7tx_szbuff, each transmit descriptor is associated with one complete frame. 
e1x7rcv_fifo FIFO_DEFAULT (5) This is an index into a table of LANC receive and transmit FIFO threshold values.  The LANC has independent 128 byte receive and 64 byte transmit FIFOs.  The value 8 indicates a transmit threshold of 32 bytes and a receive threshold of 64 bytes.  The table is listed below:               Value  Tx   Rx                   0      0    128
                  1      4    120
                  2      8    112
                  3     12   104
                  4     16     96
                  5     20     88
                  6     24     80
                  7     28     72
                  8     32     64
                  9     36     56
                 10     40    48
                 11     44    40
                 12     48    32
                 13     52    24
                 14     56    16
                 15     60     8
Master.d Parameters  (cont.)
Parameter Default Description
e1x7bus_ton ON_BUS_THROTL (15) On bus throttle timer in microseconds.  This is the maximum amount of time the LANC can keep the local bus before releasing it.  The maximum value allowed is 30; the minimum is one.
e1x7bus_tof OFF_BUS_THROTL (1) Off bus throttle timer in microseconds.  This is the minimum amount of time the LANC must stay off the local bus after releasing it.  The maximum value allowed is 50; the minimum is one.
e1x7dbug_lvl DEBUG_LEVEL (0) Debug level for debugging prints to the system console.  LEVEL 0 indicates debugging is off.  The maximum level is three.  Each higher level will print more detailed debug information. 
e1x7adpt_szing RESERVED Reserved, must not be changed. 
e1x7adpt_pkwind RESERVED Reserved, must not be changed. 
e1x7tdr TDR_ENABLED (1) Time Domain Reflectometry control flag.  The LANC chip can help determine where and what kind of problems are in the network cabling.  If this flag is enabled and if the software thinks that there may be a cable problem, a command will be launched to try and determine where and what the problem is.  If a problem is found, a warning message is printed on the system console.  If this flag is disabled, TDR_DISABLED (0), then no problem checking commands will be launched. 
e1x7savbadframe SVBD_DISABLED (0) Control flag to tell the LANC whether to pass bad frames it receives to the driver or throw them away.  Even though they are thrown away, the LANC keeps statistics on bad frames. The default state is to throw away bad frames.  Bad frames can be saved by setting this value to SVBD_ENABLED (1).  However, due to a LANC bug, the SVBD_ENABLED setting may cause a networking lockup.
Master.d Parameters  (cont.)
Parameter Default Description
e1x7loopback OFF_LOOPBACK (0) Control flag for LANC loopback modes.  This flag must only be changed for hardware debug purposes.  An Intel 82596 User’s Manual is required.  Other values are INT_LOOPBACK (1), NOLPBK_LOOPBACK (2), WLPBK_LOOPBACK (3). 
e1x7promiscuous PROM_DISABLED (0) Control flag for enabling/disabling the LANC promiscuous mode.  Enabling the mode means the LANC accepts all packets transmitted on the network.  Disabling the mode means the LANC accepts only broadcast, multicast, and specific packets meant for it.  It is up to software layers above the driver to set up service access points to accept all packet types when the mode is PROM_ENABLED (1).  This parameter can override the setting of e1x7broadcast. 
e1x7broadcast ENAB_BROADCAST (0) Control flag to enable/disable receipt of broadcast packets.  The default is to receive all broadcast packets.  DISAB_BROADCAST (1) is the other option. 
e1x7car_filtwid CARFILTWID_DEFAULT (0) The width required of the Carrier Sense signal, in bit times, before it is recognized as being active.  The maximum value is 7.  Changes to this value may be useful in noisy cable environments.
e1x7car_source EXT_CARSOURCE (0) Control flag to specify internal/external generation of Carrier Sense.  In external mode, Carrier Sense is fed through the CRS pin.  In internal mode INT_CARSOURCE(1), presence of the receive clock is interpreted as Carrier Sense Active. 
e1x7col_filtwid COLFILTWID_DEFAULT (0) Specifies the width required of CDT, in bit times, for the LANC to recognize that a collision has occurred.  The maximum value allowed is 7.
Master.d Parameters  (cont.)
Parameter Default Description
e1x7col_source EXT_COLSOURCE (0) Specifies external/internal collision detect source.  External collision detect is fed through the CDT pin.  Internal detects the presence of carrier sense during transmission or the presence of the receive clock during transmission as a collision.
e1x7multi_all DIS_MULTIALL (1) Control flag to enable/disable the LANC from receiving all frames that have a multicast address in the destination address field.  The default is disabled.  The other option is EN_MULTIALL (0). 
e1x7txqu_quall DIS_QUALL (0) Control flag to enable/disable queuing of all transmit packets for the driver’s write service routine.  This flag is for software testing only. The default setting is disabled.  The other option is EN_QUALL (1). 
e1x7txqu_drop DIS_DROPALL (0) Control flag to disable/enable dropping of all transmit packets in the driver’s put routine, i.e., no data is sent out on the cable.  This flag is for protocol stack testing only. The default setting is disabled.  The other option is EN_DROPALL (1). 
e1x7tx_lngchk DIS_LENGCHK (1) Control flag to disable/enable receive frame length checking and transmit frame padding on the LANC chip.  This cannot be used for Ethernet software/hardware networks.  It can only be used for IEEE802.3 compliant software and hardware networks.  Also, due to a LANC bug, setting the flag to EN_LENGCHK may cause a networking lockup.

Debug Aids

The driver calls the STREAMS logger kernel routine, strlog.  These messages are mostly error messages. A few are only informational.  The trace messages are seen with the strace(1M) command.  Additional trace messages can be seen when the driver is compiled with #define E1X7_DEBUG. 

The module ID for this driver is hexadecimal e17 or 0xe17 or 3607 decimal.  There are four sub-IDs and three tracing priority levels.  Priority levels are 1-3; level 3 gives the most detail. 

Sub-ID Description
3 Interrupt Level Trace
2 Stream Level Trace
1 Initialization Trace
0 Generic Code Trace

Also, as discussed earlier in the Master.d Parameters section, e1x7dbug_lvl can be set to print information to the system console.  Note that a level 1 setting will cause statistics to be printed when all minor devices associated with a controller are closed. 

Also, when the driver has been compiled with #define E1X7_DEBUG, a debugging subroutine can be called from within KDB, the kernel debugger.  The subroutine’s name is e1x7debugger. 

Note that when the driver is compiled with #define DEBUG, E1X7_DEBUG is automatically defined. 

FILES

/dev/e1x7_∗
/usr/include/sys/dlpi.h
/usr/include/sys/e1x7.h
/usr/include/sys/macioctl.h

SEE ALSO

ifconfig(1M), mvmecpu(1M), slink(1M), strace(1M), edt_data(4), master(4), strcf(4N), arp(7), clone(7), intro(7), ip(7), streamio(7). 
Programmer’s Guide: STREAMS
McGrath, G., A STREAMS-based Data Link Provider Interface (DLPI), Version 1.3, AT&T Bell Laboratories, Summit, N.J., February 1989
LT-610 Programmer Guide, Retix, Santa Monica, CA, July 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026