Adaptec 1737100 Programmer Manual - Page 167
Receive Process
![]() |
UPC - 760884136362
View all Adaptec 1737100 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 167 highlights
Sample Driver // Specify which interrupts we want InterruptEnValue.RxQ1DoneIntEn = 1; // interrupt on receive DMA InterruptEnValue.TxDmaDoneIntEn = 1; // interrupt on transmit DMA // The hardware is now ready to transmit and receive packets! Receive Process The receive process in the AIC-6915 is based on the use of a receive completion queue and receive buffers. Their relationship is discussed below. Receive Completion Descriptor Queue When a packet has been received and DMA-transferred to host memory, the AIC-6915 adds a new entry to the Receive Completion Descriptor Queue. The memory for this queue is allocated by the driver and is passed to AIC-6915 via the RXCOMPLETIONQUEUE1CTRL register (offset BCh). The size of this queue is fixed at 1024 entries. There are four different descriptor format types available: the 4-byte short descriptor (Type 0), the 8-byte basic descriptor (Type 1), the 8-byte checksum descriptor (Type 2), and the 16-byte full descriptor (Type 3). Therefore, depending upon the descriptor type, 4KByte, 8KByte, or 16KByte of memory is required to accommodate the Receive Completion Descriptor Queue. These descriptors are discussed in more detail below. The completion descriptor type is programmed using the RXCOMPLETIONQ1TYPE field in the RXCOMPLETIONQUEUE1CTRL register. There is a corresponding field in RXCOMPLETIONQUEUE2CTRL if two Receive Completion Queues are used. The developer may choose to implement two receive completion queues if the protocol environment can utilize packet sorting based on priority or size. The AIC-6915 controller offers the choices of sorting based on address filtering priority, VLAN priority, or packet size. This option is programmed in the RXDMAQUEUEMODE field in register RXDMACTRL. For address filtering and AIC-6915 ID sorting, refer to the description of register RXADDRESSFILTERINGCTRL. Each entry in the Receive Completion Descriptor Queue points to one or more entries in the Receive Buffer Descriptor Queue, depending upon the size of the received frame. There is one Receive Completion Descriptor Queue entry for each received frame. Receive Completion Descriptor Types Type 0 Completion Descriptor The Type 0 descriptor is known as the short completion descriptor. This descriptor consists of a four byte entry (one word). It contains a descriptor ID, a status field, an end index which points to the associated Receive Buffer Descriptor Queue entry, and a length field indicating the length of the received packet. To program the AIC-6915 to use a Type 0 descriptor, the developer must set RXCOMPLETIONQ1TYPE in register RXCOMPLETIONQUEUE1CTRL to 00b. Type 1 Completion Descriptor The Type 1 descriptor is also known as the basic completion descriptor. It consists of two word entries. The first word is identical to the Type 0 descriptor. The second word contains extended status information and a VLAN ID and priority. To program the AIC-6915 to use a Type 1 descriptor, the developer must set RXCOMPLETIONQ1TYPE in register RXCOMPLETIONQUEUE1CTRL to 01b. 8-7
![](/manual_guide/products/adaptec-1737100-programmer-manual-d6d6d7d/167.png)