de4x5.txt 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. Originally, this driver was written for the Digital Equipment
  2. Corporation series of EtherWORKS Ethernet cards:
  3. DE425 TP/COAX EISA
  4. DE434 TP PCI
  5. DE435 TP/COAX/AUI PCI
  6. DE450 TP/COAX/AUI PCI
  7. DE500 10/100 PCI Fasternet
  8. but it will now attempt to support all cards which conform to the
  9. Digital Semiconductor SROM Specification. The driver currently
  10. recognises the following chips:
  11. DC21040 (no SROM)
  12. DC21041[A]
  13. DC21140[A]
  14. DC21142
  15. DC21143
  16. So far the driver is known to work with the following cards:
  17. KINGSTON
  18. Linksys
  19. ZNYX342
  20. SMC8432
  21. SMC9332 (w/new SROM)
  22. ZNYX31[45]
  23. ZNYX346 10/100 4 port (can act as a 10/100 bridge!)
  24. The driver has been tested on a relatively busy network using the DE425,
  25. DE434, DE435 and DE500 cards and benchmarked with 'ttcp': it transferred
  26. 16M of data to a DECstation 5000/200 as follows:
  27. TCP UDP
  28. TX RX TX RX
  29. DE425 1030k 997k 1170k 1128k
  30. DE434 1063k 995k 1170k 1125k
  31. DE435 1063k 995k 1170k 1125k
  32. DE500 1063k 998k 1170k 1125k in 10Mb/s mode
  33. All values are typical (in kBytes/sec) from a sample of 4 for each
  34. measurement. Their error is +/-20k on a quiet (private) network and also
  35. depend on what load the CPU has.
  36. =========================================================================
  37. The ability to load this driver as a loadable module has been included
  38. and used extensively during the driver development (to save those long
  39. reboot sequences). Loadable module support under PCI and EISA has been
  40. achieved by letting the driver autoprobe as if it were compiled into the
  41. kernel. Do make sure you're not sharing interrupts with anything that
  42. cannot accommodate interrupt sharing!
  43. To utilise this ability, you have to do 8 things:
  44. 0) have a copy of the loadable modules code installed on your system.
  45. 1) copy de4x5.c from the /linux/drivers/net directory to your favourite
  46. temporary directory.
  47. 2) for fixed autoprobes (not recommended), edit the source code near
  48. line 5594 to reflect the I/O address you're using, or assign these when
  49. loading by:
  50. insmod de4x5 io=0xghh where g = bus number
  51. hh = device number
  52. NB: autoprobing for modules is now supported by default. You may just
  53. use:
  54. insmod de4x5
  55. to load all available boards. For a specific board, still use
  56. the 'io=?' above.
  57. 3) compile de4x5.c, but include -DMODULE in the command line to ensure
  58. that the correct bits are compiled (see end of source code).
  59. 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a
  60. kernel with the de4x5 configuration turned off and reboot.
  61. 5) insmod de4x5 [io=0xghh]
  62. 6) run the net startup bits for your new eth?? interface(s) manually
  63. (usually /etc/rc.inet[12] at boot time).
  64. 7) enjoy!
  65. To unload a module, turn off the associated interface(s)
  66. 'ifconfig eth?? down' then 'rmmod de4x5'.
  67. Automedia detection is included so that in principle you can disconnect
  68. from, e.g. TP, reconnect to BNC and things will still work (after a
  69. pause whilst the driver figures out where its media went). My tests
  70. using ping showed that it appears to work....
  71. By default, the driver will now autodetect any DECchip based card.
  72. Should you have a need to restrict the driver to DIGITAL only cards, you
  73. can compile with a DEC_ONLY define, or if loading as a module, use the
  74. 'dec_only=1' parameter.
  75. I've changed the timing routines to use the kernel timer and scheduling
  76. functions so that the hangs and other assorted problems that occurred
  77. while autosensing the media should be gone. A bonus for the DC21040
  78. auto media sense algorithm is that it can now use one that is more in
  79. line with the rest (the DC21040 chip doesn't have a hardware timer).
  80. The downside is the 1 'jiffies' (10ms) resolution.
  81. IEEE 802.3u MII interface code has been added in anticipation that some
  82. products may use it in the future.
  83. The SMC9332 card has a non-compliant SROM which needs fixing - I have
  84. patched this driver to detect it because the SROM format used complies
  85. to a previous DEC-STD format.
  86. I have removed the buffer copies needed for receive on Intels. I cannot
  87. remove them for Alphas since the Tulip hardware only does longword
  88. aligned DMA transfers and the Alphas get alignment traps with non
  89. longword aligned data copies (which makes them really slow). No comment.
  90. I have added SROM decoding routines to make this driver work with any
  91. card that supports the Digital Semiconductor SROM spec. This will help
  92. all cards running the dc2114x series chips in particular. Cards using
  93. the dc2104x chips should run correctly with the basic driver. I'm in
  94. debt to <mjacob@feral.com> for the testing and feedback that helped get
  95. this feature working. So far we have tested KINGSTON, SMC8432, SMC9332
  96. (with the latest SROM complying with the SROM spec V3: their first was
  97. broken), ZNYX342 and LinkSys. ZNYX314 (dual 21041 MAC) and ZNYX 315
  98. (quad 21041 MAC) cards also appear to work despite their incorrectly
  99. wired IRQs.
  100. I have added a temporary fix for interrupt problems when some SCSI cards
  101. share the same interrupt as the DECchip based cards. The problem occurs
  102. because the SCSI card wants to grab the interrupt as a fast interrupt
  103. (runs the service routine with interrupts turned off) vs. this card
  104. which really needs to run the service routine with interrupts turned on.
  105. This driver will now add the interrupt service routine as a fast
  106. interrupt if it is bounced from the slow interrupt. THIS IS NOT A
  107. RECOMMENDED WAY TO RUN THE DRIVER and has been done for a limited time
  108. until people sort out their compatibility issues and the kernel
  109. interrupt service code is fixed. YOU SHOULD SEPARATE OUT THE FAST
  110. INTERRUPT CARDS FROM THE SLOW INTERRUPT CARDS to ensure that they do not
  111. run on the same interrupt. PCMCIA/CardBus is another can of worms...
  112. Finally, I think I have really fixed the module loading problem with
  113. more than one DECchip based card. As a side effect, I don't mess with
  114. the device structure any more which means that if more than 1 card in
  115. 2.0.x is installed (4 in 2.1.x), the user will have to edit
  116. linux/drivers/net/Space.c to make room for them. Hence, module loading
  117. is the preferred way to use this driver, since it doesn't have this
  118. limitation.
  119. Where SROM media detection is used and full duplex is specified in the
  120. SROM, the feature is ignored unless lp->params.fdx is set at compile
  121. time OR during a module load (insmod de4x5 args='eth??:fdx' [see
  122. below]). This is because there is no way to automatically detect full
  123. duplex links except through autonegotiation. When I include the
  124. autonegotiation feature in the SROM autoconf code, this detection will
  125. occur automatically for that case.
  126. Command line arguments are now allowed, similar to passing arguments
  127. through LILO. This will allow a per adapter board set up of full duplex
  128. and media. The only lexical constraints are: the board name (dev->name)
  129. appears in the list before its parameters. The list of parameters ends
  130. either at the end of the parameter list or with another board name. The
  131. following parameters are allowed:
  132. fdx for full duplex
  133. autosense to set the media/speed; with the following
  134. sub-parameters:
  135. TP, TP_NW, BNC, AUI, BNC_AUI, 100Mb, 10Mb, AUTO
  136. Case sensitivity is important for the sub-parameters. They *must* be
  137. upper case. Examples:
  138. insmod de4x5 args='eth1:fdx autosense=BNC eth0:autosense=100Mb'.
  139. For a compiled in driver, in linux/drivers/net/CONFIG, place e.g.
  140. DE4X5_OPTS = -DDE4X5_PARM='"eth0:fdx autosense=AUI eth2:autosense=TP"'
  141. Yes, I know full duplex isn't permissible on BNC or AUI; they're just
  142. examples. By default, full duplex is turned off and AUTO is the default
  143. autosense setting. In reality, I expect only the full duplex option to
  144. be used. Note the use of single quotes in the two examples above and the
  145. lack of commas to separate items.