Technical information

8-24
AIC-6915 Ethernet LAN Controller Programmer’s Manual
// Set up the low 32 bits of the low priority transmit descriptor queue
// base address
LoPrTxDescQBaseAddrValue =
NdisGetPhysicalAddressLow(Adapter->TxDescRing.AlignedPa);
AIC6915_WRITE_REG(LoPrTxDescQBaseAddr, LoPrTxDescQBaseAddrValue);
// Set up the high 32 bits of address - it's 0 since we're not using
// 64 bit addresses
AIC6915_WRITE_REG(TxDescQHighAddr, 0);
// Set the upper 32 bits of address of all the completion queues
AIC6915_WRITE_REG(CompletionQHighAddr, 0);
// Initialize the Producer and Consumer indices
AIC6915_WRITE_REG(TxDescQueueProducerIndex, 0);
AIC6915_WRITE_REG(TxDescQueueConsumerIndex, 0);
// Get interrupt on transmit complete, not DMA complete.
TxFrameCtrlValue = 0;
TxFrameCtrlValue.TxCompletionDescAfterTxComplete = 0;
TxFrameCtrlValue.TransmitThreshold = Adapter->TransmitThreshold;
// from registry
AIC6915_WRITE_REG(TxFrameCtrl, TxFrameCtrlValue);
// Set up the TxCompletionQueueCtrl register
TxCompletionQCtrlValue.TxCompletionQThreshold =
Adapter->TxCompletionQThreshold;
// from registry
TxCompletionQCtrlValue.CommonQMode = 0;
// do not use common TX and RX
// completion queue
TxCompletionQCtrlValue.TxCompletionSize = 0;
// 4 byte completion descriptor
TxCompletionQCtrlValue.TxCompletionProducerWe = 0;
// Software can’t write TX
// producer index
TxCompletionQCtrlValue.TxCompletion64bitAddress = 0;
// do not use 64 bit addressing
// Set up the low 32 bits of the Transmit completion queue base address
TxCompletionQCtrlValue.b.TxCompletionBaseAddress =
NdisGetPhysicalAddressLow(Adapter->TxCompletionQ.AlignedPa) >> 8;
AIC6915_WRITE_REG(TxCompletionQCtrl, TxCompletionQCtrlValue.reg);
// Initialize TX and RX Completion Queue Producer and Consumer indices
AIC6915_WRITE_REG(CompletionQ1ConsumerIndex, 0);
AIC6915_WRITE_REG(CompletionQ1ProducerIndex, 0);
AIC6915_WRITE_REG(RxCompletionQ2Ptrs, 0);
// Transmit Initialization is complete!