8/01/00 Am79C976 65
PRELIMINARY
By default, whenev er the DMA controller finishes copy-
ing a transmit frame from system memory, it sets the
TINT bit of CSR0 to indicate that the buffers are no
longer needed. This causes an interrupt signal if the
IENA bit of CSR0 has been set and the TINTM bit of
CSR3 is cleared.
The Am79C976 controller provides two modes to re-
duce the numb er of transmit interr upts. If the conte nts
of the Del ayed Interr upt Re gister is no t zero, the inter -
rupt to the CPU will be postponed until a programmable
number of interrupt events have occurred or a program-
mable amount of time has elapsed since the first inter-
rupt event occurred. Another mode, which is enabled
by setting LTINTEN (CSR5, bit 14) to 1, allows sup-
pression of interrupts for transmissions of all but the
last frame in a sequence.
5HFHLYH3ROOLQJ
If the Am79C976 controller does not own both the cur-
rent and the next receive descriptor, then the
Am79C9 76 contr oll er will con tinue to p oll acco rding to
the po lling s equenc e de scr ib ed in the Tra nsm it Poll ing
section. If the receive descriptor ring length is one, then
there is no next descriptor to be polled.
If a poll operation has rev ealed that the current and the
next receive descriptors belong to the Am79C976 con-
troller, then additional poll accesses are not necessary.
Future p oll operations will not incl ude receive descr ip-
tor accesses as long as the Am79C976 controller re-
tains ownership of the current and the next receive
descriptors.
When receive activity is present on the channel, the
Am79C976 controller waits until the number of bytes
specified in the RCV_PROTECT register (default 64)
have been received. If the frame is accepted based on
all active addressing schemes at that time, the DMU is
notified that a frame has been received.
As receive buffers become available in system mem-
ory , the DMA controller will copy frame data from the re-
ceive FIFO into system memory. The Am79C976
control le r w ill s et t he S TP bit in the fir st des c riptor of a
frame. If the frame length exceeds the length of the cur-
rent buffer, the Am79C976 controller will pass owner-
ship ba ck to the system by wri ting 0s to the OWN an d
ENP bits of the descriptor when the first buffer is full.
This activity continues until the Am79C976 controller
recognizes the completion of the frame (the last byte of
this receive message has been removed from the
FIFO). The Am79C976 controller will subsequently up-
date the cur rent receive descr iptor with the frame sta-
tus (message byte count, VLAN info, frame tag, error
flags, etc.) and will set the ENP bit to 1. The Am79C976
control ler will then advance the inter nal ring pointer t o
make the next receive descriptor the new current re-
ceive descriptor .
When the Am79C976 controller has receiv e data in the
FIFO ready to write to system memory, either at the be-
ginning of a new frame or in the middle of a frame that
does not fit in t he previous buffer, and it does n ot own
the current receive descriptor , it will immediately poll it.
If the OWN bit is stil l zer o, polling of this d es cr i pto r will
continue at a rate determined by the contents of the
CHPOLLINT register (CSR49). P olling will occur imme-
diately if the RDMD bit is set.
If the driver does not provide the Am79C976 controll er
with a descri ptor in a timely fashion, th e receive FIFO
will ev entually overflow. Subsequent frames will be dis-
carded and the RcvMissPkts MIB counter will be incre-
mented. Norma l recei ve operation will resu me when a
descr iptor is p rovided to the A m7 9C97 6 c on tro ll er an d
suffici ent data h as been DMA’ed from the Am79C976
controller’s receive FIFO into the system memory.
When the receive FIFO is empty and the Am79C976
device does not own two descriptors (current and next),
the R eceive Desc r iptor R ing is p olled at an interval by
the contents of the TXPOLLINT register (CSR47).
When the Am79C976 device owns two descriptors, the
Receive Descriptor Ring is not polled at all.
/RRN$KHDG3DFNHW3URFHVVLQJ
Setting LAPPEN (CMD2, bit 2 or CSR3, bit 5) to a 1
modifies the way the controller processes receive de-
scriptors. The Am79C976 controller will use the STP
informati on to deter mine where it should beg in writin g
a receive packet’s data. Note that while in this mode,
the Am79C976 controller can write intermediate packet
data to buffers whose descriptors do not contain STP
bits set to 1. Following the write to the last descriptor
used by a packet, the Am79C976 controller will scan
through the next descriptor entries to locate the next
STP bit that is set to a 1. The Am79C976 controller will
begin writing the next packet’s data to the buffer
pointed to by that descriptor.
Note that because several descriptors may be allo-
cated by the host for each pack et and not all messages
may need all of the descriptors that are allocated be-
tween descriptors containing STP = 1, then some de-
scriptors/buffers may be skipped in the ring. While
performing the search for the next STP bit that is set to
1, the Am79C976 controller will advance through the
receive descr iptor ring regardless of the stat e of own-
ership bits. If any of the entries that are examined dur-
ing this search indicate Am79C976 controller
ownership of th e descript or but a lso indicate STP = 0,
then the Am79C976 controller will reset the O WN bit to
0 in these entries. If a scanned entry indicates host
ownership with STP = 0, then the Am79C976 controller
will not alter the entry , but will advance to the next entry.
When the STP bit is f ound to be true, b ut the descriptor
that contains this setting is not owned by the
Am79C976 controller, then the Am79C976 controller