8139too.txt
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:13k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. "8139too" Fast Ethernet driver for Linux
  2.  RTL-8139, -8129, and -8130 10/100 Fast Ethernet adapters
  3. Copyright 2000,2001 Jeff Garzik <jgarzik@mandrakesoft.com>
  4.                 http://sourceforge.net/projects/gkernel/
  5.       Architectures supported (all PCI platforms):
  6.     x86, Alpha AXP, PowerPC, Sparc64
  7.     Kernel versions supported: 2.4.x
  8. Disclaimer
  9. ----------
  10. DO NOT CONTACT DONALD BECKER FOR SUPPORT OF THIS DRIVER, his driver is
  11. completely different and maintained independently of the 8139too code base.
  12. Requirements
  13. ------------
  14. Kernel 2.4.3 or later.
  15. A Fast Ethernet adapter containing an RTL8139-based chip.
  16. Introduction
  17. ------------
  18. The "8139too" Fast Ethernet driver for Linux 2.4.0 is a substantial
  19. modification of the experimental rtl8139 driver from Donald Becker,
  20. some versions of which appeared in 2.2.x and 2.3.x kernels.  The
  21. RTL-8139 is a very low-cost Fast Ethernet chip, which makes it very
  22. popular.
  23. The step from 2.2.x to 2.4.x kernels brings many new features to Linux
  24. device drivers.  Features for MMIO resources, a standard hot-plug API,
  25. and other interfaces are now becoming requirements, as drivers move
  26. off the x86 platform.  With that in mind, I have begun updating the
  27. RTL-8139 driver to current 2.3.x (2.4) kernel standards and APIs, and
  28. fixing the problems that users have been encountering.
  29. Features of 8139too
  30. -------------------
  31. [note - this list intended for people familiar with kernel drivers]
  32. ** 100% MMIO, for full speed operation.  All users (so far) have
  33. reported performance increases over their existing RTL drivers.
  34. ** Multi-platform support:  x86, Alpha, PPC, ...
  35. ** Use proper SMP spinlocking, fixing SMP interrupt bugs, making the
  36. driver portable to non-x86 SMP platforms in the process.
  37. ** Use new PCI driver API for seamless, low-maintenance hot-plug support
  38. ** Several bugs fixes from original rtl8139 1.08r (October 5, 1999),
  39. including the very common "transmit timeout" problem.
  40. * Use new resource allocation API, required for hot-plug support
  41. * Use new register read/write macros
  42. * initcall support (module_init/exit)
  43. * vastly improved debug tracing support
  44. * code formatting in many places for readability
  45. * use new init_etherdev() facilities
  46. ...and probably some other less important changes which I forgot.
  47. Installation
  48. ------------
  49. OPTION 1: Build inside kernel tree (into kernel image, or as module)
  50. (overwrite 8139too driver in kernel tree with different version)
  51. 1) cp 8139too.c $my_source_tree/drivers/net/8139too.c
  52. OPTION 2: Build outside kernel tree
  53. Use the included Makefile.
  54. Tested Adapters
  55. ---------------
  56. AOpen ALN-325C
  57. AT-2500TX 10/100 PCI Fast Ethernet Network Adapter Card
  58. KTI KF-230TX
  59. KTI KF-230TX/2
  60. Lantech FastNet TX
  61. Ovislink Fast Ethernet
  62. Planet ENW-9504 (V.4) 10/100
  63. SDT Jeoun Fast PCI-TX
  64. SMC EZNET 10/100
  65. UNEX NexNIC ND012C
  66. (please add your adapter model to this list)
  67. Status of Platform Support
  68. --------------------------
  69. (see errata below for details)
  70. x86: tested, stable
  71. Alpha AXP: tested, stable
  72. PowerPC: tested, unstable
  73. Sparc64: not tested
  74. Special Thanks
  75. --------------
  76. The following people contributed invaluable testing time, feedback
  77. and/or patches during the development of this driver.  Thanks to all
  78. of them.
  79. Donald Becker, Alan Cox, Richard Stallman, Linus Torvalds - inspiration
  80. Alan Cox, Gerard Roudier - insight on posted MMIO writes
  81. Martin Mares - code review
  82. Tigran Aivazian - testing, code review, and a bug fix
  83. Chmouel Boudjnah, Alexander Dietrich, Oleg Drokin,
  84. James Fidell, Taso Hatzi, Peter K - intrepid test team
  85. And thanks to every supporter free software.
  86. (see top of 8139too.c for further credits and kudos)
  87. Submitting Bug Reports
  88. ----------------------
  89. Obtain and compile the modified rtl8139-diag source code from the
  90. 8139too driver Web site, http://sourceforge.net/projects/gkernel/
  91. This diagnostics programs, originally from Donald Becker, has been
  92. modified to display all registers on your RTL8139 chip, not just the
  93. first 0x80.
  94. If possible, send the output of a working and broken driver with
  95. rtl8139-diag -mmaaavvveefN > my-output-file.txt
  96. Send "lspci -vvv" or "cat /proc/pci" output for PCI information.
  97. Known Bugs / Errata / To-Do
  98. ---------------------------
  99. The following issues are known, and are actively being pursued.  Patches
  100. to resolve these issues is welcome.  If a problem occurs which is not in
  101. the list, please report it.  That's why we do beta releases, after all...
  102. 1) Work with Donald to merge fixes and updates into his driver.
  103. 2) ETHTOOL_SSET support
  104. 3) PPC platform has stability problems. (XXX: verify this is still true)
  105. 4) Sparc64 platform not tested at all.
  106. 8) Much improved command line / module parameter setup.  (patches and
  107. suggestions welcome)  (WIP)
  108. 9) Better documentation.  (patches welcome)
  109. 12) 10base-T support flaky or slow (todo: verify this is still true)
  110. Change History
  111. --------------
  112. Version 0.9.26 - August 9, 2002
  113. * Fix MII ioctl phy id corruption.
  114. * Fix big-endian multicast bug.
  115. * Support register dumps via ethtool.
  116. * Fix several uses of 'len' after potential skb free, in dev->hard_start_xmit
  117. * Replace several "magic numbers" with their proper representation
  118.   constants in linux/mii.h.
  119. * Support ethtool media interface via generic kernel MII API
  120. * Export NIC-specific statistics via ethtool.
  121. * Proper support for RTL8139 rev K. (can be disabled via
  122.   compile-time conditional)
  123. * Add PCI ids for new 8139 boards.
  124. * Use ethernet crc via generic linux/crc32.h kernel API.
  125. * Better RX reset.  Old rx-reset method still available via
  126.   a compile-time conditional.
  127. * Only account specific RX errors if rx_status is !OK
  128. Version 0.9.22 - November 8, 2001
  129. * Additional retries before aborting Tx
  130. * Do not write other TxConfig bits when writing clear-abort bit.
  131. * Ack TxErr intr status after each Tx abort, too.
  132. * Fix oops in interface restart
  133. Version 0.9.21 - November 1, 2001
  134. * Disable early Rx, it hurts performance and creates races.
  135. * Remove DPRINTK macro function tracing.
  136. * Better interrupt sharing behavior.
  137. * Acknowledge PCI errors.
  138. * Remove early-Rx acknowledgement, unnecessary
  139. * Remove code for uncommon case where Tx packets are
  140.   properly aligned, and do not need to be copied.
  141.   Tx packets are now always copied into a static DMA buffer,
  142.   which is allocated at interface open.
  143. * Fix problems with kernel thread exit.
  144. Version 0.9.20 - October 18, 2001
  145. * Print out notice when 8139C+ chip is detected
  146. * Add id for D-Link DFE690TXD pcmcia cardbus card (Gert Dewit)
  147. Version 0.9.19 - October 9, 2001
  148. * Eliminate buffer copy for unaligned Tx's (manfred)
  149. * Better RX error recovery (manfred)
  150. * Wake-On-LAN and ETHTOOL_GSET support (Kalle Niemitalo)
  151. * Fix assertion in PIO mode (various)
  152. Version 0.9.18 - July 6, 2001
  153. * Fix race leading to crashes on some machines.
  154. * Minimize race leading to low performance.
  155. * Correct interrupt acknowledgement to cover all three
  156.   relevant Rx events.
  157. * Add ethtool driver info support.
  158. * Collect additional driver-internal statistics.
  159. * Add descriptions for module parameters.
  160. * Support new SIOCxMIIxxx ioctls added in kernel 2.4.6.
  161. * Multicast filter big endian fix.
  162. * Support new PCI PM API added in kernel 2.4.6.
  163. Version 0.9.17 - May 7, 2001
  164. * Fix chipset wakeup bug which prevent media connection for 8139B
  165. * Print out "media is unconnected..." instead of
  166.   "partner ability 0000"
  167. Version 0.9.16 - April 14, 2001
  168. * Complete MMIO audit, disable read-after-every-write
  169. * Update Rx interrupt handling
  170. * Enable Early Rx thresholds, highly recommended to reduce
  171.   Rx FIFO overflow
  172. * Make 8129 support conditional
  173. * Support for new 2.4.3 kernel APIs
  174. * More correct PIO/MMIO PCI BAR region size checking
  175. * Add check for totally dead/missing hardware
  176. * Disable media timer code to "set full duplex"
  177. * s/spin_lock_irq/spin_lock_irqsave/
  178. * Only set AcceptMulticast if more than one mc address
  179. * Only set rx_mode if changed, in set_rx_mode
  180. * Only suspend/resume if interface is up
  181. * Always print out version upon module load, even if no devices found
  182. Version 0.9.15 - February 20, 2001
  183. * Call pci_enable_device to wake up/assign resource to device,
  184.   before actually using it.
  185. * Support wacky clone PCI ids (report from Norival Toniato Junior)
  186. * Text spelling corrections
  187. * Make sure tp->phys[] is signed
  188. * Always wake queue after hw restart, in tx_timeout
  189. * Record time of last received packet
  190. Version 0.9.14 - January 11, 2001
  191. * Merge some changes from Becker version 1.13:
  192. * Add DFE 538TX PCI id
  193. * MII read/write functions updated
  194. * Cfg93[45]6 lock/unlock fix
  195. * RTL-8129 (MII) support
  196. * Clean up spinlocking
  197. Version 0.9.13 - December, 2000
  198. * Clear blocked signals, avoid buffer overrun setting current->comm
  199. * Remove bogus PCI BAR length assertions
  200. * Remove unused 'debug' module parameter
  201. Version 0.9.12 - November 23, 2000
  202. * Kill major Tx stop/wake queue race
  203. * Use SET_MODULE_OWNER and fix module unload race
  204. * Fix cable length ("Twister") tuning
  205. * Proper media[] array length checking
  206. * Replace timer with kernel thread for twister tuning state machine
  207.   and media checking.  Fixes mdio_xxx locking, now mdio_xxx is always
  208.   protected by rtnl_lock semaphore.
  209. * Correct some sledgehammer a.k.a. overzealous spin-locks
  210. * Performance: Eliminate atomic_t for Tx counters, we don't need it
  211. * Performance: Don't copy Tx buffer if the rare case occurs where it
  212.   is aligned perfectly for us.
  213. * Eliminate needless casting of dev->priv
  214. * PIO mode selection and Twister tuning are now CONFIG_xxx options
  215.   (though purposefully not in net/Config.in... yet)
  216. Version 0.9.11 - October 28, 2000
  217. * Do not fail when PIO and MMIO region lengths do not match.
  218.   (They don't on some CardBus models, at least)
  219. * Sanity check Rx packet status and size (Tobias)
  220. * When handling a Tx timeout, disable Tx ASAP if not already.
  221. * Do not inline Tx interrupt handler (better register usage)
  222. * Handle dirty_tx signed integer wrap
  223. * Do not abort Rx processing on lack of memory, keep going
  224.   until the current Rx ring is completely handling. (Tobias)
  225. * Clean up rtl8139_close
  226. * Whitespace correction for dev_kfree_skb_irq call
  227. Version 0.9.10 - September 12, 2000
  228. * Never wrap an Rx packet (faster Rx interrupt handling)
  229. * Clear all TxAborted conditions (bug fix)
  230. * Correct copyright
  231. * More credits
  232. * Update NWay doc URL
  233. * Clean up commonly used ifdef switches
  234. * Reorg info displayed at bootup/modprobe time
  235. * Remove some unneeded spinlocks
  236. * Misc cosmetic code cleanup
  237. * Always print interrupt status for abnormal interrupts
  238. * Use RealTek-recommended FIFO and DMA burst settings (1024 bytes)
  239. Version 0.9.9 - September 9, 2000
  240. * Fix oops-able bug in Rx ring wrap calculation (David Ford)
  241. * Use PIO instead of MMIO when USE_IO_OPS is defined
  242. * Move Rx error handling out of Rx interrupt handler, resulting in
  243.   tighter Rx interrupt processing
  244. Version 0.9.8 - September 7, 2000
  245. * Propagate request_irq error value (andrew morton)
  246. * Correct potential oops bug in PCI DMA unmap code
  247. * Fix bugs related to counting/discounting of 32-bit CRC in each Rx packet
  248. * Fix 16/32-bit bug in interrupt status check
  249. * Timer cleanups (andrew morton)
  250. Version 0.9.7 - June 11, 2000
  251. * Fix support for older chips (RTL8139 early chips should now work again)
  252. Version 0.9.6 - May 30, 2000
  253. * Fix 4-extra-bytes bug
  254.   (thanks to Markus Westergren, via Santiago Garcia Mantinan)
  255. * Yet more improved chip recognition
  256. Version 0.9.5 - May 17, 2000
  257. * Improved chip version recognition
  258. * Continue banging away at receiver hang problem
  259. * Use spin_lock_irq in another spot
  260. * Don't print anything on pci_enable_device, it does so for us
  261. * Disable buggy NWay code
  262. * Define TxConfig bitmasks
  263. Version 0.9.4.1 - April 27, 2000 - third public beta release
  264. * Replace several "magic numbers" with symbolic constants
  265. * Differentiate between board-specific info and chip-specific info
  266.   (allows for easier support of specific boards or chips)
  267. * Move some of the transmit side outside of the spinlock
  268.   by using atomic variables.  Use spin_lock_irq instead of
  269.   spin_lock_irq{save,restore} in select places, for better performance.
  270. * New module option "media" for forcing media selection.  Functions the
  271.   same as "options" in other drivers, and will soon be renamed
  272.   'options' to be homogeneous.
  273. * New power management wake-up code
  274. * Slightly more verbose chip id messages in kernel log
  275. * Add/correct chip register constant list
  276. * New chipset wake up (open) logic
  277. * No longer locks CONFIGx updates
  278. * Do not set Interfame Gap (IFG) bits in TxConfig
  279. * Better Rx reset logic in case of Rx FIFO Overflow
  280. * For chips which support it, enable bit to automatically clear Rx
  281.   FIFO overflow
  282. * No longer enable and disable interrupts in interrupt handler
  283.   (technique borrowed from BSD driver, appears to have problems
  284.    with some chips)
  285. * H/W spinlock now protects ioctl
  286. * Chipset-dependent RxConfig settings
  287. Version 0.9.3.3.2 - Feb 22, 2000 - second public beta release
  288. * Begin integration of Daniel Kobras' MMIO flush patch (disabled for now)
  289. * Softnet logic updates to fix bugs and improve performance
  290. * Dynamic sizing of I/O resources (0x80 for older chips, 0xFF for newer ones)
  291. * Remove bogus SiS entries from PCI probe table
  292. * Add support for cards
  293. "Delta Electronics 8139 10/100BaseTX"
  294. "Addtron Technolgy 8139 10/100BaseTX"
  295. * Fix major bug with rx ring buffer size (also present in rtl8139.c 1.08r)
  296. * PCI DMA mapping by Dave Miller
  297. * Complete rewrite of SMP locking logic
  298. * Hotplug support
  299. * Call rtl8139_hw_start from rtl8139_open, and remove duplicated code
  300.   from rtl8139_open
  301. * Reset NWay registers to sane defaults on rtl8139_open/hw_start
  302. * Miscellaneous code cleanup
  303. Version 0.7.0 - Feb 7, 2000 - first public beta release
  304. * Initial public version, derived from Donald Becker's rtl8139.c v1.08r
  305. [EOF]