8-20
AIC-6915 Ethernet LAN Controller Programmer’s Manual
To convert the hardware Transmit Producer or Consumer index to a software index,
multiply the hardware index by 8, and then divide by the calculated size of the descriptor.
Refer to the Transmit DMA Buffer Descriptor Queue section in the Transmit Architecture
chapter for a description of all fields in this descriptor type.
Two Transmit Queues
Only one Transmit Completion Descriptor Queue is available. Two Transmit Buffer
Descriptor Queues are available, and are referred to as the low and high priority queues.
Since the software is the producer of Transmit Buffer Descriptors, it is the responsibility of
the driver to determine the priority of a given Transmit Buffer and to place it in the
appropriate queue.
If only one Transmit Buffer Descriptor Queue is needed, either the low or high priority
queue may be used, as defined in the driver. When the transmit resource is returned to the
driver, the queue is indicated in the Priority bit in the Completion Descriptor.
Transmit Producer-Consumer Model
The AIC-6915 uses a producer-consumer model to manage transmit resources. The driver
is the producer of transmit packets, so the Transmit Buffer Descriptor producer index
must be maintained by software. The hardware is the consumer of transmit buffers, and is
responsible for maintaining the Transmit Buffer Descriptor consumer index. The
AIC-6915 generates a Transmit Done or Transmit DMA interrupt and provides
information in the Transmit Completion Descriptor Queue about the packet just
transmitted. Therefore, the AIC-6915 is the producer of Transmit Completion Descriptors,
and software is the consumer.
When a descriptor has been filled with the transmit data, a new Transmit Producer Index
(TxDescQueueProducerIndex, offset A0h) is written to inform the AIC-6915 to initiate the
transmit process. The value written to this register is in multiples of the number of 8-byte
blocks in the Transmit Buffer Descriptor. Therefore, the value of the Producer Index
depends upon the size of the Transmit Buffer Descriptor. For example, if a Type 1
descriptor is specified with no skip field, each new transmit would cause the Transmit
Producer Index to be incremented by 1 since the total descriptor size is 8 bytes. For a Type
0 descriptor with no skip field, the Transmit Producer Index is incremented by
(NumberOfFragments + 1) for each packet. This is because each fragment uses eight bytes
in the descriptor, and 8 additional bytes at the start of the descriptor contain the number of
fragments and other information. A macro is the simplest way to implement this index
calculation in the driver. Refer to the Transmit Buffer Descriptor Queue section above,
and to the DDK for an example.
The polling model is not available for transmit operation.