Texas Instruments TNETE211 Network Card User Manual


 
GO Command
6-7
Transmitting and Receiving Frames
8) Gives the TX GO command by writing the address of the first available list
to the CH_PARM register
9) Writes a 1 to the GO bit of the HOST_CMD register, with the transmit chan-
nel selected
This assumes the transmit interrupt threshold has been initialized. If not, write
to HOST_CMD with the Ld_Thr bit set and the threshold value in the
Ack_Count field.
For frame transmission, the driver first allocates memory for the transmit lists
and buffers and octet (byte) aligns the transmit lists. Next, the driver links the
list by having the forward pointer point to next available list. The forward pointer
must be 0 in the last list used. Next, the driver initialize the CSTAT fields in the
lists.
After this system of linked lists is created, the driver writes the address of the
first list to the CH_PARM register. This tells ThunderLAN where the first linked
list is. After this, a Tx GO command is given. ThunderLAN initiates the DMA
of data into its internal FIFO and then ThunderLAN transfers at least 64-bytes,
or the value given in the Acommit register, into its internal FIFO before starting
frame transmission.
When ThunderLAN finishes transferring data into its internal FIFO, it sets the
Frm_Cmp bit in the CSTAT field. (ThunderLAN sets the bit when the frame is
transmitted to the FIFO, not when network transmission is complete). The driv-
er looks into the Frm_Cmp bit to verify frame transfer. Depending on the value
loaded into the Ld_Thr bit in HOST_CMD, a Tx EOF interrupt is given to the
host. The driver then needs to acknowledge the number of frames it has sent
to ThunderLAN. This is important, as ThunderLAN and the driver have to
agree on the number of frames sent. If there is a discrepancy, and the host ac-
knowledges more frames than ThunderLAN has sent, ThunderLAN assumes
that a serious hardware error has occurred and an adapter check 06h AckErr
will follow.
When the driver determines the Frm_Cmp bit is set, it frees up the list and buff-
er for the next transmit list. When the driver wishes to transmit a frame, it sets
up the Tx list to point to the buffer that holds the frame. It writes a forward point-
er of 0 to make this the last list in the chain. Finally, the previous list’s forward
pointer must be changed to write to the beginning of this list. ThunderLAN then
transmits this frame as it goes down the linked lists. There are situations when
ThunderLAN has completed transmitting the previous list and has seen the 0
forward pointer, in which case it closes the Tx channel and gives a Tx EOC
interrupt. The driver then acknowledges the EOC and resumes transmitting by
issuing another Tx GO command.