[tulip] Tulip XMT and RCV descriptors - an observation

Moti Haimovsky motih@cisco.com
Sun Feb 17 09:32:01 2002


This is not a bug - but its good to be aware to the following:
background:
 The 21143 transfers received data frames to the receive buffers in host
memory and transmits data
 from the transmit buffers in host memory. Descriptors that reside in the
host memory act as
 pointers to these buffers.
 There are two descriptor lists, one for receive and one for transmit.
 A descriptor list is forward linked (either implicitly or explicitly).
 Implicit chaining of descriptors, which is also the default setting of the
descriptors,
 is called ring mode. in this mode the descriptors are assumed to reside in
consecutive
 physical memory having a predefined and fixed spacing between them, this
gap value
 is written to CSR0<DSL> (Descriptor Skip Length) and is in units of long
words (default
 value is 0).
 The last descriptor may point back to the first entry to create a ring
structure.

 Explicit chaining of descriptors is done on a per-descriptor basis and is
accomplished
 by setting the second address chained bit (RDES1<24> or TDES1<24>) of the
descriptor and by writing the
 physical address of the next descriptor in buffer2 address field.

The observation:
 Looking at the tulip driver I've noticed the driver writes the "next
descriptor" address to
 buffer2 address field of the descriptor as if it plans to use it in chain
mode, BUT
 it does not set the "second address chained" bit of that descriptor.
 this means that one may be fooled to believe that the chip is programmed to
work in chained mode
 while the chip is actually working in ring mode (or better say "fixed gap
mode").
 This of course creates no problem in the current driver due to the
descriptors memory layout
 the driver is using, but the driver will fail to work if one will try to
use a different
 memory scheme, such as widening the gap between the descriptors (one
descriptor per cache line
 for examples), or when the descriptors will not reside in a physically
contiguous memory.

Moti H.