home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / how_to.zip / ETHER1.HOW < prev    next >
Text File  |  1994-04-29  |  63KB  |  1,507 lines

  1. Archive-Name: linux/howto/ethernet/part1
  2. Last-modified: 15 Apr 94
  3.  
  4. Linux Ethernet HOWTO v1.0 -- Last updated Mar 16, 1994
  5. =================================================================
  6.  
  7. -- covers changes up to and including Linux kernel v1.0
  8.  
  9. INDEX:
  10.  
  11. 0 Introduction.
  12. 0.01  How do I use this Guide?
  13. 0.01  Disclaimer and Copyright
  14. 0.02  Questions already?
  15. 0.03  Related Documentation
  16. 0.04  New Versions of this Document
  17. 0.05  Feedback
  18.  
  19. 1 What card should I buy for Linux?
  20. 1.01  Eight bit vs 16 bit
  21. 1.02  Low price Ethernet cards
  22. 1.03  Vendors and brands to avoid.
  23. 1.04  Type of cable that your card should support
  24.  
  25. 2 Status of various Ethernet cards under Linux.
  26. 2.01  3Com
  27. 2.02  Western Digital / SMC
  28. 2.03  NExxxx
  29. 2.04  Hewlett Packard Cards
  30. 2.05  D-Link
  31. 2.06  Cabletron
  32. 2.07  Allied Telesis
  33. 2.08  Arcnet
  34. 2.09  Digital / DEC
  35. 2.10  Intel
  36. 2.11  PureData
  37. 2.12  Xircom
  38. 2.13  Zenith
  39. 2.14  Racal-Interlan
  40. 2.15  AMD LANCE (79C960)
  41. 2.16  AT-Lan-Tec / RealTek Pocket adaptor
  42. 2.17  Ansel
  43. 2.18  DFI
  44.  
  45. 3 Clones of popular Ethernet cards.
  46. 3.01  WD80x3 Clones
  47. 3.02  NE2000 Clones
  48.  
  49. 4 Cables, coax, twisted pairs etc.
  50. 4.01  Thin Ethernet (thinnet)
  51. 4.02  Twisted Pair
  52. 4.03  Thick Ethernet
  53.  
  54. 5 Technical information.
  55. 5.01  Probed addresses
  56. 5.02  Skeleton / prototype driver
  57. 5.03  Driver interface to the kernel
  58. 5.04  Interrupts and linux
  59. 5.05  Programmed I/O vs. shared mem. vs slave/master DMA
  60. 5.06  Programming the Intel chips (i82586 and i82593)
  61. 5.07  Programming information from 3Com
  62. 5.08  Notes on AMD PCnet-ISA / LANCE Based cards (79C960)
  63. 5.09  Multicast and Promiscuous mode
  64. 5.10  The Berkeley Packet Filter (BPF)
  65. 5.11  Unresolved questions / concerns
  66.  
  67. 6 Possible problems, questions and troubleshooting.
  68. 6.01  Problems with NE2000 (and clones)
  69. 6.02  Problems with WD80*3 cards
  70. 6.03  Problems with 3Com cards
  71.  
  72. 7 Networking with a laptop computer.
  73. 7.01  Option 1 -- using SLIP
  74. 7.02  Option 2 -- Built in NE2000 compatible or PCMCIA Ethercard.
  75. 7.03  Option 3 -- ISA Ethercard in the docking station.
  76. 7.04  Option 4 -- Pocket / parallel port adaptors.
  77.  
  78. 8 Frequently asked questions.
  79. 8.01  Just the FAQ's ma'am -- just the FAQ's.
  80.  
  81. 9 Miscellaneous.
  82. 9.01  Bad Vendors
  83. 9.02  Closing
  84.  
  85. ======================================================================
  86.  
  87. 0. Introduction.
  88.  
  89.  This is the Ethernet-HOWTO, which is a compilation of information
  90.  about which ethernet devices can be used for Linux, and how to
  91.  set them up.
  92.  
  93.  This Ethernet-HOWTO is by:
  94.   Donald J. Becker <becker@super.org>
  95.   Paul Gortmaker  <gpg109@rsphy1.anu.edu.au>
  96.  
  97.  It covers what cards you should and shouldn't buy; how to set
  98.  them up, how to run more than one, and other common problems and
  99.  questions. It does *not* cover the software end of things, as that
  100.  is covered in the NET-2 HOWTO.
  101.  
  102.  Other people who have contributed (directly or indirectly) are,
  103.  in alphabetical order:
  104.  
  105.  Peter Bauer  <pbauer@rnivh.rni.sub.org>
  106.  Ross Biro  <bir7@leland.Stanford.EDU>
  107.  Alan Cox  <iiitac@pyr.swan.ac.uk>
  108.  David C. Davies  <davies@wanton.enet.dec.com>
  109.  Bjorn Ekwall  <bj0rn@blox.se>
  110.  Charles Hedrick  <hedrick@geneva.rutgers.edu>
  111.  Mike Jagdis  <jaggy@purplet.demon.co.uk>
  112.  Duke Kamstra  <kamstra@ccmail.west.smc.com>
  113.  Russell Nelson  <nelson@crynwr.com>
  114.  Cameron Spitzer  <camerons@NAD.3Com.com>
  115.  Dave Roberts  <david.roberts@amd.com>
  116.  Glenn Talbott  <gt@hprnd.rose.hp.com>
  117.  Miquel van Smoorenburg <miquels@cistron.nl.mugnet.org>
  118.  
  119.  Many thanks to the above people, and all the other unmentioned
  120.  testers out there.
  121.  
  122. 0.01 How Do I Use This Guide?
  123.  
  124.  As this guide is getting bigger and bigger, you probably don't want
  125.  to spend the rest of your afternoon reading the whole thing. And you
  126.  don't *have* to read it all. If you haven't got an ethernet card, then
  127.  you will want to start with section one to see what you should buy,
  128.  and what you should avoid. If you have already got an ethernet card,
  129.  but are not sure if you can use it with Linux, then you will want to
  130.  read section two, which contains specific information on each
  131.  manufacturer, and their cards. If you are having trouble with your
  132.  card, then you will want to read the specific information about
  133.  your card in section two and the troubleshooting information in
  134.  section six. If you are interested in some of the technical aspects
  135.  of the device drivers, then you can find that information in
  136.  section 5.
  137.  
  138. 0.01 Disclaimer and Copyright
  139.  
  140.  This document is *not* gospel. However, it is probably the most
  141.  up to date info that you will be able to find. Nobody is responsible
  142.  for what happens to your hardware but yourself. If your ethercard
  143.  or any other hardware goes up in smoke (...nearly impossible!)
  144.  we take no responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE
  145.  FOR ANY DAMAGES INCURRED DUE TO ACTIONS TAKEN BASED ON THE
  146.  INFORMATION INCLUDED IN THIS DOCUMENT.
  147.  
  148.  This document is Copyright (c) 1994 by Donald Becker and
  149.  Paul Gortmaker. Permission is granted to make and distribute
  150.  verbatim copies of this manual provided the copyright notice
  151.  and this permission notice are preserved on all copies.
  152.  
  153.  Permission is granted to copy and distribute modified versions
  154.  of this document under the conditions for verbatim copying,
  155.  provided that this copyright notice is included exactly as in
  156.  the original, and that the entire resulting derived work is
  157.  distributed under the terms of a permission notice identical
  158.  to this one.
  159.  
  160.  Permission is granted to copy and distribute translations
  161.  of this document into another language, under the above
  162.  conditions for modified versions.
  163.  
  164. 0.02 Questions already?
  165.  
  166.  If you have questions about your ethernet card, please READ this
  167.  document first. You may also want to join the NET channel of the
  168.  Linux-activists mailing list by sending mail to
  169.   linux-activists-request@niksula.hut.fi
  170.  with the line
  171.   X-Mn-Admin: join NET
  172.  at the top of the message body (not the subject). If you want to
  173.  learn how to use the mailing channels, then send an empty message
  174.  to the above address, and you will get an instruction manual sent
  175.  back to you in a few hours. However, it is worth noting that the NET
  176.  channel is primarily used for discussion of the networking code, and
  177.  you may not see much discussion about a particular driver.
  178.  Furthermore keep in mind that the NET channel is for development
  179.  discussions only. General questions on how to configure your system
  180.  should be directed to comp.os.linux.help unless you are actively
  181.  involved in the development of part of the networking for Linux.
  182.  We ask that you *please* respect this general guideline for content.
  183.  You can safely bet that neither of the authors will respond to
  184.  any plea for help that *should* be posted to c.o.l.help, but is
  185.  inappropriately placed elsewhere.
  186.  
  187. 0.03 Related Documentation
  188.  
  189.  Much of this info came from saved postings from the comp.os.linux
  190.  groups, which shows that it is a valuable resource of information.
  191.  Other useful information came from a bunch of small files by Donald
  192.  himself. Some of these are found at /pub/linux/info on ftp.super.org
  193.  [192.31.192.1] Of course, if you are setting up an Ethernet card,
  194.  then you will want to read the NET-2 HOWTO so that you can actually
  195.  do something with it. ftp.super.org is the home of most alpha drivers
  196.  that are not presently in the kernel. And last but not least, the
  197.  contributions from the individuals and companies listed above are
  198.  greatly appreciated as well. Oh yeah, if you fancy yourself as
  199.  a bit of a hacker, you can always scrounge some additional info
  200.  from the driver source files as well. There is usually a paragraph
  201.  in there describing any important points.
  202.  
  203. 0.04 New versions of this document
  204.  
  205.  New versions of this document can be retrieved via anonymous
  206.  FTP from sunsite.unc.edu:/pub/Linux/docs/HOWTO/* and various
  207.  Linux ftp mirror sites. It will also be posted to the newsgroup
  208.  comp.os.linux.announce at a regular interval. Updates will be made
  209.  as new information / drivers becomes available. If this copy
  210.  that you are reading is more than 2 months old, it is either out of
  211.  date, or it means that I have been lazy and haven't updated it.
  212.  
  213. 0.05 Feedback
  214.  
  215.  Any corrections can be sent to one of us (gpg109@rsphysse.anu.edu.au
  216.  or becker@super.org) We will *attempt* to keep this up to date as
  217.  more drivers become available, and as the networking code matures.
  218.  
  219. 1 What card should I buy for Linux?
  220.  
  221.  For impatient users that just want a quick, cheap answer the
  222.  summary is: get 16 bit thinnet 8013 cards. For more detail as
  223.  to the who what where and why, read on.
  224.  
  225. 1.01 Eight bit vs 16 bit
  226.  
  227.  Unless you are a light user, or are confined to using the smaller
  228.  ISA slot, the use of the 8 bit cards like the wd8003 and the 3c503
  229.  is really not worth the cost savings. Get the 8013 or the 3c503/16
  230.  instead.
  231.  
  232. 1.02 Low price Ethernet cards
  233.  
  234.  I keep track of the current low-price vendors, just because it's
  235.  asked so often. Call AT-LAN-TEC at 301-948-7070. Ask for their
  236.  technical support person, "Vincent Bono". As with all purchases,
  237.  you should indicate you are buying this for a Linux system.
  238.  The last I checked the price for 10 NE2000s was $480, or $48 ea.!
  239.  NB: Their current NE2000 clone is a model that "traps" other
  240.  drivers that probe into their address space. AT-LAN-TEC also carries
  241.  a clone, non-EEPROM 8013 board for somewhat more, and a NE2100 clone.
  242.  Either is a better choice if the very lowest price isn't essential.
  243.  Also, SMC is offering an evaluation deal on their new Ultra cards,
  244.  and the word is that you can get one for $50. You can ask them
  245.  yourself by calling 1-800-SMC-4YOU in Canada and the USA.
  246.  
  247.  The Allied Telesis AT1500 is offered at a good price by many vendors.
  248.  Even Inmac, known for their premium markup, has this card for under
  249.  $100.
  250.  
  251. 1.03 Vendors and Brands to Avoid
  252.  
  253.  These vendors have decided *not* to release programming information
  254.  about their products, without signing a non-disclosure agreement.
  255.  More information can be found in section two and 9.01. Hence it is
  256.  strongly advised that you avoid buying products offered from
  257.  these companies.
  258.  
  259.   (1) Cabletron
  260.   (2) Xircom
  261.  
  262.  These particular cards should be avoided, as they are obsolete.
  263.  The reasons as to why they have been classified as such can be
  264.  found in section 2 of this document.
  265.  
  266.   (1) 3c501
  267.   (2) Arcnet
  268.  
  269. 1.04 Type of cable that your card should support
  270.  
  271.  Unless you have to conform to an existing network, you will want
  272.  to use thinnet or thin ethernet cable. This is the style with the
  273.  standard BNC connectors. See section 4 for other concerns with
  274.  different types of ethernet cable.
  275.  
  276.  Most ethercards also come in a "Combo" version for only $10-$20 more.
  277.  These have both twisted pair and thinnet transceiver built-in,
  278.  allowing you to change your mind later.
  279.  
  280. 2 Status of Various Ethernet Cards under Linux
  281.  
  282.  The only thing that one needs to use an ethernet card with Linux
  283.  is the appropriate driver. For this, it is essential that the
  284.  manufacturer will release the technical programming information to
  285.  the general public without you (or anyone) having to sign your life
  286.  away. A good guide for the likelihood of getting documentation
  287.  (or, if you aren't writing code, the likelihood that someone
  288.  else will write that driver you really, really need) is the
  289.  availability of the Crynwr (nee Clarkson) packet driver. Russ
  290.  Nelson (see the acknowledgements in the intro.) runs this
  291.  operation, and has been very helpful in supporting the development
  292.  of drivers for Linux.
  293.  
  294.  Given the documentation, you can write a driver for
  295.  your card and use it for Linux, at least in theory. Keep in
  296.  mind that some old hardware that was designed for XT type
  297.  machines will not function very well in a multitasking
  298.  environment such as Linux. Use of these will lead to major
  299.  problems if your network sees a reasonable amount of traffic.
  300.  
  301.  Most cards come with drivers for MS-DOS interfaces such as
  302.  NDIS and ODI, but these are useless for Linux. Many people
  303.  have suggested directly linking them in or automatic
  304.  translation, but this is nearly impossible. The MS-DOS
  305.  drivers expect to be in 16 bit mode and hook into "software
  306.  interrupts", both incompatible with the Linux kernel. This
  307.  incompatibility is actually a feature, as some Linux drivers
  308.  are considerably better than their MS-DOS counterparts. The
  309.  "8390" series drivers, for instance, use ping-pong transmit
  310.  buffers, which are only now being introduced in the MS-DOS world.
  311.  
  312.  Keep in mind that PC ethercards have the widest variety of
  313.  interfaces (shared memory, programmed I/O, bus-master, or slave
  314.  DMA) of any computer hardware for anything, and supporting a
  315.  new ethercard sometimes requires re-thinking most of the lower-level
  316.  networking code. (If you are interested in learning more about
  317.  these different forms of interfaces, see section 5)
  318.  
  319.  Also, similar product numbers don't always indicate similar products.
  320.  For instance, the 3c50* product line from 3Com varies wildly
  321.  between different members.
  322.  
  323.  Enough talk. Let's get down to the information you want.
  324.  
  325. 2.01 3Com
  326.  
  327.  Supported:
  328.  
  329.   3c503, 3c503/16
  330.    3Com shared-memory ethercards. They also have a
  331.    programmed I/O mode that doesn't use the 8390
  332.    facilities (their engineers found too many bugs!)
  333.    It should be about the same speed as the same bus
  334.    width WD80x3, but I don't have a 16 bit version
  335.    to benchmark. Unless you are a light user, spend
  336.    the extra money and get the 16 bit model, as the
  337.    price difference isn't significant. The 3c503 does not
  338.    have "EEPROM setup", so the diagnostic/setup program
  339.    isn't needed before running the card with Linux. The
  340.    shared memory address of the 3c503 is set using jumpers
  341.    that are shared with the boot PROM address. This is
  342.    confusing to people familiar with other ISA cards,
  343.    where you always leave the jumper set to "disable"
  344.    unless you have a boot PROM.
  345.  
  346.    The Linux 3c503 driver can also work with the 3c503
  347.    programmed-I/O mode, but this is slower and less
  348.    reliable than shared memory mode. Also, programmed-I/O
  349.    mode is not tested when updating the drivers, the
  350.    deadman (deadcard?) check code may falsely timeout on
  351.    some machines, and the probe for a 3c503 in
  352.    programmed-I/O mode is turned off by default in some
  353.    versions of the kernel. This was a panic reaction to
  354.    the general device driver probe explosion; the 3c503
  355.    shared memory probe is a safe read from memory, rather
  356.    than an extensive scan through I/O space. As of pl13,
  357.    the kernel has an I/O port registrar that makes I/O
  358.    space probes safer, (see section 5.1 for more info.)
  359.    and the programmed-I/O 3c503 probe has been re-enabled.
  360.    You still shouldn't use the programmed-I/O mode though,
  361.    unless you need it for MS-DOS compatibility.
  362.  
  363.    The 3c503's IRQ line is set in software, with no hints
  364.    from an EEPROM. Unlike the MS-DOS drivers, the
  365.    Linux driver has capability to autoIRQ: it uses the
  366.    first available IRQ line in {5,2/9,3,4}, selected each
  367.    time the card is 'ifconfig'ed. (Older driver versions
  368.    selected the IRQ at boot time.) The ioctl() call
  369.    in 'ifconfig' will return EAGAIN if no IRQ line is
  370.    available at that time.
  371.  
  372.   3c509
  373.    A fairly new card from 3Com. It's inexpensive and has
  374.    excellent performance for a non-bus-master design. The
  375.    drawbacks are that it _requires_ very low interrupt
  376.    latency, and it isn't rated for bus speeds greater than
  377.    8Mhz.
  378.  
  379.    A working 3c509 driver was first included as an
  380.    alpha-test version in the 0.99pl13 kernel sources.
  381.    It is now in the standard kernel.
  382.  
  383.    The 3c509 has a tiny Rx buffer, causing the driver to
  384.    occasionally drop a packet if interrupts are masked for
  385.    too long. To minimize this problem, the driver should
  386.    be completely rewritten to use predictive interrupts.
  387.    (Note: performance re-writes of working drivers are low
  388.    priority unless there is some particular incentive or
  389.    need.)
  390.  
  391.    There is also an alpha version of a Linux 3c509
  392.    diagnostic and EEPROM setup program, but for now
  393.    users that don't like the defaults should use the
  394.    MS-DOS EEPROM setup program.
  395.  
  396.   3c579
  397.    The EISA version of the 509. The current EISA version
  398.    uses the same 16 bit wide chip rather than a 32 bit
  399.    interface, so the performance increase isn't stunning.
  400.    The EISA probe code was added to 3c509.c for pl14.
  401.    We would be interested in hearing progress reports
  402.    from any 3c579 users. (Read the above 3c509
  403.    section for info on the driver.)
  404.  
  405.    Cameron Spitzer writes:
  406.    "The 3C579 (Etherlink III EISA) should be configured
  407.    as an EISA card. The IO Base Address (window 0
  408.    register 6 bits 4:0) should be 1f, which selects EISA
  409.    addressing mode. Logic outside the ASIC decodes the
  410.    IO address s000, where s is the slot number. I don't
  411.    think it was documented real well. Except for its IO
  412.    Base Address, the '579 should behave EXACTLY like the
  413.    '509 (EL3 ISA), and if it doesn't, I want to hear
  414.    about it (at my work address).
  415.  
  416.    I will leave it to the Real Programmers to suggest
  417.    the right hack to /usr/src/linux/net/inet/3c509.c to
  418.    take care of the EISA case.
  419.  
  420.    (Note that the drivers now reside in ./drivers/net/
  421.     and *not* ./inet/net/ --- pg.)
  422.  
  423.    Beware that if you put a '509 in EISA addressing mode
  424.    by mistake and save that in the EEPROM, you'll have
  425.    to use an EISA machine or the infamous Test Via to
  426.    get it back to normal, and it will conflict at IO
  427.    location 0 which may hang your ISA machine. It's not
  428.    my job to say whether this is a bug or feature, but I
  429.    have heard loud and clear that customers don't like
  430.    it and I don't think we'll do it that way again."
  431.  
  432.  Unsupported:
  433.  
  434.   3c501
  435.    Too brain-damaged to use. Available surplus from many
  436.    places. Avoid it like the plague. Again, do not
  437.    purchase this card, even as a joke. It's performance
  438.    is horrible, and it breaks in many ways.
  439.  
  440.    (I have a standing offer: I'll pay $2 for each 3c501
  441.    shipped to me postpaid, but only if you include the
  442.    BNC 'T' connector and the jumpers. $2.50 if you just
  443.    send the 'T', jumpers, and address PROM and promise to
  444.    destroy the board. -djb)
  445.  
  446.    Cameron L. Spitzer of 3Com said:
  447.    "I'm speaking only for myself here, of course, but I
  448.    believe 3Com advises against installing a 3C501 in a
  449.    new system, mostly for the same reasons Donald has
  450.    discussed. You probably won't be happy with the
  451.    3C501 in your Linux box. The data sheet is marked
  452.    "(obsolete)" on 3Com's Developers' Order Form, and
  453.    the board is not part of 3Com's program for sending
  454.    free Technical Reference Manuals to people who need
  455.    them. The decade-old things are nearly
  456.    indestructible, but that's about all they've got
  457.    going for them any more."
  458.  
  459.    For those not yet convinced, the 3c501 can only do one
  460.    thing at a time -- while you are removing one packet
  461.    from the single-packet buffer it cannot receive
  462.    another packet, nor can it receive a packet while are
  463.    loading a transmit packet. This was fine for a
  464.    network between two 8088-based computers where
  465.    processing each packet and replying took 10's of
  466.    msecs, but modern networks send back-to-back
  467.    packets for almost every transaction.
  468.  
  469.    Having read this far, you must be persistent, so you
  470.    get let in on a secret. As of pl13, some more of
  471.    the hardware problems were "compensated for".
  472.  
  473.    Ie. in a fit of madness I wasted a whole day updating
  474.    my 3c501 driver and then trying to track down a few
  475.    more of the 3c501 glitches. It now works well enough
  476.    to NFS mount filesystems, but the receiver still
  477.    occasionally hangs. I'm mostly certain that this is
  478.    a hardware bug. When it hangs, the next set of
  479.    outgoing packets will reset the board, but that's
  480.    only useful if you have something occasionally
  481.    generating outgoing packets.
  482.  
  483.    The driver is now in the std. kernel, but under the
  484.    following conditions: This is unsupported code. I
  485.    know my usual copyright says all the code is
  486.    unsupported, but this is _really_ unsupported. I
  487.    DON'T want to see bug reports, and I'll accept bug
  488.    fixes only if I'm in a good mood that day.
  489.  
  490.    I don't want to see a fest of "Linux ethercards for
  491.    sale" postings. A bunch of people have bought dozens
  492.    of "dumpster special" 3c501s, and they hope to sell
  493.    them at rip-off prices. A 3c501 is barely worth the
  494.    shipping cost, and if I see people trying to sell
  495.    them here by claiming "supported by Linux" I _will_
  496.    flame them. They are _not_ supported by Linux.
  497.  
  498.    I don't want to be flamed later for putting out bad
  499.    software. I don't know all all of the 3c501 bugs,
  500.    and I know this driver only handles a few that I've
  501.    been able to figure out. It has taken a long
  502.    intense effort just to get the driver working this
  503.    well.
  504.  
  505.    That said, you will find it included in "config.in"
  506.    No special mods are needed to use it with pl15
  507.    or greater kernels. Jumper your card to 0x280.
  508.  
  509.    AutoIRQ works, DMA isn't used, the autoprobe only
  510.    looks at 0x280, the debug level is set with the third
  511.    boot-time argument. You'll probably want to change
  512.    the default EL_DEBUG to '2'.
  513.  
  514.    Once again, THE USE OF A 3c501 IS STRONGLY DISCOURAGED
  515.    and it is NOT SUPPORTED BY LINUX.
  516.  
  517.  
  518.   3c505
  519.    An Intel-based ethercard with no driver available
  520.    at present. (Not a very common card.)
  521.  
  522.   3c507
  523.    This card uses one of the Intel chips, and the
  524.    development of the driver is closely related to
  525.    the development of the Intel Ether Express driver.
  526.    The driver has been included in the standard
  527.    release of pl15. You will have to un-comment
  528.    the 3c507 line in "config.in" -- in case you
  529.    didn't figure it out already, it is commented
  530.    out because it is still being tested.
  531.  
  532.    Technical information is available in section 5.06,
  533.    and if you have experience in writing drivers, see
  534.    section 5.07 as well.
  535.  
  536. 2.02 Western Digital / SMC
  537.  
  538.  The ethernet part of Western Digital has been bought by SMC. The
  539.  SMC Elite and SMC Elite Plus are the same as late-model WD8003
  540.  and WD8013 cards. Note that the SMC Elite Ultra is *not* the
  541.  same as the plain SMC Elite / WD8013 card. (see below)
  542.  
  543.  Supported:
  544.  
  545.   WD8003, WD8013, SMC Elite, SMC Elite Plus
  546.    A shared memory design by Western Digital. The
  547.    8 bit 8003 is slightly less expensive, but only
  548.    worth the savings for light use. Over the
  549.    years the design has added more registers and an
  550.    EEPROM. Clones usually go by the '8013' name, and
  551.    usually use a non-EEPROM (jumpered) design. This part
  552.    of WD has been sold to SMC, so you'll usually see
  553.    something like SMC/WD8013 or SMC Elite Plus (WD8013).
  554.    The shared memory makes the cards 10-20% faster,
  555.    especially with larger packets. More importantly
  556.    (to me at least) it avoids a few bugs in the
  557.    programmed-I/O mode of the 8390, allows safe
  558.    multi-threaded access to the packet buffer, and
  559.    doesn't have a programmed-I/O data register that
  560.    hangs your machine during warm-boot probes.
  561.  
  562.   SMC Elite 16 ULTRA
  563.    This ethercard is based on a new chip from SMC, with
  564.    a few new features. While it has a mode that is
  565.    similar to the older SMC ethercards, it's not
  566.    compatible with the old WD80*3 drivers. However, in
  567.    this mode it shares most of its code with the other
  568.    8390 drivers, while operating somewhat faster than a
  569.    WD8013 clone.
  570.  
  571.    Some of the device probe checks in pl14 were too
  572.    too strict, causing some cards to not be detected
  573.    every time. This was fixed for pl14a, and hence is
  574.    fine for pl15. Since part of the Ultra "looks" like
  575.    an 8013, the Ultra probe is supposed to find an
  576.    Ultra before the wd8013 probe has a chance to
  577.    mistakenly identify it.
  578.  
  579.    Std. as of pl14, and made possible by documentation
  580.    and ethercard loan from kamstra@ccmail.west.smc.com,
  581.    Duke Kamstra. If you plan on using an Ultra with Linux
  582.    send him a note of thanks to let him know that there
  583.    are Linux users out there!
  584.  
  585.    I'm considering writing a separate driver for the
  586.    Ultra's "Altego" mode which allows chaining transmits
  587.    at the cost of inefficient use of receive buffers,
  588.    but that will probably not happen right away.
  589.    Performance re-writes of working drivers are low
  590.    priority unless there is some particular incentive
  591.    or need.
  592.  
  593. 2.03 NExxxx
  594.  
  595.  The prefix "NE" came from Novell Ethernet. Novell followed the
  596.  cheapest NatSemi databook design and sold the manufacturing rights
  597.  (spun off?) Eagle, just to get reasonably-priced ethercards into
  598.  the market.
  599.  
  600.  Supported:
  601.  
  602.   NE1000, NE2000
  603.    The now-generic name for a bare-bones design around
  604.    the NatSemi 8390. They use programmed I/O rather than
  605.    shared memory, leading to easier installation but
  606.    slightly lower performance and a few problems. Again,
  607.    the savings of using an 8 bit NE1000 over the NE2000
  608.    are only warranted if you expect light use. Some
  609.    recently introduced NE2000 clones use the National
  610.    Semiconductor "AT/LANTic" 83905 chip, which offers
  611.    a shared memory mode similar to the 8013 and EEPROM
  612.    or software configuration. Some problems can arise
  613.    with poor clones. See the question and answer section
  614.    later in this document, and the section on clones.
  615.    I have written a NE2000 diagnostic program, but it
  616.    is still presently in alpha test. (ne2k)
  617.  
  618.   NE1500, NE2100
  619.    The AT1500 driver, recently added to the list of
  620.    supported cards, also supports the NE1500, NE2100 and
  621.    clones. The driver shipped with pl12 kernel doesn't
  622.    detect non-AT1500 cards with autoprobe, but will work
  623.    fine if you specify the base address explicitly and
  624.    jumper for DMA channel 5. Read the Allied Telesis
  625.    section for more information on LANCE based cards.
  626.  
  627. 2.04 Hewlett Packard
  628.  
  629.  The 272** cards use programmed I/O, similar to the NE*000 boards,
  630.  but the data transfer port can be "turned off" when you aren't
  631.  accessing it, avoiding problems with autoprobing drivers.
  632.  
  633.  Thanks to Glenn Talbott for cleaning up the confusion in this
  634.  section regarding the version numbers of the HP hardware, and
  635.  adding lots of new info.
  636.  
  637.  Supported:
  638.  
  639.   27245A
  640.    8 Bit 8390 based 10BaseT, not recommended for all the
  641.    8 bit reasons. It was re-designed a couple years
  642.    ago to be highly integrated which caused some
  643.    changes in initialization timing which only
  644.    affected testing programs, not LAN drivers. (The
  645.    new card is not 'ready' as soon after switching
  646.    into and out of loopback mode.)
  647.  
  648.   27247B, 27252A
  649.    The 47B is a 16 Bit 8390 based 10BaseT w/AUI, and
  650.    the 52A is a 16 Bit 8390 based ThinLAN w/AUI.
  651.    These cards are high performers (3c509 speed) without
  652.    the interrupt latency problems (32K onboard RAM for TX
  653.    or RX packet buffering). They both offer LAN
  654.    connector autosense, data I/O in I/O space (simpler) or
  655.    memory mapped (faster), and soft configuration. 27247B
  656.    was rated Best for ISA Servers by PC Mag this year.
  657.  
  658.   27247A
  659.    This is the older model that existed before the "B".
  660.    Two versions 27247-60001 or 27247-60002 have part
  661.    numbers marked on the card. Functionally the same to
  662.    the LAN driver, except bits in ROM to identify
  663.    boards differ. -60002 has a jumper to allow
  664.    operation in non-standard ISA busses (chipsets
  665.    that expect IOCHRDY early.)
  666.  
  667.   HP J2405A
  668.    These are lower priced, and slightly faster than the
  669.    27247B/27252A, but are missing some features, such
  670.    as AUI, ThinLAN connectivity, and boot PROM socket.
  671.    This is a fairly generic LANCE design, but a minor
  672.    design decision makes it incompatible with a generic
  673.    "NE2100" driver. Special support for it (including
  674.    reading the DMA channel from the board) is in pl14
  675.    and up, thanks to information provided by HP's Glenn
  676.    Talbott, gt@hprnd.rose.hp.com. Note that the pre pl14
  677.    driver should not be used with this card.
  678.  
  679.    More information on LANCE based cards can be found in
  680.    section 5.08.
  681.  
  682. 2.05 D-Link
  683.  
  684.  Supported:
  685.  
  686.   DE-600
  687.    Laptop users and other folk who might want a quick
  688.    way to put their computer onto the ethernet may want
  689.    to use this. The driver was included with the default
  690.    kernel source tree as of pl12 and possibly earlier.
  691.    Bjorn Ekwall <bj0rn@blox.se> wrote the original.
  692.    Expect about 80kb/s transfer speed from this via the
  693.    parallel port. You should read the README.DLINK
  694.    file in the kernel source tree. The latest release
  695.    of this driver is v0.32, and it is included in the
  696.    standard kernel of pl15
  697.  
  698.   DE-650
  699.    Some people have been using this PCMCIA card for
  700.    some time now with their notebooks. Note however,
  701.    that using a PCMCIA card with Linux is not trivial.
  702.    See the section on networking with a notebook for
  703.    more information on PCMCIA cards. This driver is
  704.    *not* part of the standard kernel.
  705.  
  706.   DE-100, DE-200, DE-220-T
  707.    The manual says that it is 100% compatible with the
  708.    NE2000. This is not true. You should call them and
  709.    tell them you are using their card with Linux, and they
  710.    should correct their documentation. Some pre-0.99pl12
  711.    driver versions may have trouble recognizing the DE2**
  712.    series as 16 bit cards, and these cards are the most
  713.    widely reported as having the spurious transfer address
  714.    mismatch errors. Note that there are cards from
  715.    Digital (DEC) that are also named DE100 and DE200,
  716.    but the similarity stops there.
  717.  
  718.  Unsupported:
  719.  
  720.   DE-620
  721.    Same as the DE-600, only with two output formats.
  722.    (BNC and RJ-45, I would assume... ????)
  723.    Bjorn writes: "I have still no information on the
  724.    DE-620 that I can include in this release. (Maybe
  725.    someone well connected to D-Link sees this,
  726.    hint, hint, hint...)
  727.  
  728. 2.06 Cabletron
  729.  
  730.  Yes, another one of these companies that won't release its
  731.  programming information. They waited for months before actually
  732.  confirming that all their information was proprietary, deliberately
  733.  wasting my time. Avoid their cards like the plague if you can.
  734.  Also note that some people have phoned Cabletron, and have been
  735.  told things like "a dbecker@super.org is working on a driver
  736.  for linux" -- making it sound like I work for them. This is
  737.  NOT the case. Anyway, if I were working for them, or even if
  738.  I had signed a ND agreement, I wouldn't be able to tell
  739.  everyone what a sleazy design the E2100 is. (See below.)
  740.  
  741.  If you feel like asking them why they don't want to release their
  742.  info so that people can use their cards, write to support@ctron.com
  743.  Tell them that you are using Linux, and are disappointed that they
  744.  don't support open systems. (See section 9.01)
  745.  
  746.  Supported: (...well, not *really* supported)
  747.  
  748.   E10**, E10**-x, E20**, E20**-x
  749.    These are NEx000 almost-clones that are reported to
  750.    work with the standard NEx000 drivers, thanks to a
  751.    ctron-specific check during the probe. If there are
  752.    any problems, they are unlikely to be fixed, as the
  753.    programming information is unavailable.
  754.  
  755.  
  756.   E21**
  757.    Again, there is not much one can do when the
  758.    programming information is proprietary.
  759.    The E2100 is a poor design. Whenever it maps its
  760.    shared memory in during a packet transfer, it
  761.    maps it into the *whole 128K region*! That means you
  762.    *can't* safely use another interrupt-driven shared
  763.    memory device in that region, including another E2100.
  764.    It will work _most_ of the time, but every once in
  765.    a while it will bite you. (Yes, this problem can
  766.    be avoided by turning off interrupts while
  767.    transferring packets, but that will almost certainly
  768.    lose clock ticks.
  769.  
  770.    Also, don't confuse the E2100 for a NE2100 clone.
  771.    The E2100 is a shared memory NatSemi DP8390 design,
  772.    roughly similar to a brain-damaged WD8013, whereas
  773.    the NE2100 (and NE1500) use a bus-mastering AMD
  774.    LANCE design.
  775.  
  776.    There is an alpha test driver available (even though
  777.    I shouldn't have bothered) in the normal place
  778.    (see the FAQ section) -- e2100.c -- let me know if
  779.    you use it, and how it works. Don't forget to
  780.    un-comment the line in config.in.
  781.  
  782. 2.07 Allied Telesis
  783.  
  784.  Allied Telesis is the worlds largest maker of separate
  785.  transceivers thanks to their low prices, and they now have a
  786.  series of low-cost ethercards using the 79C960 version of the AMD
  787.  LANCE. These are bus-master cards, and thus probably the fastest
  788.  ISA bus ethercards available (although the 3c509 has lower latency
  789.  thanks to predictive interrupts).
  790.  
  791.  Supported:
  792.  
  793.   AT1500
  794.    The driver for the AT1500 series is new in the
  795.    0.99pl12 kernel, but it won't work "out-of-the-box"
  796.    with >16M machines. (NB This isn't a fundamental
  797.    limitation, so stop pointing and laughing at the ISA
  798.    bus. The driver just needs a hook to allocate
  799.    low-memory buffers for the bus-master DMA, and should
  800.    be just as fast on >16M systems. It can be easily
  801.    fixed by initializing the LANCE driver with the
  802.    character devices, but this fix depends on the
  803.    resolution of the networking code uncertainty.)
  804.  
  805.    For the ISA bus master mode all structures used
  806.    directly by the LANCE, the initialization block,
  807.    Rx and Tx rings, and data buffers, must be accessible
  808.    from the ISA bus, i.e. in the lower 16M of real memory.
  809.    This is a problem for current Linux kernels on >16M
  810.    machines. The network devices are initialized after
  811.    memory initialization, and the kernel doles out memory
  812.    from the top of memory downward. The current solution
  813.    is to have a special network initialization routine
  814.    that's called before memory initialization; this will
  815.    eventually be generalized for all network devices.
  816.    Low-memory "bounce-buffers" are used when needed.
  817.  
  818.    This driver should also work with NE1500 and NE2100
  819.    clones.
  820.    
  821.    Future driver versions may figure out a way to
  822.    autoDMA. Although there is no autoDMA (until I verify
  823.    that autoDMA is safe and reliable), some versions
  824.    (pl13) allow passing the DMA channel at boot-time via
  825.    LILO. (Boot-time parameters can be made permanent in
  826.    LILO v13+, read the docs.) The DMA channel otherwise
  827.    defaults to DMA5.
  828.  
  829.    In pl14, there was a buglet that would hang some
  830.    machines with AT1500 like cards. Either get pl15
  831.    or newer, or go into ./init/main.c and move the
  832.    sti(); and claibrate_delay(); (near line 366) in
  833.    *front of* the #ifdef CONFIG_INET, instead of
  834.    after it.
  835.    
  836.    Please report the exact chip used by your ethercard,
  837.    and any success or failure you have. This driver is
  838.    still young, and I've gotten few reports.
  839.  
  840.    More information on AMD LANCE based Ethernet cards
  841.    can be found in section 5.08.
  842.  
  843.   AT1700
  844.    The Allied Telesis AT1700 series ethercards are based
  845.    on the Fujitsu MB86965. This chip uses a programmed
  846.    I/O interface, and a pair of fixed-size transmit
  847.    buffers. This allows small groups of packets to sent
  848.    be sent back-to-back, with a short pause while
  849.    switching buffers.
  850.    
  851.    A unique feature is the ability to drive 150ohm STP
  852.    (Shielded Twisted Pair) cable commonly installed for
  853.    Token Ring, in addition to 10baseT 100ohm UTP
  854.    (unshielded twisted pair).
  855.    
  856.    A mis-feature to watch out for is that the current
  857.    production version silently wires to DMA channel 5,
  858.    rendering it useless. No device driver will be
  859.    written using DMA if installing a second card into
  860.    the machine breaks both, and the only way to disable
  861.    the DMA is with a knife.
  862.    
  863.    The at1700 driver is included in the standard pl15
  864.    kernel source tree.
  865.    
  866. 2.08 Arcnet
  867.  
  868.  There is no Arcnet driver for Linux. Feel free to write a driver. With
  869.  the very low cost and better performance of ethernet, I expect that
  870.  most places will be giving away their Arcnet hardware for free,
  871.  resulting in a lot of home systems with Arcnet.
  872.  
  873.  An advantage of Arcnet is that all of the cards have identical
  874.  interfaces, so once a driver is available it will work for everyone.
  875.  
  876. 2.09 Digital / DEC
  877.  
  878.  Supported: DE200, DE210, DE202, DE100, DEPCA rev E
  879.  
  880.   As of linux v1.0, there is a driver included as standard
  881.   for these cards. It was written by David C. Davies.
  882.   There is documentation included in the source file
  883.   "depca.c", which includes info on how to use more than
  884.   one of these cards in a machine.
  885.  
  886.   If you have / want to use the pl15 kernel or older,
  887.   then you will have to use Peter Bauer's driver.
  888.   It can be found as a separate patch called depca-0.8.tar.gz.
  889.   You will have to un-comment the DEPCA line in "config.in"
  890.   after installing the patch. You can find the patch on
  891.   ftp.funet.fi, /pub/OS/Linux/BETA/depca/depca-0.8.tar.gz
  892.   This version resets the card upon close so that you can
  893.   use it with broken DOS drivers after a warm boot.
  894.  
  895.  
  896.  Unsupported: Digital Etherlink III
  897.  
  898.   Peter Bauer said that "the new etherlink III seems to
  899.   be a break: No official docu from DEC as far as today,
  900.   other (incompatible??) hardware used, and (no joke) (at least
  901.   for the first delivered cards) also a sharp knife necessary
  902.   to get the card working (needs cut of some irq lines ...)
  903.   As far as I know, lots of DEC Employees use Linux (at least
  904.   for hobby purposes) and the depca-driver, because its a
  905.   de-facto standard in DEC, so I encourage any DEC-employee
  906.   reading this to check wether my writing is true, and to
  907.   support sources of information about the etherworks-III."
  908.  
  909. 2.10 Intel Ethernet Cards
  910.  
  911.  Supported: Ether Express
  912.  
  913.   This card uses the intel i82586. (Surprise, huh?)
  914.   The driver is in the standard release of pl15.
  915.   However, you will have to uncomment the line in
  916.   "config.in" to use it. -- yes, this line is
  917.   commented out for a reason. The driver is still
  918.   in the testing phases, as of v1.0 as well.
  919.  
  920.   There is some technical information available on
  921.   the i82586 in section 5.06, and also in the
  922.   source code for the driver "eexpress.c". Don't
  923.   be afraid to read it. ;-)
  924.  
  925.   The rason is that the driver works well with slow machines,
  926.   but the i82586 occasionally hangs from the packet buffer
  927.   contention that a fast machine can cause. I'll have
  928.   to find a work-around before releasing the driver.
  929.   One reported hack fix is to change all of the outw()
  930.   calls to outw_p().
  931.  
  932.  
  933.   If you do try the driver please post or send a report. 
  934.   Include the kind of machine you are trying it with,
  935.   and how heavily loaded your network is.
  936.  
  937.  
  938. 2.11 PureData
  939.  
  940.  Supported: PDUC8028, PDI8023
  941.  
  942.   The PureData PDUC8028 and PDI8023 series of cards are reported
  943.   to work, thanks to special probe code contributed by Mike
  944.   Jagdis <jaggy@purplet.demon.co.uk>. The support is integrated
  945.   with the WD driver.
  946.  
  947. 2.12 Xircom
  948.  
  949.  Another group that won't release documentation. No cards
  950.  supported. Don't look for any support in the future unless
  951.  they release their programming information. And this is
  952.  highly unlikely, as they *forbid* you from even reverse-
  953.  engineering their drivers. If you are already stuck with one,
  954.  see if you can trade it off on some DOS (l)user. Read section
  955.  9.01 if you are bored.
  956.  
  957.  And if you just want to verify that this is the case, you can
  958.  reach Xircom at 1-800-874-7875 or +1-818-878-7600.
  959.  
  960. 2.13 Zenith
  961.  
  962.  The built-in Z-Note network adaptor is based on the Intel
  963.  i82593 using two DMA channels. There might be a driver for it
  964.  in mid 1994. See section 5.06 for more information.
  965.  Also note that the Z-Note is compatible with the IBM ThinkPad 300.
  966.  
  967. 2.14 Racal-Interlan
  968.  
  969.  Note: I have been told that the following two drivers are 
  970.  for patchlevel 11, and hence are a bit dated. The original
  971.  author is Michael Hipp, and can be reached at the following addr:
  972.   zxmhp01@student.uni-tuebingen.de
  973.  
  974.  NI52**
  975.  
  976.  There is an alpha driver for the NI5210 floating about.
  977.  (last seen on tsx-11.mit.edu /pub/linux/ALPHA/ni/ni52.tar.gz)
  978.  This card also uses one of the Intel chips. See section
  979.  5.06 for more information.
  980.  
  981.  NI65**
  982.  
  983.  There is also a driver for the LANCE based NI6510, and it
  984.  can be found in the same place as the NI5210 driver above.
  985.  I am not sure how much work it would be to hack the current
  986.  LANCE driver in the kernel to support this card. If anyone
  987.  has done so, let me know.
  988.  
  989. 2.15 AMD LANCE (79C960)
  990.  
  991.  There really is no AMD ethernet card. You are probably reading this
  992.  because the only markings you could find on your card said AMD
  993.  and the above number. The above number refers to a chip from AMD
  994.  that is the heart of many ethernet cards. See the section on the
  995.  Allied Telesis AT1500, the NE1500/2100 and the information in
  996.  section 5.08. Chances are that the existing LANCE driver will work
  997.  with all AMD LANCE based cards. (...except perhaps the above
  998.  mentioned NI6510 ???)
  999.  
  1000. 2.16 AT-Lan-Tec / RealTek Pocket adaptor
  1001.  
  1002.  This is a generic, low-cost OEM pocket adaptor being sold by
  1003.  AT-Lan-Tec, and (likely) a number of other suppliers. A
  1004.  driver for it is included in the standard pl15 kernel.
  1005.  Note that there is substantial information contained in the
  1006.  driver source file "atp.c" which presently lives in ./drivers/net/
  1007.  BTW, the adaptor (AEP-100L) has both 10baseT and BNC connections!
  1008.  You can reach AT-Lan-Tec at 1-301-948-7070. Ask for the model
  1009.  that works with Linux, or ask for "Vincent Bono" in tech support.
  1010.  In the Netherlands a compatible adaptor is sold under the name SHI-TEC
  1011.  PE-NET/CT, and sells for about $125. The vendor was Megasellers.
  1012.  They state that they do not sell to private persons, but I just
  1013.  gave them the name of my home institute. No questions asked.
  1014.  They are: Megasellers, Vianen, The Netherlands. They always
  1015.  advertise in Dutch computer magazines. In Germany, a similar
  1016.  adaptor comes as a no-brand-name product. Prolan 890b, no
  1017.  brand on the casing, only a roman II. Resellers can get a price
  1018.  of about $130, including a small wall transformer for the power.
  1019.  
  1020.  Physical Description
  1021.  
  1022.  The adaptor is "normal size" for the product class, about 57mm wide,
  1023.  22mm high tapering to 15mm high at the DB25 connector, and 105mm long
  1024.  (120mm including the BNC socket). It's switchable between the RJ45
  1025.  and BNC jacks with a small slide switch positioned between the two:
  1026.  a very intuitive design.
  1027.  
  1028.  It's powered by a lightweight 5V "wall brick" adaptor that terminates
  1029.  in a standard 5.0mm power connector. I measured an unconnected
  1030.  quiescent power draw of 102ma for BNC and 84ma for 10baseT. I hooked
  1031.  the pocket adaptor up to my home thinnet and started FTPing a large
  1032.  file. The power measurements were:
  1033.  
  1034.   idle, connected  99ma @ 5.1V
  1035.   active, connected 107ma @ 5.1V
  1036.  
  1037.  This was measured using a Fluke 8026B true-RMS multimeter, so I'm
  1038.  pretty confident the numbers are good. This power draw is low enough
  1039.  that you could buy or build a cable to take the 5V directly from the  
  1040.  keyboard/mouse port available on many laptops. (Bonus points here
  1041.  for using a standardized power connector instead of proprietary one.)
  1042.  
  1043. 2.17 Ansel
  1044.  
  1045.  Supported: AC3200 EISA
  1046.  
  1047.   This driver is not included in the pl15 kernel. To
  1048.   *alpha* test it, get the files ac3200.[c,h] from
  1049.   where you usually get alpha drivers (see the FAQ in
  1050.   this document if you dont know) and uncomment the
  1051.   line in config.in for the ac3200. If you use it,
  1052.   please let me know how things work out.
  1053.  
  1054. 2.18 DFI
  1055.  
  1056.  Supported: DFINET-300 (NE1000) and DFINET-400 (NE2000)
  1057.  
  1058.   These cards are now detected (as of pl15) thanks to
  1059.   Eberhard Moenkeberg <emoenke@gwdg.de> who noted that
  1060.   they use "DFI" in the first 3 bytes of the prom, instead
  1061.   of using 0x57 in bytes 14 and 15, which is what all the
  1062.   NE1000 and NE2000 cards use.
  1063.  
  1064. 3. Clones of popular Ethernet cards.
  1065.  
  1066.  Due to the popular design of some cards, different companies will
  1067.  make "clones" or replicas of the original card. However, one must
  1068.  be careful, as some of these clones are not 100% compatible, and
  1069.  can be troublesome. Some common problems with "not-quite-clones"
  1070.  are noted in the question and answer section of this document.
  1071.  
  1072.  Also note that if your card isn't mentioned here, that really
  1073.  means nothing. Chances are that even if it is only a half decent
  1074.  clone of the original, then it will still work.
  1075.  
  1076. 3.1 WD80x3 clones
  1077.  
  1078.  The following clones are reported to work with the standard
  1079.  WD80x3 driver:
  1080.  
  1081.  AT-LAN-TEC 8013
  1082.  PureData (not a 8013 clone, but the 8013 driver has special code)
  1083.  LANNET LEC-45
  1084.  PE-8013 (WD-8013 Compatible)
  1085.  
  1086. 3.2 NE2000 clones
  1087.  
  1088.  The following clones are reported to work with the standard
  1089.  NE2000 driver:
  1090.  
  1091.  Accton NE2000 (might not get detected at boot, see section 6)
  1092.  Alta Combo NE2000 clone
  1093.  Aritsoft LANtastic AE-2 (OK, but has flawed error-reporting registers)
  1094.  Asante Etherpak 2001/2003
  1095.  AT-LAN-TEC NE2000 clone (uses Winbond chip that traps SCSI drivers)
  1096.  Cabletron products: E10**, E10**-x, E20**, E20**-x
  1097.  Cnet UTP 10baseT (NE 2000 emulation)
  1098.  D-Link Ethernet II (bad clones, but the driver checks for them)
  1099.  4-Dimension FD0490 EtherBoard16
  1100.  LTC E-NET/16 P/N: 8300-200-002 (lipka@lip.hanse.de)
  1101.  Network Solutions HE-203
  1102.  SIIG Inc E-Lan/200 (NE 2000 comp.)
  1103.  SVEC 4 Dimension Ethernet
  1104.  
  1105. 4. Cables, coax, twisted pairs etc.
  1106.  
  1107.  If you are starting a network from scratch, it's considerably less
  1108.  expensive to use thin ethernet, RG58 co-ax cable with BNC connectors,
  1109.  than old-fashioned thick ethernet, RG-5 cable with N connectors, or
  1110.  10baseT, twisted pair telco-style cables with RJ-45 eight wire "phone"
  1111.  connectors.
  1112.  
  1113. 4.01 Thin Ethernet (thinnet)
  1114.  
  1115.  Thin ethernet is the "ether of choice". The cable is inexpensive. If
  1116.  you are making your own cables solid-core RG58A is $0.09/ft. and
  1117.  stranded RG58AU is $0.15/ft. Twist-on BNC connectors are < $2 ea.,
  1118.  and other misc. pieces are similarly inexpensive. It is essential
  1119.  that you properly terminate each end of the cable with 50 ohm
  1120.  terminators, so budget $2 ea. for a pair. It's also vital that
  1121.  your cable have no "stubs" -- the 'T' connectors must be attached
  1122.  directly to the ethercards. The only drawback is that if you have
  1123.  a big loop of machines connected together, and some bonehead breaks
  1124.  the loop by taking one cable off the side of his tee, the whole
  1125.  network goes down because it sees an infinite impedance (open
  1126.  circuit) instead of the required 50 ohm termination. Note that
  1127.  you can remove the tee piece from the card itself without killing
  1128.  the whole subnet, as long as you don't remove the cables from the
  1129.  tee itself. Of course this will disturb the machine that you
  1130.  pull the actual tee off of. 8-) And if you are doing a small
  1131.  network of two machines, you *still* need the tees and the 50 ohm
  1132.  terminators -- you *can't* just cable them together!
  1133.  
  1134.  
  1135. 4.02 Twisted pair
  1136.  
  1137.  Twisted pair networks require active hubs, which start around $200,
  1138.  and the raw cable cost can actually be higher than thinnet. They are
  1139.  usually sold using the claim that you can use your existing telephone
  1140.  wiring, but it's a rare installation where that turns out to be the
  1141.  case. The claim that you can upgrade to higher speeds is also
  1142.  suspect, as most proposed schemes use higher-grade (read $$) cable and
  1143.  more sophisticated termination ($$$) than you would likely install on
  1144.  speculation. New gizmos are floating around which allow you to
  1145.  daisy-chain machines together, and the like. For example,
  1146.  Falleron sells EtherWave adaptors and transceivers. This device
  1147.  allows multiple 10baseT devices to be daisy-chained. They also
  1148.  sell a 3c509 clone that includes the EtherWave transceiver.
  1149.  The drawback is that it's more expensive and less reliable than a 
  1150.  cheap ($100-$150) mini-hub and another ethercard. IMO, you should
  1151.  either go for the hub approach or switch over to 10base2 thinnet.
  1152.  
  1153.  On the other hand, hubs are rapidly dropping in price, all 100Mb/sec
  1154.  ethernet proposals use twisted pair, and most new business
  1155.  installations use twisted pair. (This is probably to avoid the
  1156.  problem with idiots messing with the BNC's as described above.)
  1157.  
  1158.  If you are only connecting two machines, it is possible to avoid
  1159.  using a hub, by swapping the Rx and Tx pairs (1-2 and 3-6).
  1160.  
  1161.  Also, Russ Nelson adds that "New installations should use Category 5
  1162.  wiring. Anything else is a waste of your installer's time, as
  1163.  100Base-whatever is going to require Cat 5."
  1164.  
  1165. 4.03 Thick Ethernet
  1166.  
  1167.  Thick ethernet is mostly obsolete, and is usually used only to remain
  1168.  compatible with an existing implementation. You can stretch the rules
  1169.  and connect short spans of thick and thin ethernet together with a
  1170.  passive $3 N-to-BNC connector, and that's often the best solution to
  1171.  expanding an existing thicknet. A correct (but expensive) solution is
  1172.  to use a repeater in this case.
  1173.  
  1174.  
  1175. 5 Technical information.
  1176.  
  1177.  For those who want to play with the present drivers, or try to make
  1178.  up their own driver for a card that is presently unsupported, this
  1179.  information should be useful. If you do not fall into this category,
  1180.  then perhaps you will want to skip this section.
  1181.  
  1182. 5.01 Probed addresses
  1183.  
  1184.  While trying to determine what ethernet card is there, the following
  1185.  addresses are autoprobed, assuming the type and specs of the card
  1186.  have not been set in the kernel. As of 0.99pl12, doing a "make config"
  1187.  will ask what cards are to be supported. The file names below are
  1188.  in /usr/src/linux/drivers/net/
  1189.  ----------------------------------------------------------------
  1190.  wd.c:  0x300, 0x280, 0x380, 0x240
  1191.  3c501.c  0x280
  1192.  3c503.c: 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2a0, 0x2e0
  1193.  3c507.c: 0x300, 0x320, 0x340, 0x280
  1194.  3c509.c: <Special "ID Port" probe>
  1195.  at1700.c: 0x300, 0x280, 0x380, 0x320, 0x340, 0x260, 0x2a0, 0x240
  1196.  atp.c:  0x378, 0x278, 0x3bc
  1197.  depca.c  0x300, 0x200
  1198.  d_link.c: 0x378
  1199.  ne.c:  0x300, 0x280, 0x320, 0x340, 0x360
  1200.  hp.c:  0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240
  1201.  lance.c: 0x300, 0x320, 0x340, 0x360
  1202.  smc-ultra.c: 0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380
  1203.  eexpress.c: 0x300, 0x270, 0x320, 0x340
  1204.  3c509.c: <Special "ID Port" probe>
  1205.  ----------------------------------------------------------------
  1206.  There are some NE2000 clone ethercards out there that are waiting black
  1207.  holes for autoprobe drivers. While many NE2000 clones are
  1208.  safe until they are enabled, some can't be reset to a safe mode.
  1209.  These dangerous ethercards will hang any I/O access to their
  1210.  "dataports". The typical dangerous locations are:
  1211.  
  1212.  Ethercard jumpered base     Dangerous locations (base + 0x10 - 0x1f)
  1213.   0x300 *    0x310-0x317
  1214.   0x320    0x330-0x337
  1215.   0x340    0x350-0x357
  1216.   0x360    0x370-0x377
  1217.  
  1218.  * The 0x300 location is the traditional place to put an ethercard, but
  1219.  it's also a popular place to put other devices (often SCSI
  1220.  controllers). The 0x320 location is often the next one chosen, but
  1221.  that's bad for for the AHA1542 driver probe. The 0x360 location is
  1222.  bad, because it conflicts with the parallel port at 0x378.
  1223.  
  1224.  To avoid these lurking ethercard, here are the things you can do:
  1225.  
  1226.  o Probe for the device's BIOS in memory space. This is easy
  1227.    and always safe, but it only works for cards that always have
  1228.    BIOSes, like primary SCSI controllers.
  1229.  
  1230.  o Avoid probing any of the above locations until you think
  1231.    you've located your device. The NE2000 clones have a reset range
  1232.    from <base>+0x18 to <base>+0x1f that will read as 0xff, so probe
  1233.    there first if possible. It's also safe to probe in the 8390
  1234.    space at <base>+0x00 - <base>+0x0f, but that area will return
  1235.    quasi-random values
  1236.  
  1237.  o If you must probe in the dangerous range, for instance if your
  1238.    target device has only a few port locations, first check that
  1239.    there isn't an NE2000 there. You can see how to do this by
  1240.    looking at the probe code in /usr/src/linux/net/inet/ne.c
  1241.  
  1242.  In other news, I've written the code for the I/O port registrar.
  1243.  Peter MacDonald and I have been intensely discussing this, and I think
  1244.  our current scheme has the necessary functionality with minimal kernel
  1245.  size impact. (The implementation involved rewriting the bitmap ops in
  1246.  kernel/ioport.c:ioperm() so that most code could be shared.)
  1247.  
  1248.  Here is the current "blurb". As usual comments are welcome. Please
  1249.  keep them substantial and constructive (we've already talked about
  1250.  changing the name from "reserve=" to "noprobe=").
  1251.  
  1252.  ==================
  1253.  
  1254.  Boot-Time Parameters: "reserve="
  1255.  
  1256.  In some machines it may be necessary to prevent device drivers from
  1257.  checking for devices (auto-probing) in a specific region. This may be
  1258.  because of poorly designed hardware that causes the boot to "freeze"
  1259.  (such as some ethercards), hardware that is mistakenly identified,
  1260.  hardware whose state is changed by an earlier probe, or merely
  1261.  hardware you don't want the kernel to initialize.
  1262.  
  1263.  The "reserve" boot-time argument addresses this problem by specifying
  1264.  an I/O port region that shouldn't be probed. That region is reserved
  1265.  in the kernel's port registration table as if a device has already
  1266.  been found in that region. Note that this mechanism shouldn't be
  1267.  necessary on most machine, only when there is a problem or special
  1268.  case.
  1269.  
  1270.  The boot-line syntax is
  1271.  
  1272.    lilo-prompt: linux-image reserve=[<port>,<size>,<port>,<size>...]
  1273.  
  1274.  As usual with boot-time specifiers there is an 11 parameter limit, thus
  1275.  you can only specify 5 reserved regions per "reserve" keyword.
  1276.  Multiple "reserve" specifiers will work if you have an usually
  1277.  complicated request.
  1278.  
  1279.  If you specify a "reserve" region to protect a specific device, you
  1280.  must generally specify an explicit probe for that device. Most
  1281.  drivers ignore the port registration table if they are given an
  1282.  explicit address.
  1283.  
  1284. 5.02 Skeleton / prototype driver
  1285.  
  1286.  OK. So you have decided that you want to write a driver for the
  1287.  Foobar Ethernet card, as you have the programming information,
  1288.  and it hasn't been done yet. (...these are the two main require-
  1289.  ments ;-) You can use the skeleton network driver that is provided
  1290.  with the Linux kernel source tree. It can be found in the file
  1291.  /usr/src/linux/drivers/net/skeleton.c as of 0.99pl15, and later.
  1292.  
  1293.  It's also very useful to look at the Crynwr (nee Clarkson) driver
  1294.  for your target ethercard, if it's available. Russ Nelson
  1295.  <nelson@crynwr.com> has been actively updating and writing these,
  1296.  and he has been very helpful with his code reviews of the current
  1297.  Linux drivers.
  1298.  
  1299. 5.03 Driver interface to the kernel
  1300.  
  1301.  Here are some notes that may help when trying to figure out what
  1302.  the code in the driver segments is doing, or perhaps what it is
  1303.  supposed to be doing.
  1304.  
  1305.  =====================================================
  1306.  
  1307.  int ethif_init(struct device *dev)
  1308.  {
  1309.      ...
  1310.   dev->send_packet = &ei_send_packet;
  1311.   dev->open = &ei_open;
  1312.   dev->stop = &ei_close;
  1313.   dev->hard_start_xmit = &ei_start_xmit;
  1314.   ...
  1315.  }
  1316.  
  1317.  int ethif_init(struct device *dev)
  1318.  
  1319.  This function is put into the device structure in Space.c. It is
  1320.  called only at boot time, and returns '0' iff the ethercard 'dev'
  1321.  exists.
  1322.  
  1323.  =====================================================
  1324.  
  1325.  static int ei_open(struct device *dev)
  1326.  static int ei_close(struct device *dev)
  1327.  
  1328.  This routine opens and initializes the board in response to an
  1329.  socket ioctl() usually called by 'config' or 'ifconfig'. It is
  1330.  commonly stuffed into the 'struct device' by ethif_init().
  1331.  
  1332.  The inverse routine is ei_close(), which should shut down the
  1333.  ethercard, free the IRQs and DMA channels if the hardware permits,
  1334.  and turn off anything that will save power (like the transceiver).
  1335.  
  1336.  (Note: As of NET-2, the relevant program is '/etc/ifconfig' - and
  1337.  the device *can* be turned off or on via passing 'up' or 'down'
  1338.  to 'ifconfig' from the command line with the device name.)
  1339.  
  1340.  =====================================================
  1341.  
  1342.  static int ei_start_xmit(struct sk_buff *skb, struct device *dev)
  1343.   dev->hard_start_xmit = &ei_start_xmit;
  1344.  
  1345.  This routine puts packets to be transmitted into the hardware. It
  1346.  is usually stuffed into the 'struct device' by ethif_init().
  1347.  
  1348.  When the hardware can't accept additional packets it should set
  1349.  the dev->tbusy flag. When additional room is available, usually
  1350.  during a transmit-complete interrupt, dev->tbusy should be cleared
  1351.  and the higher levels informed with mark_bh(INET_BH).
  1352.  [[Note: pre0.99.4 kernels didn't use this interface for all packets.]]
  1353.  
  1354.  =====================================================
  1355.  
  1356.  ...
  1357.      if (dev_rint(buffer, length, is_skb ? IN_SKBUFF : 0, dev))
  1358.      stats->rx_dropped++;
  1359.  ...
  1360.  A received packet is passed to the higher levels using dev_rint().
  1361.  If the unadorned packet data in a memory buffer, dev_rint will copy
  1362.  it into a 'skbuff' for you. Otherwise a new skbuff should be
  1363.  kmalloc()ed, filled, and passed to dev_rint() with the IN_SKBUFF flag.
  1364.  
  1365.  =====================================================
  1366.  
  1367. 5.04 Interrupts and Linux
  1368.  
  1369.  There are two kinds of interrupt handlers in Linux:
  1370.  fast ones and slow ones. You decide what kind you are installing by
  1371.  the flags you pass to irqaction(). The fast ones, such as the serial
  1372.  interrupt handler, run with _all_ interrupts disabled. The normal
  1373.  interrupt handlers, such as the one for ethercard drivers, runs with
  1374.  other interrupts enabled.
  1375.  
  1376.  There is a two-level interrupt structure. The "fast" part handles the
  1377.  device register, removes the packets, and perhaps sets a flag.  After
  1378.  it is done, and interrupts are re-enabled, the slow part is run if the
  1379.  flag is set.
  1380.  
  1381.  The flag between the two parts is set by:
  1382.   mark_bh(INET_BH);
  1383.  
  1384.  Usually this flag is set within dev_rint() during a received-packet
  1385.  interrupt, and set directly by the device driver during a
  1386.  transmit-complete interrupt.
  1387.  
  1388.  You might wonder why all interrupt handlers cannot run in
  1389.  "normal mode" with other interrupts enabled. Ross Biro uses this
  1390.  scenario to illustrate the problem:
  1391.   o You get a serial interrupt, and start processing it.
  1392.     The serial interrupt is now masked.
  1393.   o You get a network interrupt, and you start transferring
  1394.     a maximum-sized 1500 byte packet from the card.
  1395.   o Another character comes in, but this time the interrupts
  1396.     are masked!
  1397.  
  1398.  The "fast" interrupt structure solves this problem by allowing
  1399.  bounded-time interrupt handlers to run without the risk of leaving
  1400.  their interrupt lines masked by another interrupt request.
  1401.  
  1402.  There is an additional distinction between fast and slow interrupt
  1403.  handlers -- the arguments passed to the handler. A "slow" handler is
  1404.  defined as
  1405.  
  1406.   static void
  1407.   handle_interrupt(int reg_ptr)
  1408.   {
  1409.       int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
  1410.       struct device *dev = irq2dev_map[irq];
  1411.   ...
  1412.  
  1413.  While a fast handler gets the interrupt number directly
  1414.  
  1415.   static void
  1416.   handle_fast_interrupt(int irq)
  1417.   {
  1418.   ...
  1419.  
  1420.  A final aspect of network performance is latency. The only board
  1421.  that really addresses this is the 3c509, which allows a predictive
  1422.  interrupt to be posted. It provides an interrupt response timer so
  1423.  that the driver can fine-tune how early an interrupt is generated.
  1424.  
  1425.  Alan Cox has some advice for anyone wanting to write drivers
  1426.  that are to be used with pl14 kernels and newer. He says:
  1427.  
  1428.  "Any driver intended for pl14 should use the new alloc_skb() and
  1429.  kfree_skbmem() functions rather than using kmalloc() to obtain an
  1430.  sk_buff. The new pl14 skeleton does this correctly. For drivers
  1431.  wishing to remain compatible with both sets the define
  1432.  'HAVE_ALLOC_SKB' indicates these functions must be used.
  1433.  
  1434.  In essence replace
  1435.  
  1436.   skb=(struct sk_buff *)kmalloc(size)
  1437.  with
  1438.  
  1439.   skb=alloc_skb(size)
  1440.  
  1441.  and
  1442.  
  1443.   kfree_s(skb,size)
  1444.  
  1445.  with
  1446.  
  1447.   kfree_skbmem(skb,size) /* Only sk_buff memory though */
  1448.  
  1449.  Any questions should I guess be directed to me since I made the change.
  1450.  This is a change to allow tracking of sk_buff's and sanity checks on
  1451.  buffers and stack behaviour. If a driver produces the message
  1452.  'File: ??? Line: ??? passed a non skb!' then it is probable the
  1453.  driver is not using the new sk_buff allocators."
  1454.  
  1455.  
  1456. 5.05 Programmed I/O vs. shared mem. vs. slave/master DMA
  1457.  
  1458.  Ethernet is 10Mbs. (Don't be pedantic, 3Mbs and 100Mbs don't count.)
  1459.  If you can already send and receive back-to-back packets, you just
  1460.  can't put more bits over the wire. Every modern ethercard can receive
  1461.  back-to-back packets. The Linux DP8390 drivers come pretty close to
  1462.  sending back-to-back packets (depending on the current interrupt
  1463.  latency) and the 3c509 and AT1500 hardware has no problem at all
  1464.  automatically sending back-to-back packets.
  1465.  
  1466.  The ISA bus can do 5.3MB/sec (42Mb/sec), which sounds like more than
  1467.  enough. You can use that bandwidth in several ways:
  1468.  
  1469.  Programmed I/O
  1470.  ==============
  1471.    Pro: Doesn't use any constrained system resources,
  1472.         just a few I/O registers, and has no 16M limit.
  1473.    Con: Usually the slowest transfer rate, the CPU is waiting
  1474.         the whole time, and interleaved packet access is usually
  1475.         difficult to impossible.
  1476.  
  1477.  Shared memory
  1478.  =============
  1479.    Pro: Simple, faster than programmed I/O, and allows random
  1480.         access to packets.
  1481.    Con: Uses up memory space (a big one for DOS users, only a minor
  1482.         issue under Linux), and it still ties up the CPU.
  1483.  
  1484.  Slave (normal) DMA
  1485.  ==================
  1486.    Pro: Frees up the CPU during the actual data transfer.
  1487.    Con: Checking boundary conditions, allocating contiguous buffers,
  1488.         and programming the DMA registers makes it the slowest
  1489.         of all techniques.  It also uses up a scarce DMA
  1490.         channel, and requires aligned low memory buffers.
  1491.  
  1492.  Master (bus-master) DMA
  1493.  =======================
  1494.    Pro: Frees up the CPU during the data transfer, can string together
  1495.         buffers, can require little or no CPU time lost on the
  1496.         ISA bus.
  1497.    Con: Requires low-memory buffers and a DMA channel. Any
  1498.         bus-master will have problems with other bus-masters that
  1499.         are bus-hogs, such as some primitive SCSI adaptors. A few
  1500.         badly-designed motherboard chipsets have problems with
  1501.         bus-masters. And a reason for not using *any* type of
  1502.         DMA device is using a Cyrix 486 processor designed for
  1503.         plug-in replacement of a 386: these processors must
  1504.         flush their cache with each DMA cycle.
  1505.  
  1506. ---End of part 1/2---
  1507.