Technical information

8-23
Sample Driver
Required Fields:
RxCompletionQ1ConsumerIndex = 0: Initialize the Receive Completion
Descriptor Queue 1 consumer index to zero. Note: this entry is also covered in the
Receive Initialization section.
TxCompletionConsumerIndex = 0: Initialize the Transmit Completion Descriptor
Queue consumer index to zero.
11
C
OMPLETION
Q
UEUE
1P
RODUCER
I
NDEX
(offset C8h): This register contains both the
Receive and Transmit Completion Descriptor Queue producer indices.
Required Fields:
RxCompletionQ1ProducerIndex = 0: Initialize the Receive Completion Descriptor
Queue 1 producer index to zero. Note: this entry is also covered in the Receive
Initialization section.
TxCompletionProducerIndex = 0: Initialize the Transmit Completion Descriptor
Queue producer index to zero.
12
R
X
C
OMPLETION
Q2P
TRS
(offset CCh): This register is used only if two receive
completion queues are implemented. In this case, RxCompletionQ2ConsumerIndex
should be initialized to zero.
Example:
// Windows NT driver example
// Single Transmit Completion and Buffer Descriptor Queues
// Type 1 32 bit buffer descriptors with an 8-byte skip field
// First, setup all fields in the descriptor control register
// This includes the descriptor type, minimum spacing, and skip length
TxDescQCtrlValue.TxDescType = 1;
// basic 32 bit buffer descriptor
TxDescQCtrlValue.DisableTxCompletion = 0;
// do not disable TX interrupts
TxDescQCtrlValue.MinFrameDescSpacing = 0;
// no restrictions
TxDescQCtrlValue.TxDescQ64bitAddr = 0;
// using 32 bit descriptors
TxDescQCtrlValue.TxDmaBurstSize =
Adapter->TxDmaBurstSize;
// from registry
TxDescQCtrlValue.SkipLength = 1;
// 8 byte skip field length
TxDescQCtrlValue.TxHighPriorityFifoThreshold =
Adapter->TxHighPriorityFifoThreshold;
// from registry
AIC6915_WRITE_REG(TxDescQCtrl, TxDescQCtrlValue);
// We're using a single buffer descriptor queue
// Use the low priority queue (could use either one)