~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/Documentation/networking/tulip.txt

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1                 Tulip Ethernet Card Driver
  2           Maintained by Jeff Garzik <jgarzik@mandrakesoft.com>
  3 
  4 The Tulip driver was developed by Donald Becker and changed by
  5 Takashi Manabe and a cast of thousands.
  6 
  7 For 2.4.x and later kernels, the Linux Tulip driver is available at
  8 http://sourceforge.net/projects/tulip/
  9 
 10         This driver is for the Digital "Tulip" Ethernet adapter interface.
 11         It should work with most DEC 21*4*-based chips/ethercards, as well as
 12         with work-alike chips from Lite-On (PNIC) and Macronix (MXIC) and ASIX.
 13 
 14         The author may be reached as becker@scyld.com, or C/O
 15         Center of Excellence in Space Data and Information Sciences
 16            Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
 17 
 18         Additional information on Donald Becker's tulip.c
 19         is available at http://www.scyld.com/network/tulip.html
 20 
 21 
 22 
 23 
 24                                 Theory of Operation
 25 
 26 Board Compatibility
 27 ===================
 28 
 29 This device driver is designed for the DECchip "Tulip", Digital's
 30 single-chip ethernet controllers for PCI.  Supported members of the family
 31 are the 21040, 21041, 21140, 21140A, 21142, and 21143.  Similar work-alike
 32 chips from Lite-On, Macronics, ASIX, Compex and other listed below are also
 33 supported.
 34 
 35 These chips are used on at least 140 unique PCI board designs.  The great
 36 number of chips and board designs supported is the reason for the
 37 driver size and complexity.  Almost of the increasing complexity is in the
 38 board configuration and media selection code.  There is very little
 39 increasing in the operational critical path length.
 40 
 41 Board-specific settings
 42 =======================
 43 
 44 PCI bus devices are configured by the system at boot time, so no jumpers
 45 need to be set on the board.  The system BIOS preferably should assign the
 46 PCI INTA signal to an otherwise unused system IRQ line.
 47 
 48 Some boards have EEPROMs tables with default media entry.  The factory default
 49 is usually "autoselect".  This should only be overridden when using
 50 transceiver connections without link beat e.g. 10base2 or AUI, or (rarely!)
 51 for forcing full-duplex when used with old link partners that do not do
 52 autonegotiation.
 53 
 54 Driver operation
 55 ================
 56 
 57 Ring buffers
 58 ------------
 59 
 60 The Tulip can use either ring buffers or lists of Tx and Rx descriptors.
 61 This driver uses statically allocated rings of Rx and Tx descriptors, set at
 62 compile time by RX/TX_RING_SIZE.  This version of the driver allocates skbuffs
 63 for the Rx ring buffers at open() time and passes the skb->data field to the
 64 Tulip as receive data buffers.  When an incoming frame is less than
 65 RX_COPYBREAK bytes long, a fresh skbuff is allocated and the frame is
 66 copied to the new skbuff.  When the incoming frame is larger, the skbuff is
 67 passed directly up the protocol stack and replaced by a newly allocated
 68 skbuff.
 69 
 70 The RX_COPYBREAK value is chosen to trade-off the memory wasted by
 71 using a full-sized skbuff for small frames vs. the copying costs of larger
 72 frames.  For small frames the copying cost is negligible (esp. considering
 73 that we are pre-loading the cache with immediately useful header
 74 information).  For large frames the copying cost is non-trivial, and the
 75 larger copy might flush the cache of useful data.  A subtle aspect of this
 76 choice is that the Tulip only receives into longword aligned buffers, thus
 77 the IP header at offset 14 isn't longword aligned for further processing.
 78 Copied frames are put into the new skbuff at an offset of "+2", thus copying
 79 has the beneficial effect of aligning the IP header and preloading the
 80 cache.
 81 
 82 Synchronization
 83 ---------------
 84 The driver runs as two independent, single-threaded flows of control.  One
 85 is the send-packet routine, which enforces single-threaded use by the
 86 dev->tbusy flag.  The other thread is the interrupt handler, which is single
 87 threaded by the hardware and other software.
 88 
 89 The send packet thread has partial control over the Tx ring and 'dev->tbusy'
 90 flag.  It sets the tbusy flag whenever it's queuing a Tx packet. If the next
 91 queue slot is empty, it clears the tbusy flag when finished otherwise it sets
 92 the 'tp->tx_full' flag.
 93 
 94 The interrupt handler has exclusive control over the Rx ring and records stats
 95 from the Tx ring.  (The Tx-done interrupt can't be selectively turned off, so
 96 we can't avoid the interrupt overhead by having the Tx routine reap the Tx
 97 stats.)  After reaping the stats, it marks the queue entry as empty by setting
 98 the 'base' to zero.      Iff the 'tp->tx_full' flag is set, it clears both the
 99 tx_full and tbusy flags.
100 
101 Notes
102 =====
103 
104 Thanks to Duke Kamstra of SMC for long ago providing an EtherPower board.
105 Greg LaPolla at Linksys provided PNIC and other Linksys boards.
106 Znyx provided a four-port card for testing.
107 
108 References
109 ==========
110 
111 http://cesdis.gsfc.nasa.gov/linux/misc/NWay.html
112 http://www.digital.com  (search for current 21*4* datasheets and "21X4 SROM")
113 http://www.national.com/pf/DP/DP83840A.html
114 http://www.asix.com.tw/pmac.htm
115 http://www.admtek.com.tw/
116 
117 Errata
118 ======
119 
120 The old DEC databooks were light on details.
121 The 21040 databook claims that CSR13, CSR14, and CSR15 should each be the last
122 register of the set CSR12-15 written.  Hmmm, now how is that possible?
123 
124 The DEC SROM format is very badly designed not precisely defined, leading to
125 part of the media selection junkheap below.  Some boards do not have EEPROM
126 media tables and need to be patched up.  Worse, other boards use the DEC
127 design kit media table when it isn't correct for their board.
128 
129 We cannot use MII interrupts because there is no defined GPIO pin to attach
130 them.  The MII transceiver status is polled using an kernel timer.
131 
132 
133 Source tree tour
134 ================
135 The following is a list of files comprising the Tulip ethernet driver in
136 drivers/net/tulip subdirectory.
137 
138 21142.c         - 21142-specific h/w interaction
139 eeprom.c        - EEPROM reading and parsing
140 interrupt.c     - Interrupt handler
141 media.c         - Media selection and MII support
142 pnic.c          - PNIC-specific h/w interaction
143 timer.c         - Main driver timer, and misc h/w timers
144 tulip.h         - Private driver header
145 tulip_core.c    - Driver core (a.k.a. where "everything else" goes)
146 
147 
148 
149 Version history
150 ===============
151 0.9.11 (November 3, 2000):
152 * Eliminate extra bus accesses when sharing interrupts (prumpf)
153 * Barrier following ownership descriptor bit flip (prumpf)
154 * Endianness fixes for >14 addresses in setup frames (prumpf)
155 * Report link beat to kernel/userspace via netif_carrier_*. (kuznet)
156 * Better spinlocking in set_rx_mode.
157 * Fix I/O resource request failure error messages (DaveM catch)
158 * Handle DMA allocation failure.
159 
160 0.9.10 (September 6, 2000):
161 * Simple interrupt mitigation (via jamal)
162 * More PCI ids
163 
164 0.9.9 (August 11, 2000):
165 * More PCI ids
166 
167 0.9.8 (July 13, 2000):
168 * Correct signed/unsigned comparison for dummy frame index
169 * Remove outdated references to struct enet_statistics
170 
171 0.9.7 (June 17, 2000):
172 * Timer cleanups (Andrew Morton)
173 * Alpha compile fix (somebody?)
174 
175 0.9.6 (May 31, 2000):
176 * Revert 21143-related support flag patch
177 * Add HPPA/media-table debugging printk
178 
179 0.9.5 (May 30, 2000):
180 * HPPA support (willy@puffingroup)
181 * CSR6 bits and tulip.h cleanup (Chris Smith)
182 * Improve debugging messages a bit
183 * Add delay after CSR13 write in t21142_start_nway
184 * Remove unused ETHER_STATS code
185 * Convert 'extern inline' to 'static inline' in tulip.h (Chris Smith)
186 * Update DS21143 support flags in tulip_chip_info[]
187 * Use spin_lock_irq, not _irqsave/restore, in tulip_start_xmit()
188 * Add locking to set_rx_mode()
189 * Fix race with chip setting DescOwned bit (Hal Murray)
190 * Request 100% of PIO and MMIO resource space assigned to card
191 * Remove error message from pci_enable_device failure
192 
193 0.9.4.3 (April 14, 2000):
194 * mod_timer fix (Hal Murray)
195 * PNIC2 resuscitation (Chris Smith)
196 
197 0.9.4.2 (March 21, 2000):
198 * Fix 21041 CSR7, CSR13/14/15 handling
199 * Merge some PCI ids from tulip 0.91x
200 * Merge some HAS_xxx flags and flag settings from tulip 0.91x
201 * asm/io.h fix (submitted by many) and cleanup
202 * s/HAS_NWAY143/HAS_NWAY/
203 * Cleanup 21041 mode reporting
204 * Small code cleanups
205 
206 0.9.4.1 (March 18, 2000):
207 * Finish PCI DMA conversion (davem)
208 * Do not netif_start_queue() at end of tulip_tx_timeout() (kuznet)
209 * PCI DMA fix (kuznet)
210 * eeprom.c code cleanup
211 * Remove Xircom Tulip crud
212 
213 
214 [EOF]
215 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.