home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / ETHERNET.GZ / ETHERNET
Encoding:
Text File  |  1996-03-14  |  169.5 KB  |  3,954 lines

  1.   Linux Ethernet-Howto
  2.   Paul Gortmaker, Editor.
  3.   v2.5, 18 November 1995
  4.  
  5.   This is the Ethernet-Howto, which is a compilation of information
  6.   about which ethernet devices can be used for Linux, and how to set
  7.   them up. It hopefully answers all the frequently asked questions about
  8.   using ethernet cards with Linux. Note that this Howto is focused on
  9.   the hardware and low level driver aspect of the ethernet cards, and
  10.   does not cover the software end of things. See the NET2-Howto for that
  11.   stuff.
  12.  
  13.   1.  Introduction
  14.  
  15.   The Ethernet-Howto covers what cards you should and shouldn't buy; how
  16.   to set them up, how to run more than one, and other common problems
  17.   and questions. It contains detailed information on the current level
  18.   of support for all of the most common ethernet cards available.  It
  19.   does not cover the software end of things, as that is covered in the
  20.   NET-2 Howto. Also note that general non-Linux specific questions about
  21.   Ethernet are not (or at least they should not be) answered here. For
  22.   those types of questions, see the excellent amount of information in
  23.   the comp.dcom.lans.ethernet FAQ. You can FTP it from dorm.rutgers.edu
  24.   in the directory /pub/novell/info_and_docs/
  25.  
  26.   This present revision covers distribution kernels up to and including
  27.   v1.2.13. Information pertaining to development kernels up to version
  28.   1.3.42 is also documented.
  29.  
  30.   The Ethernet-Howto is edited and maintained by:
  31.  
  32.        Paul Gortmaker, Paul.Gortmaker@anu.edu.au
  33.  
  34.   The primary source of the information for the initial Ethernet-Howto
  35.   was from:
  36.  
  37.        Donald J. Becker, becker@cesdis.gsfc.nasa.gov
  38.  
  39.   who we have to thank for writing the vast majority of ethernet card
  40.   drivers that are presently available for Linux. He also is the
  41.   original author of the NFS server too. Thanks Donald! We owe ya one!
  42.   :-)
  43.  
  44.   Net-surfers may wish to check out the following URL:
  45.  
  46.   Donald Becker
  47.   <http://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html>
  48.  
  49.   1.1.  New Versions of this Document
  50.  
  51.   New versions of this document can be retrieved via anonymous FTP from:
  52.  
  53.   Sunsite HOWTO Archive <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/>
  54.  
  55.   and various Linux ftp mirror sites. Updates will be made as new
  56.   information and/or drivers becomes available. If this copy that you
  57.   are reading is more than 4 months old, it is either out of date, or it
  58.   means that I have been lazy and haven't updated it.  This document was
  59.   produced by using the SGML system that was specifically set up for the
  60.   Linux Howto project, and there are various output formats available,
  61.   including, postscript, dvi, ascii, html, and soon TeXinfo.
  62.   I would recommend viewing it in the html (via a WWW browser) or the
  63.   Postscript/dvi format. Both of these contain cross-references that are
  64.   lost in the ascii translation.
  65.  
  66.   If you want to get the official copy off sunsite, here is URL.
  67.  
  68.   Ethernet-HOWTO <http://sunsite.unc.edu/mdw/HOWTO/Ethernet-HOWTO.html>
  69.  
  70.   If minor additions and changes have been made, you can view the latest
  71.   working copy from this URL.
  72.  
  73.   Working Copy <http://rsphy1.anu.edu.au/~gpg109/Ethernet-HOWTO.html>
  74.  
  75.   1.2.  Using the Ethernet-Howto
  76.  
  77.   As this guide is getting bigger and bigger, you probably don't want to
  78.   spend the rest of your afternoon reading the whole thing. And you
  79.   don't have to read it all. If you haven't got an ethernet card, then
  80.   you will want to start with ``What card should I buy...''  to see what
  81.   you should buy, and what you should avoid. If you have already got an
  82.   ethernet card, but are not sure if you can use it with Linux, then you
  83.   will want to read ``Vendor Specific...''  which contains specific
  84.   information on each manufacturer, and their cards. If you are having
  85.   trouble with your card, then you will want to read the specific
  86.   information about your card mentioned above, and the troubleshooting
  87.   information in ``the FAQ section''.  If you are interested in some of
  88.   the technical aspects of the device drivers, then you can find that
  89.   information in ``Technical Information''
  90.  
  91.   1.3.  Disclaimer and Copyright
  92.  
  93.   This document is not gospel. However, it is probably the most up to
  94.   date info that you will be able to find. Nobody is responsible for
  95.   what happens to your hardware but yourself. If your ethercard or any
  96.   other hardware goes up in smoke (...nearly impossible!)  we take no
  97.   responsibility. ie. THE AUTHORS ARE NOT RESPONSIBLE FOR ANY DAMAGES
  98.   INCURRED DUE TO ACTIONS TAKEN BASED ON THE INFORMATION INCLUDED IN
  99.   THIS DOCUMENT.
  100.  
  101.   This document is Copyright (c) 1993, 1994, 1995 by Donald Becker and
  102.   Paul Gortmaker. Permission is granted to make and distribute verbatim
  103.   copies of this manual provided the copyright notice and this
  104.   permission notice are preserved on all copies.
  105.  
  106.   Permission is granted to copy and distribute modified versions of this
  107.   document under the conditions for verbatim copying, provided that this
  108.   copyright notice is included exactly as in the original, and that the
  109.   entire resulting derived work is distributed under the terms of a
  110.   permission notice identical to this one.
  111.  
  112.   Permission is granted to copy and distribute translations of this
  113.   document into another language, under the above conditions for
  114.   modified versions.
  115.  
  116.   If you are intending to incorporate this document into a published
  117.   work, please contact me, and I will make an effort to ensure that you
  118.   have the most up to date information available. In the past, out of
  119.   date versions of the Linux howto documents have been published, which
  120.   caused the developers undue grief from being plagued with questions
  121.   that were already answered in the up to date versions.
  122.  
  123.   2.  What card should I buy for Linux?
  124.  
  125.   The answer to this question depends heavily on exactly what you intend
  126.   on doing with your net connection, and how much traffic it will see.
  127.  
  128.   If you only expect a single user to be doing the occasional ftp
  129.   session or WWW connection, then an old 8 bit wd8003 card will keep you
  130.   happy.
  131.  
  132.   If you intend to set up a server, and you require the CPU overhead of
  133.   Rx'ing and Tx'ing ether packets to be kept at a minimum, you probably
  134.   want to look at one of the newer PCI cards with the DEC 21040 chip, or
  135.   the AMD PCnet-PCI chip.
  136.  
  137.   If you fall somewhere in the middle of the above, then any one of the
  138.   16 bit ISA cards with stable drivers will do the job for you.
  139.  
  140.   2.1.  So What Drivers are Stable?
  141.  
  142.   Of the 16 bit ISA cards, the following drivers are very mature, and
  143.   you shouldn't have any problems if you buy a card that uses these
  144.   drivers.
  145.  
  146.   SMC-Ultra/EtherEZ, WD80x3, 3c509, 3c503/16, Lance, NE2000.
  147.  
  148.   This is not to say that all the other drivers are unstable.  It just
  149.   happens that the above are the oldest and most used of all the linux
  150.   drivers, making them the safest choice.
  151.  
  152.   Note that some el-cheapo motherboards can have trouble with the bus-
  153.   mastering that the lance cards do, and some el-cheapo NE2000 clones
  154.   can have trouble getting detected at boot.
  155.  
  156.   As for PCI cards, the PCnet-PCI cards that use the lance driver are a
  157.   safe choice (except for the Boca cards as they have hardware flaws).
  158.   The Allied Telsyn AT2450 is a PCnet-PCI implementation that is known
  159.   to work well.
  160.  
  161.   The DEC 21040 `tulip' driver and the 3c59x `vortex' driver are
  162.   relatively new drivers, but have proven themselves to be quite stable
  163.   already. (The newer 21041 based cards may be slightly problematic at
  164.   the moment, but this will no doubt be resolved quickly.)
  165.  
  166.   2.2.  Eight bit vs 16 bit Cards
  167.  
  168.   You probably can't buy a new 8 bit ISA ethercard anymore, but you will
  169.   find lots of them turning up at computer swap meets and the like for
  170.   the next few years, at very low prices.  This will make them popular
  171.   for ``home-ethernet'' systems.
  172.  
  173.   Some 8 bit cards that will provide adequate performance for light to
  174.   average use are the wd8003, the 3c503 and the ne1000.  The 3c501
  175.   provides poor performance, and these poor 10 year old relics of the XT
  176.   days should be avoided.
  177.  
  178.   The 8 bit data path doesn't hurt performance that much, as you can
  179.   still expect to get about 500 to 800kB/s ftp download speed to an 8
  180.   bit wd8003 card (on a fast ISA bus) from a fast host.  And if most of
  181.   your net-traffic is going to remote sites, then the bottleneck in the
  182.   path will be elsewhere, and the only speed difference you will notice
  183.   is during net activity on your local subnet.
  184.   2.3.  32 Bit / VLB / PCI Ethernet Cards
  185.  
  186.   There aren't many 32 bit ethercard device drivers because there aren't
  187.   that many 32 bit ethercards.  There aren't many 32 bit ethercards out
  188.   there because a 10Mbs network doesn't justify spending the 5x price
  189.   increment for the 32 bit interface. (For a 100Mbs network, it is a
  190.   different story though.)
  191.  
  192.   See ``Programmed I/O vs. ...'' as to why having an ethercard on an
  193.   8MHz ISA bus is really not a bottleneck. Even though having the
  194.   ethercard on a fast bus won't necessarily mean faster transfers, it
  195.   will usually mean reduced CPU overhead, which is good for multi-user
  196.   systems.
  197.  
  198.   AMD has the 32 bit PCnet-VLB and PCnet-PCI chips.  See ``AMD
  199.   PCnet-32'' for info on the 32 bit versions of the LANCE / PCnet-ISA
  200.   chip.
  201.  
  202.   The DEC 21040 PCI chip is another option (see ``DEC 21040'') for
  203.   power-users.  Many manufacturers produce cards that use this chip.
  204.  
  205.   3Com's `Vortex' PCI cards are also another option, and the price is
  206.   quite cheap if you can get one under their evaluation deal while it
  207.   lasts.  (see ``3c590/3c595'')
  208.  
  209.   2.4.  Available 100Mbs Cards and Drivers
  210.  
  211.   The present list of supported 100Mbs hardware is as follows: cards
  212.   with the DEC 21140 chip; the 3c595 Vortex card; and the HP 100VG ANY-
  213.   LAN. The drivers for the first two are quite stable, but feedback on
  214.   the HP driver has been low so far as it has only been around since
  215.   early 1.3.x kernels.
  216.  
  217.   The EtherExpressPro10/100 is not presently supported.  Getting
  218.   documentation out of intel is difficult to impossible, which is the
  219.   main reason.
  220.  
  221.   The 21140 100Base-? chip is supported with the same driver as its
  222.   10Mbs counterpart, the 21040. SMC's 100Mbs EtherPower PCI card uses
  223.   this chip. As with the 21040, you have a choice of two drivers to pick
  224.   from.
  225.  
  226.   Also have a look at the information on Donald's WWW site, at the
  227.   following URL:
  228.  
  229.   100Mbs Ethernet <http://cesdis.gsfc.nasa.gov/linux/misc/100mbs.html>
  230.  
  231.   Donald has been doing most of his work with the SMC EtherPower-10/100
  232.   cards, and reports getting about 4.6MB/s application to application
  233.   with TCP on P5-100 Triton machines.
  234.  
  235.   (See ``3c595'' and ``DEC 21140'' for more details.)
  236.  
  237.   For 100VG information, see Donald's 100VG Page
  238.   <http://cesdis.gsfc.nasa.gov/linux/drivers/100vg.html>
  239.  
  240.   You may also be interested in looking at:
  241.  
  242.   Dan Kegel's Fast Ethernet Page <http://alumni.caltech.edu/~dank/fe/>
  243.  
  244.   2.5.  Programmed I/O vs. Shared Memory vs. DMA
  245.  
  246.   Ethernet is 10Mbs. (Don't be pedantic, 3Mbs and 100Mbs don't count.)
  247.   If you can already send and receive back-to-back packets, you just
  248.   can't put more bits over the wire. Every modern ethercard can receive
  249.   back-to-back packets. The Linux DP8390 drivers come pretty close to
  250.   sending back-to-back packets (depending on the current interrupt
  251.   latency) and the 3c509 and AT1500 hardware has no problem at all
  252.   automatically sending back-to-back packets.
  253.  
  254.   The ISA bus can do 5.3MB/sec (42Mb/sec), which sounds like more than
  255.   enough. You can use that bandwidth in several ways:
  256.  
  257.   2.5.1.  Programmed I/O (e.g. NE2000, HP)
  258.  
  259.   Pro: Doesn't use any constrained system resources, just a few I/O
  260.   registers, and has no 16M limit.
  261.  
  262.   Con: Usually the slowest transfer rate, the CPU is waiting the whole
  263.   time, and interleaved packet access is usually difficult to
  264.   impossible.
  265.  
  266.   2.5.2.  Shared memory (e.g. WD80x3, SMC-Ultra, 3c503)
  267.  
  268.   Pro: Simple, faster than programmed I/O, and allows random access to
  269.   packets. The linux drivers compute the checksum of incoming IP packets
  270.   as they are copied off the card, resulting in a further reduction of
  271.   CPU usage vs. an equivalent PIO card.
  272.  
  273.   Con: Uses up memory space (a big one for DOS users, only a minor issue
  274.   under Linux), and it still ties up the CPU.
  275.  
  276.   2.5.3.  Slave (normal) Direct Memory Access (e.g. none for Linux!)
  277.  
  278.   Pro: Frees up the CPU during the actual data transfer.
  279.  
  280.   Con: Checking boundary conditions, allocating contiguous buffers, and
  281.   programming the DMA registers makes it the slowest of all techniques.
  282.   It also uses up a scarce DMA channel, and requires aligned low memory
  283.   buffers.
  284.  
  285.   2.5.4.  Bus Master Direct Memory Access (e.g. LANCE, DEC 21040)
  286.  
  287.   Pro: Frees up the CPU during the data transfer, can string together
  288.   buffers, can require little or no CPU time lost on the ISA bus.
  289.  
  290.   Con: Requires low-memory buffers and a DMA channel. Any bus-master
  291.   will have problems with other bus-masters that are bus-hogs, such as
  292.   some primitive SCSI adaptors. A few badly-designed motherboard
  293.   chipsets have problems with bus-masters. And a reason for not using
  294.   any type of DMA device is using a 486 processor designed for plug-in
  295.   replacement of a 386: these processors must flush their cache with
  296.   each DMA cycle. (This includes the Cx486DLC, Ti486DLC, Cx486SLC,
  297.   Ti486SLC, etc.)
  298.  
  299.   2.6.  Type of cable that your card should support
  300.  
  301.   If you are setting up a small ``personal'' network, you will probably
  302.   want to use thinnet or thin ethernet cable. This is the style with the
  303.   standard BNC connectors. See ``Cables, Coax...''  for other concerns
  304.   with different types of ethernet cable.
  305.  
  306.   Most ethercards also come in a `Combo' version for only $10-$20 more.
  307.   These have both twisted pair and thinnet transceiver built-in,
  308.   allowing you to change your mind later.
  309.  
  310.   The twisted pair cables, with the RJ-45 (giant phone jack) connectors
  311.   is technically called 10BaseT. You may also hear it called UTP
  312.   (Unsheilded Twisted Pair).
  313.  
  314.   The thinnet, or thin ethernet cabling, (RG-58 coaxial cable) with the
  315.   BNC (metal push and turn-to-lock) connectors is technically called
  316.   10Base2.
  317.  
  318.   The older thick ethernet (10mm coaxial cable) which is only found in
  319.   older installations is called 10Base5.
  320.  
  321.   Large corporate installations will most likely use 10BaseT instead of
  322.   10Base2. 10Base2 does not offer an easy upgrade path to the new
  323.   upcoming 100Base-whatever.
  324.  
  325.   3.  Frequently Asked Questions
  326.  
  327.   Here are some of the more frequently asked questions about using Linux
  328.   with an Ethernet connection. Some of the more specific questions are
  329.   sorted on a `per manufacturer basis'.  However, since this document is
  330.   basically `old' by the time you get it, any `new' problems will not
  331.   appear here instantly. For these, I suggest that you make efficient
  332.   use of your newsreader. For example, nn users would type
  333.  
  334.        nn -xX -s'3c'
  335.  
  336.   to get all the news articles in your subscribed list that have `3c' in
  337.   the subject. (ie. 3com, 3c509, 3c503, etc.)  The moral: Read the man
  338.   page for your newsreader.
  339.  
  340.   3.1.  Alpha Drivers -- Getting and Using them
  341.  
  342.   I heard that there is an updated or alpha driver available for my
  343.   card. Where can I get it?
  344.  
  345.   The newest of the `new' drivers can be found on Donald's new ftp site:
  346.   cesdis.gsfc.nasa.gov in the /pub/linux/ area. Things change here quite
  347.   frequently, so just look around for it.  There is still all the stuff
  348.   on the old ftp site ftp.super.org in /pub/linux, but this is not being
  349.   actively maintained, and hence will be of limited value to most
  350.   people.
  351.  
  352.   Note that most of the `useable' alpha drivers have been included in
  353.   the standard kernel source tree. When running make config you will be
  354.   asked if you want to be offered ALPHA test drivers.
  355.  
  356.   Now, if it really is an alpha, or pre-alpha driver, then please treat
  357.   it as such. In other words, don't complain because you can't figure
  358.   out what to do with it. If you can't figure out how to install it,
  359.   then you probably shouldn't be testing it.  Also, if it brings your
  360.   machine down, don't complain. Instead, send us a well documented bug
  361.   report, or even better, a patch!
  362.  
  363.   People reading this while net-surfing may want to check out:
  364.  
  365.   Don's Linux Home Page
  366.   <http://cesdis.gsfc.nasa.gov/pub/linux/linux.html>
  367.  
  368.   for the latest dirt on what is new and upcoming.
  369.  
  370.   3.2.  Using More than one Ethernet Card per Machine
  371.  
  372.   What needs to be done so that Linux can run two ethernet cards?
  373.  
  374.   The hooks for multiple ethercards are all there.  However, note that
  375.   only one ethercard is auto-probed for by default.  This avoids a lot
  376.   of possible boot time hangs caused by probing sensitive cards.
  377.  
  378.   There are two ways that you can enable auto-probing for the second
  379.   (and third, and...) card. The easiest method is to pass boot-time
  380.   arguments to the kernel, which is usually done by LILO. Probing for
  381.   the second card can be achieved by using a boot-time argument as
  382.   simple as ether=0,0,eth1. In this case eth0 and eth1 will be assigned
  383.   in the order that the cards are found at boot.  Say if you want the
  384.   card at 0x300 to be eth0 and the card at 0x280 to be eth1 then you
  385.   could use
  386.  
  387.        LILO: linux ether=5,0x300,eth0 ether=15,0x280,eth1
  388.  
  389.   The ether= command accepts more than the IRQ + i/o + name shown above.
  390.   Please have a look at ``Passing Ethernet Arguments...''  for the full
  391.   syntax, card specific parameters, and LILO tips.
  392.  
  393.   These boot time arguments can be made permanent so that you don't have
  394.   to re-enter them every time. See the LILO configuration option
  395.   `append' in the LILO manual.
  396.  
  397.   The second way (not recommended) is to edit the file Space.c and
  398.   replace the 0xffe0 entry for the i/o address with a zero. The 0xffe0
  399.   entry tells it not to probe for that device -- replacing it with a
  400.   zero will enable autoprobing for that device.  If you really need more
  401.   than four ethernet cards in one machine, then you can add an eth4
  402.   entry and an eth5 entry and so on.
  403.  
  404.   Note that if you are intending to use Linux as a gateway between two
  405.   networks, you will have to re-compile a kernel with IP forwarding
  406.   enabled. Usually using an old AT/286 with something like the `kbridge'
  407.   software is a better solution.
  408.  
  409.   If you are viewing this while net-surfing, you may wish to look at a
  410.   mini-howto Donald has on his WWW site. Check out Multiple Ethercards
  411.   <http://cesdis.gsfc.nasa.gov/linux/misc/multicard.html>.
  412.  
  413.   For module users with 8390 based cards, you can have a single module
  414.   control multiple cards as well. Please see ``8390 Based Cards as
  415.   Modules'' for module specific information about using multiple cards.
  416.  
  417.   3.3.  Poor NE2000 Clones
  418.  
  419.   Here is a list of some of the NE-2000 clones that are known to have
  420.   various problems. Most of them aren't fatal. In the case of the ones
  421.   listed as `bad clones' -- this usually indicates that the cards don't
  422.   have the two NE2000 identifier bytes. NEx000-clones have a Station
  423.   Address PROM (SAPROM) in the packet buffer memory space.  NE2000
  424.   clones have 0x57,0x57 in bytes 0x0e,0x0f of the SAPROM, while other
  425.   supposed NE2000 clones must be detected by their SA prefix.
  426.  
  427.   This is not a comprehensive list of all the NE2000 clones that don't
  428.   have the 0x57,0x57 in bytes 0x0e,0x0f of the SAPROM. There are
  429.   probably hundreds of them. If you get a card that causes the driver to
  430.   report an `invalid signature' then you will have to add your cards
  431.   signature to the driver. The process for doing this is described
  432.   below.
  433.  
  434.   Accton NE2000 -- might not get detected at boot, see below.
  435.  
  436.   Aritsoft LANtastic AE-2 -- OK, but has flawed error-reporting
  437.   registers.
  438.  
  439.   AT-LAN-TEC NE2000 -- clone uses Winbond chip that traps SCSI drivers
  440.  
  441.   ShineNet LCS-8634 -- clone uses Winbond chip that traps SCSI drivers
  442.  
  443.   Cabletron E10**, E20**, E10**-x, E20**-x -- bad clones, but the driver
  444.   checks for them. See ``E10**''.
  445.  
  446.   D-Link Ethernet II -- bad clones, but the driver checks for them. See
  447.   ``DE-100 / DE-200''.
  448.  
  449.   DFI DFINET-300, DFINET-400 -- bad clones, but the driver checks for
  450.   them. See ``DFI-300 / DFI-400''
  451.  
  452.   EtherNext UTP8, EtherNext UTP16 -- bad clones, but the driver checks
  453.   for them.
  454.  
  455.   3.4.  Problems with NE1000 / NE2000 cards (and clones)
  456.  
  457.   Problem: NE*000 card hangs machine, sometimes with a `DMA conflict'
  458.   message, sometimes completely silently.
  459.  
  460.   Reason: There were some bugs in the driver and the upper networking
  461.   layers that caused this. They have been fixed in kernels v1.2.9 and
  462.   above. Upgrade your kernel.
  463.  
  464.   Problem: NE*000 card hangs machine during NE probe, or can not read
  465.   station address properly.
  466.  
  467.   Reason: Kernels previous to v1.3.7 did not fully reset the card after
  468.   finding it at boot. Some cheap cards are not left in a reasonable
  469.   state after power-up and need to be fully reset before any attempt is
  470.   made to use them. Also, a previous probe may have upset the NE card
  471.   prior to the NE probe taking place. In that case, look in to using the
  472.   ``reserve='' boot keyword to protect the card from other probes.
  473.  
  474.   Problem: NE*000 driver reports `not found (no reset ack)' during boot
  475.   probe.
  476.  
  477.   Reason: This is related to the above change. After the initial
  478.   verification that an 8390 is at the probed i/o address, the reset is
  479.   performed. When the card has completed the reset, it is supposed to
  480.   acknowedge that the reset has completed.  Your card doesn't, and so
  481.   the driver assumes that no NE card is present.
  482.  
  483.   Solution:
  484.  
  485.   Change the two lines as shown below in drivers/net/ne.c
  486.  
  487.   ______________________________________________________________________
  488.   -                       printk(" not found (no reset ack).\n");
  489.   -                       return ENODEV;
  490.   +                       printk(" (warning: no reset ack)");
  491.   +                       break;
  492.   ______________________________________________________________________
  493.  
  494.   This will allow the card detection to continue, even if your card
  495.   doesn't ACK the reset.
  496.  
  497.   Problem: NE*000 card hangs machine at first network access.
  498.  
  499.   Reason: This problem has been reported for kernels as old as 1.1.57 to
  500.   the present. It appears confined to the software configurable clone
  501.   cards. It appears that they expect to be initialized in some special
  502.   way.
  503.  
  504.   Solution: Several people have reported that running the supplied DOS
  505.   software config program and/or the supplied DOS driver prior to warm
  506.   booting (i.e. loadlin or the `three-finger-salute') into linux allowed
  507.   the card to work. This would indicate that these cards need to be
  508.   initialized in a particular fashion, slightly different than what the
  509.   present Linux driver does.
  510.  
  511.   Problem: NE*000 ethercard at 0x360 doesn't get detected anymore.
  512.  
  513.   Reason: Recent kernels ( > 1.1.7X) have more sanity checks with
  514.   respect to overlapping i/o regions. Your NE2000 card is 0x20 wide in
  515.   i/o space, which makes it hit the parallel port at 0x378.  Other
  516.   devices that could be there are the second floppy controller (if
  517.   equipped) at 0x370 and the secondary IDE controller at 0x376--0x377.
  518.   If the port(s) are already registered by another driver, the kernel
  519.   will not let the probe happen.
  520.  
  521.   Solution: Either move your card to an address like 0x280, 0x340, 0x320
  522.   or compile without parallel printer support.
  523.  
  524.   Problem: Network `goes away' every time I print something (NE2000)
  525.  
  526.   Reason: Same problem as above, but you have an older kernel that
  527.   doesn't check for overlapping i/o regions. Use the same fix as above,
  528.   and get a new kernel while you are at it.
  529.  
  530.   Problem: NE*000 ethercard probe at 0xNNN: 00 00 C5 ... not found.
  531.   (invalid signature yy zz)
  532.  
  533.   Reason: First off, do you have a NE1000 or NE2000 card at the addr.
  534.   0xNNN?  And if so, does the hardware address reported look like a
  535.   valid one? If so, then you have a poor NE*000 clone. All NE*000 clones
  536.   are supposed to have the value 0x57 in bytes 14 and 15 of the SA PROM
  537.   on the card. Yours doesn't -- it has `yy zz' instead.
  538.  
  539.   Solution: The driver (/usr/src/linux/drivers/net/ne.c) has a "Hall of
  540.   Shame" list at about line 42. This list is used to detect poor clones.
  541.   For example, the DFI cards use `DFI' in the first 3 bytes of the prom,
  542.   instead of using 0x57 in bytes 14 and 15, like they are supposed to.
  543.  
  544.   You can determine what the first 3 bytes of your card PROM are by
  545.   adding a line like:
  546.  
  547.       printk("PROM prefix: %2.2x %2.2x %2.2x\n",SA_prom[0],SA_prom[1],SA_prom[2]);
  548.  
  549.   into the driver, right after the error message you got above, and just
  550.   before the "return ENXIO" at line 227.
  551.  
  552.   Reboot with this change in place, and after the detection fails, you
  553.   will get the three bytes from the PROM like the DFI example above.
  554.   Then you can add your card to the bad_clone_list[] at about line 43.
  555.   Say the above line printed out:
  556.  
  557.        PROM prefix: 0x3F 0x2D 0x1C
  558.  
  559.   after you rebooted. And say that the 8 bit version of your card was
  560.   called the "FOO-1k" and the 16 bit version the "FOO-2k". Then you
  561.   would add the following line to the bad_clone_list[]:
  562.  
  563.        {"FOO-1k", "FOO-2k", {0x3F, 0x2D, 0x1C,}},
  564.  
  565.   Note that the 2 name strings you add can be anything -- they are just
  566.   printed at boot, and not matched against anything on the card.  You
  567.   can also take out the "printk()" that you added above, if you want.
  568.   It shouldn't hit that line anymore anyway. Then recompile once more,
  569.   and your card should be detected.
  570.  
  571.   Problem: Errors like DMA address mismatch
  572.  
  573.   Is the chip a real NatSemi 8390? (DP8390, DP83901, DP83902 or
  574.   DP83905)?  If not, some clone chips don't correctly implement the
  575.   transfer verification register. MS-DOS drivers never do error
  576.   checking, so it doesn't matter to them. (Note: The DMA address check
  577.   is not done by default as of v1.2.4 for performance reasons. Enable it
  578.   with the `NE_SANITY' define in ne.c if you want the check done.)
  579.  
  580.   Are most of the messages off by a factor of 2?  If so:  Are you using
  581.   the NE2000 in a 16 bit slot?  Is it jumpered to use only 8 bit
  582.   transfers?
  583.  
  584.   The Linux driver expects a NE2000 to be in a 16 bit slot. A NE1000 can
  585.   be in either size slot. This problem can also occur with some clones,
  586.   notably D-Link 16 bit cards, that don't have the correct ID bytes in
  587.   the station address PROM.
  588.  
  589.   Are you running the bus faster than 8Mhz?  If you can change the speed
  590.   (faster or slower), see if that makes a difference. Most NE2000 clones
  591.   will run at 16MHz, but some may not. Changing speed can also mask a
  592.   noisy bus.
  593.  
  594.   What other devices are on the bus?  If moving the devices around
  595.   changes the reliability, then you have a bus noise problem -- just
  596.   what that error message was designed to detect. Congratulations,
  597.   you've probably found the source of other problems as well.
  598.  
  599.   Problem: The machine hangs during boot right after the `8390...'  or
  600.   `WD....' message. Removing the NE2000 fixes the problem.
  601.  
  602.   Solution: Change your NE2000 base address to 0x340. Alternatively, you
  603.   can use the device registrar implemented in 0.99pl13 and later
  604.   kernels.
  605.  
  606.   Reason: Your NE2000 clone isn't a good enough clone. An active NE2000
  607.   is a bottomless pit that will trap any driver autoprobing in its
  608.   space. The other ethercard drivers take great pain to reset the NE2000
  609.   so that it's safe, but some clones cannot be reset. Clone chips to
  610.   watch out for: Winbond 83C901. Changing the NE2000 to a less-popular
  611.   address will move it out of the way of other autoprobes, allowing your
  612.   machine to boot.
  613.  
  614.   Problem: The machine hangs during the SCSI probe at boot.
  615.  
  616.   Reason: It's the same problem as above, change the ethercard's
  617.   address, or use the device registrar.
  618.  
  619.   Problem: The machine hangs during the soundcard probe at boot.
  620.  
  621.   Reason: No, that's really during the silent SCSI probe, and it's the
  622.   same problem as above.
  623.  
  624.   Problem: NE2000 not detected at boot - no boot messages at all
  625.  
  626.   Donald writes: `A few people have reported a problem with detecting
  627.   the Accton NE2000.  This problem occurs only at boot-time, and the
  628.   card is later detected at run-time by the identical code my (alpha-
  629.   test) ne2k diagnostic program. Accton has been very responsive, but I
  630.   still haven't tracked down what is going on. I've been unable to
  631.   reproduce this problem with the Accton cards we purchased. If you are
  632.   having this problem, please send me an immediate bug report. For that
  633.   matter, if you have an Accton card send me a success report, including
  634.   the type of the motherboard. I'm especially interested in finding out
  635.   if this problem moves with the particular ethercard, or stays with the
  636.   motherboard.'
  637.  
  638.   Here are some things to try, as they have fixed it for some people:
  639.  
  640.   ╖  Change the bus speed, or just move the card to a different slot.
  641.  
  642.   ╖  Change the `I/O recovery time' parameter in the BIOS chipset
  643.      configuration.
  644.  
  645.   3.5.  Problems with WD80*3 cards
  646.  
  647.   Problem: A WD80*3 is falsely detected. Removing the sound or MIDI card
  648.   eliminates the `detected' message.
  649.  
  650.   Reason: Some MIDI ports happen to produce the same checksum as a WD
  651.   ethercard.
  652.  
  653.   Solution: Update your ethercard driver: new versions include an
  654.   additional sanity check. If it is the midi chip at 0x388 that is
  655.   getting detected as a WD living at 0x380, then you could also use:
  656.  
  657.           LILO: linux reserve=0x380,8
  658.  
  659.   Problem: You get messages such as the following with your 80*3:
  660.  
  661.           eth0: bogus packet size, status = NNNN
  662.           kmalloc called with impossibly large argument (65400)
  663.           eth0: Couldn't allocate sk_buff of size 65400
  664.           eth0: receiver overrun
  665.  
  666.   Reason: There is a shared memory problem.
  667.  
  668.   Solution: If the problem is sporadic, you have hardware problems.
  669.   Typical problems that are easy to fix are board conflicts, having
  670.   cache or `shadow ROM' enabled for that region, or running your bus
  671.   faster than 8Mhz. There are also a surprising number of memory
  672.   failures on ethernet cards, so run a diagnostic program if you have
  673.   one for your ethercard.
  674.  
  675.   If the problem is continual, and you have have to reboot to fix the
  676.   problem, record the boot-time probe message and mail it to
  677.   becker@cesdis.gsfc.nasa.gov - Take particular note of the shared
  678.   memory location.
  679.  
  680.   Problem: WD80*3 will not get detected at boot.
  681.  
  682.   Reason: Earlier versions of the Mitsumi CD-ROM (mcd) driver probe at
  683.   0x300 will succeed if just about anything is that I/O location.  This
  684.   is bad news and needs to be a bit more robust.  Once another driver
  685.   registers that it `owns' an I/O location, other drivers (incl. the
  686.   wd80x3) are `locked out' and can not probe that addr for a card.
  687.  
  688.   Solution: Recompile a new kernel without any excess drivers that you
  689.   aren't using, including the above mcd driver.  Or try moving your
  690.   ethercard to a new I/O addr. Valid I/O addr. for all the cards are
  691.   listed in ``Probed Addresses'' You can also point the mcd driver off
  692.   in another direction by a boot-time parameter (via LILO) such as:
  693.  
  694.        mcd=0x200,12
  695.  
  696.   Problem: Old wd8003 and/or jumper-settable wd8013 always get the IRQ
  697.   wrong.
  698.  
  699.   Reason: The old wd8003 cards and jumper-settable wd8013 clones don't
  700.   have the EEPROM that the driver can read the IRQ setting from.  If the
  701.   driver can't read the IRQ, then it tries to auto-IRQ to find out what
  702.   it is. And if auto-IRQ returns zero, then the driver just assigns IRQ
  703.   5 for an 8 bit card or IRQ 10 for a 16 bit card.
  704.  
  705.   Solution: Avoid the auto-IRQ code, and tell the kernel what the IRQ
  706.   that you have jumpered the card to is via a boot time argument.  For
  707.   example, if you are using IRQ 9, using the following should work.
  708.  
  709.        LILO: linux ether=9,0,eth0
  710.  
  711.   3.6.  Problems with 3Com cards
  712.  
  713.   Problem: The 3c503 picks IRQ N, but this is needed for some other
  714.   device which needs IRQ N. (eg. CD ROM driver, modem, etc.)  Can this
  715.   be fixed without compiling this into the kernel?
  716.  
  717.   Solution: The 3c503 driver probes for a free IRQ line in the order {5,
  718.   9/2, 3, 4}, and it should pick a line which isn't being used. Very old
  719.   drivers used to pick the IRQ line at boot-time, and the current driver
  720.   (0.99pl12 and newer) chooses when the card is open()/ifconfig'ed.
  721.   Alternately, you can fix the IRQ at boot by passing parameters via
  722.   LILO. The following selects IRQ9, base location 0x300, <ignored
  723.   value>, and if_port #1 (the external transceiver).
  724.  
  725.        LILO: linux ether=9,0x300,0,1,eth0
  726.  
  727.   The following selects IRQ3, probes for the base location, <ignored
  728.   value>, and the default if_port #0 (the internal transceiver)
  729.  
  730.        LILO: linux ether=3,0,0,0,eth0
  731.  
  732.   Problem: 3c503: configured interrupt X invalid, will use autoIRQ.
  733.  
  734.   Reason: The 3c503 card can only use one of IRQ{5, 2/9, 3, 4} (These
  735.   are the only lines that are connected to the card.)  If you pass in an
  736.   IRQ value that is not in the above set, you will get the above
  737.   message.  Usually, specifying an interrupt value for the 3c503 is not
  738.   necessary. The 3c503 will autoIRQ when it gets ifconfig'ed, and pick
  739.   one of IRQ{5, 2/9, 3, 4}.
  740.  
  741.   Solution: Use one of the valid IRQs listed above, or enable autoIRQ by
  742.   not specifying the IRQ line at all.
  743.  
  744.   Problem: The supplied 3c503 drivers don't use the AUI (thicknet) port.
  745.   How does one choose it over the default thinnet port?
  746.  
  747.   Solution: The 3c503 AUI port can be selected at boot-time with
  748.   0.99pl12 and later. The selection is overloaded onto the low bit of
  749.   the currently-unused dev->rmem_start variable, so a boot-time
  750.   parameter of:
  751.  
  752.        LILO: linux ether=0,0,0,1,eth0
  753.  
  754.   should work. A boot line to force IRQ 5, port base 0x300, and use an
  755.   external transceiver is:
  756.  
  757.        LILO: linux ether=5,0x300,0,1,eth0
  758.  
  759.   With kernels 1.3.42 and newer, you can specify the AUI port when
  760.   loading as a module as well. Just append xcvr=1 to the insmod command
  761.   line along with your i/o and irq values.
  762.  
  763.   Also note that kernel revisions 1.00 to 1.03 had an interesting
  764.   `feature'. They would switch to the AUI port when the internal
  765.   transceiver failed. This is a problem, as it will never switch back if
  766.   for example you momentarily disconnect the cable. Kernel versions 1.04
  767.   and newer only switch if the very first Tx attempt fails.
  768.  
  769.   3.7.  Problems with Hewlett Packard Cards
  770.  
  771.   Problem: HP Vectra using built in AMD LANCE chip gets IRQ and DMA
  772.   wrong.
  773.  
  774.   Solution: The HP Vectra uses a different implementation to the
  775.   standard HP-J2405A. The `lance.c' driver used to always use the value
  776.   in the setup register of an HP Lance implementation.  In the Vectra
  777.   case it's reading an invalid 0xff value. Kernel versions newer than
  778.   about 1.1.50 now handle the Vectra in an appropriate fashion.
  779.  
  780.   Problem: HP Card is not detected at boot, even though kernel was
  781.   compiled with `HP PCLAN support'.
  782.  
  783.   Solution: You probably have a HP PCLAN+  -- note the `plus'. Support
  784.   for the PCLAN+ was added to mid/late versions of 1.1.  Recompile a
  785.   (possibly newer) kernel with support for the HP PCLAN+ and you should
  786.   be in business.
  787.  
  788.   3.8.  FAQs Not Specific to Any Card.
  789.  
  790.   3.8.1.  Ethercard is Not Detected at Boot.
  791.  
  792.   The usual reason for this is that people are using a kernel that does
  793.   not have support for their particular card built in. If you are using
  794.   a pre-compiled kernel that is part of a distribution set, then check
  795.   the documentation to see which kernel you installed, and if it was
  796.   built with support for your particular card. If it wasn't, then your
  797.   options are to try and get one that has support for your card, or
  798.   build your own.
  799.  
  800.   It is usually wise to build your own kernel with only the drivers you
  801.   need, as this cuts down on the kernel size (saving your precious RAM
  802.   for applications!) and reduces the number of device probes that can
  803.   upset sensitive hardware. Building a kernel is not as complicated as
  804.   it sounds. You just have to answer yes or no to a bunch of questions
  805.   about what drivers you want, and it does the rest.
  806.  
  807.   The next main cause is having another device using part of the i/o
  808.   space that your card needs. Most cards are 16 or 32 bytes wide in i/o
  809.   space. If your card is set at 0x300 and 32 bytes wide, then the driver
  810.   will ask for 0x300-0x31f. If any other device driver has registered
  811.   even one port anywhere in that range, the probe will not take place at
  812.   that address and  the driver will silently continue to the next of the
  813.   probed addresses. So, after booting, do a cat /proc/ioports and verify
  814.   that the full iospace that the card will require is vacant.
  815.  
  816.   Another problem is having your card jumpered to an i/o address that
  817.   isn't probed by default. There is a list ``probed addresses'' for each
  818.   card in this document. Even if the i/o setting of your card is not in
  819.   the list of porbed addresses, you can supply it at boot with the
  820.   ether= command as described in ``Passing Ethernet Arguments...''
  821.  
  822.   3.8.2.  ifconfig reports the wrong i/o address for the card.
  823.  
  824.   No it doesn't. You are just interpreting it incorrectly.  This is not
  825.   a bug, and the numbers reported are correct. It just happens that some
  826.   8390 based cards (wd80x3, smc-ultra, etc) have the actual 8390 chip
  827.   living at an offset from the first assigned i/o port.  Try cd
  828.   /usr/src/linux/drivers/net;grep NIC_OFFSET *.c|more to see what is
  829.   going on. This is the value stored in dev->base_addr, and is what
  830.   ifconfig reports. If you want to see the full range of ports that your
  831.   card uses, then try cat /proc/ioports which will give the numbers you
  832.   expect.
  833.  
  834.   3.8.3.  Shared Memory ISA cards in PCI Machine
  835.  
  836.   This will usually show up as reads of lots of 0xffff values.  No
  837.   shared memory cards of any type will work in a PCI machine unless you
  838.   have the PCI ROM BIOS/CMOS SETUP configuration set properly. You have
  839.   to set it to allow shared memory access from the ISA bus for the
  840.   memory region that your card is trying to use. If you can't figure out
  841.   which settings are applicable then ask your supplier or local computer
  842.   guru.
  843.  
  844.   3.8.4.  Asynchronous Transfer Mode (ATM) Support
  845.  
  846.   Werner Almesberger has been playing around with ATM support for linux.
  847.   He has been working with the Efficient Networks ENI155p board
  848.   (Efficient Networks <http://www.efficient.com/>) and the Zeitnet
  849.   ZN1221 board (Zeitnet <http://www.zeitnet.com/>).
  850.  
  851.   Werner says that the driver for the ENI155p is rather stable, while
  852.   the driver for the ZN1221 is presently unfinished.
  853.  
  854.   Check the latest/updated status at the following URL:
  855.  
  856.   Linux ATM Support <http://lrcwww.epfl.ch/linux-atm/>
  857.  
  858.   3.8.5.  FDDI Support
  859.  
  860.   Is there FDDI support for Linux?
  861.  
  862.   Donald writes: `No, there is no Linux driver for any FDDI boards.  I
  863.   come from a place with supercomputers, so an external observer might
  864.   think FDDI would be high on my list. But FDDI never delivered end-to-
  865.   end throughput that would justify its cost, and it seems to be a
  866.   nearly abandoned technology now that 100base{X,Anynet} seems imminent.
  867.   (And yes, I know you can now get FDDI boards for <$1K. That seems to
  868.   be a last-ditch effort to get some return on the development
  869.   investment. Where is the next generation of FDDI going to come from?)'
  870.  
  871.   3.8.6.  Ethernet Cards for Linux on Alpha/AXP PCI Boards
  872.  
  873.   At present only the depca, de4x5 and all the 8390 drivers (wd, smc-
  874.   ultra, ne, 3c503, e2100, ac3200, hp, hp-plus) have been made
  875.   `architecture independent' so as to work on the DEC Alpha CPU based
  876.   systems.
  877.  
  878.   Note that the changes that are required aren't that complicated.  You
  879.   only need to do the following:
  880.  
  881.   -multiply all jiffies related values by HZ/100 to account for the
  882.   different HZ value that the Alpha uses.  (i.e timeout=2; becomes
  883.   timeout=2*HZ/100;)
  884.  
  885.   -replace any i/o memory (640k to 1MB) pointer dereferences with the
  886.   appropriate readb() writeb() readl() writel() calls, as shown in this
  887.   example.
  888.  
  889.   ______________________________________________________________________
  890.   -       int *mem_base = (int *)dev->mem_start;
  891.   -       mem_base[0] = 0xba5eba5e;
  892.   +       unsigned long mem_base = dev->mem_start;
  893.   +       writel(0xba5eba5e, mem_base);
  894.   ______________________________________________________________________
  895.  
  896.   -replace all memcpy() calls that have i/o memory as source or target
  897.   destinations with the appropriate one of memcpy_fromio() or
  898.   memcpy_toio().
  899.  
  900.   3.8.7.  Linking 10BaseT without a Hub
  901.  
  902.   Can I link 10BaseT (RJ45) based systems together without a hub?
  903.  
  904.   You can link 2 machines easily, but no more than that, without extra
  905.   devices/gizmos. See ``Twisted Pair'' -- it explains how to do it. And
  906.   no, you can't hack together a hub just by crossing a few wires and
  907.   stuff. It's pretty much impossible to do the collision signal right
  908.   without duplicating a hub.
  909.  
  910.   3.8.8.  SIOCSIFxxx: No such device
  911.  
  912.   I get a bunch of `SIOCSIFxxx: No such device' messages at boot,
  913.   followed by a `SIOCADDRT: Network is unreachable' What is wrong?
  914.  
  915.   Your ethernet device was not detected at boot, and when ifconfig and
  916.   route are run, they have no device to work with. Use dmesg | more to
  917.   review the boot messages and see if there are any messages about
  918.   detecting an ethernet card.
  919.  
  920.   3.8.9.  SIOCSFFLAGS: Try again
  921.  
  922.   I get `SIOCSFFLAGS: Try again' when I run `ifconfig' -- Huh?
  923.  
  924.   Some other device has taken the IRQ that your ethercard is trying to
  925.   use, and so the ethercard can't use the IRQ.  You don't necessairly
  926.   need to reboot to resolve this, as some devices only grab the IRQs
  927.   when they need them and then release them when they are done. Examples
  928.   are some sound cards, serial ports, floppy disk driver, etc. You can
  929.   type cat /proc/interrupts to see which interrupts are presently in
  930.   use. Most of the Linux ethercard drivers only grab the IRQ when they
  931.   are opened for use via `ifconfig'. If you can get the other device to
  932.   `let go' of the required IRQ line, then you should be able to `Try
  933.   again' with ifconfig.
  934.  
  935.   3.8.10.  Link UNSPEC and HW-addr of 00:00:00:00:00:00
  936.  
  937.   When I run ifconfig with no arguments, it reports that LINK is UNSPEC
  938.   (instead of 10Mbs Ethernet) and it also says that my hardware address
  939.   is all zeros.
  940.  
  941.   This is because people are running a newer version of the `ifconfig'
  942.   program than their kernel version. This new version of ifconfig is not
  943.   able to report these properties when used in conjunction with an older
  944.   kernel. You can either upgrade your kernel, `downgrade' ifconfig, or
  945.   simply ignore it. The kernel knows your hardware address, so it really
  946.   doesn't matter if ifconfig can't read it.
  947.  
  948.   3.8.11.  Huge Number of RX and TX Errors
  949.  
  950.   When I run ifconfig with no arguments, it reports that I have a huge
  951.   error count in both rec'd and transmitted packets. It all seems to
  952.   work ok -- What is wrong?
  953.  
  954.   Look again. It says RX packets big number PAUSE errors 0 PAUSE dropped
  955.   0 PAUSE overrun 0.  And the same for the TX column.  Hence the big
  956.   numbers you are seeing are the total number of packets that your
  957.   machine has rec'd and transmitted.  If you still find it confusing,
  958.   try typing cat /proc/net/dev instead.
  959.  
  960.   3.8.12.  Entries in /dev/ for Ethercards
  961.  
  962.   I have /dev/eth0 as a link to /dev/xxx. Is this right?
  963.  
  964.   Contrary to what you have heard, the files in /dev/* are not used.
  965.   You can delete any /dev/wd0, /dev/ne0 and similar entries.
  966.  
  967.   3.8.13.  Linux and ``trailers''
  968.  
  969.   Should I disable trailers when I `ifconfig' my ethercard?
  970.  
  971.   You can't disable trailers, and you shouldn't want to. `Trailers' are
  972.   a hack to avoid data copying in the networking layers. The idea was to
  973.   use a trivial fixed-size header of size `H', put the variable-size
  974.   header info at the end of the packet, and allocate all packets `H'
  975.   bytes before the start of a page. While it was a good idea, it turned
  976.   out to not work well in practice.  If someone suggests the use of
  977.   `-trailers', note that it is the equivalent of sacrificial goats
  978.   blood. It won't do anything to solve the problem, but if problem fixes
  979.   itself then someone can claim deep magical knowledge.
  980.  
  981.   3.8.14.  Access to the raw Ethernet Device
  982.  
  983.   How do I get access to the raw ethernet device in linux, without going
  984.   through TCP/IP and friends?
  985.  
  986.   ______________________________________________________________________
  987.           int s=socket(AF_INET,SOCK_PACKET,htons(ETH_P_ALL));
  988.   ______________________________________________________________________
  989.  
  990.   This gives you a socket receiving every protocol type.  Do recvfrom()
  991.   calls to it and it will fill the sockaddr with device type in
  992.   sa_family and the device name in the sa_data array. I don't know who
  993.   originally invented SOCK_PACKET for Linux (its been in for ages) but
  994.   its superb stuff.  You can use it to send stuff raw too via sendto()
  995.   calls.  You have to have root access to do either of course.
  996.  
  997.   4.  Performance Tips
  998.  
  999.   Here are some tips that you can use if you are suffering from low
  1000.   ethernet throughput, or to gain a bit more speed on those ftp
  1001.   transfers.
  1002.  
  1003.   The ttcp.c program is a good test for measuring raw throughput speed.
  1004.   Another common trick is to do a ftp> get large_file /dev/null where
  1005.   large_file is > 1MB and residing in the buffer cache on the Tx'ing
  1006.   machine. (Do the `get' at least twice, as the first time will be
  1007.   priming the buffer cache on the Tx'ing machine.) You want the file in
  1008.   the buffer cache because you are not interested in combining the file
  1009.   access speed from the disk into your measurement. Which is also why
  1010.   you send the incoming data to /dev/null instead of onto the disk.
  1011.  
  1012.   4.1.  General Concepts
  1013.  
  1014.   Even an 8 bit card is able to receive back-to-back packets without any
  1015.   problems. The difficulty arises when the computer doesn't get the Rx'd
  1016.   packets off the card quick enough to make room for more incoming
  1017.   packets. If the computer does not quickly clear the card's memory of
  1018.   the packets already received, the card will have no place to put the
  1019.   new packet.
  1020.  
  1021.   In this case the card either drops the new packet, or writes over top
  1022.   of a previously received packet. Either one seriously interrupts the
  1023.   smooth flow of traffic by causing/requesting re-transmissions and can
  1024.   seriously degrade performance by up to a factor of 5!
  1025.  
  1026.   Cards with more onboard memory are able to ``buffer'' more packets,
  1027.   and thus can handle larger bursts of back-to-back packets without
  1028.   dropping packets.  This in turn means that the card does not require
  1029.   as low a latency from the the host computer with respect to pulling
  1030.   the packets out of the buffer to avoid dropping packets.
  1031.  
  1032.   Most 8 bit cards have an 8kB buffer, and most 16 bit cards have a 16kB
  1033.   buffer. Most Linux drivers will reserve 3kB of that buffer (for two Tx
  1034.   ping-pong buffers), leaving only 5kB of receive space for an 8 bit
  1035.   card. This is room enough for only three full sized (1500 bytes)
  1036.   ethernet packets.
  1037.  
  1038.   4.2.  ISA Bus Speed
  1039.  
  1040.   As mentioned above, if the packets are removed from the card fast
  1041.   enough, then a drop/overrun condition won't occur even when the amount
  1042.   of Rx packet buffer memory is small. The factor that sets the rate at
  1043.   which packets are removed from the card to the computer's memory is
  1044.   the speed of the data path that joins the two -- that being the ISA
  1045.   bus speed. (If the CPU is a dog-slow 386sx-16, then this will also
  1046.   play a role.)
  1047.  
  1048.   The recommended ISA bus clock is about 8MHz, but many motherboards and
  1049.   peripheral devices can run at higher frequencies. The clock frequency
  1050.   for the ISA bus can usually be set in the CMOS setup, by selecting a
  1051.   divisor of the mainboard/CPU clock frequency.
  1052.  
  1053.   For example, here are some receive speeds as measured by the TTCP
  1054.   program on a 40MHz 486, with an old 8 bit WD8003EP card, for different
  1055.   ISA bus speeds.
  1056.  
  1057.   ______________________________________________________________________
  1058.           ISA Bus Speed (MHz)     Rx TTCP (kB/s)
  1059.           -------------------     --------------
  1060.           6.7                     740
  1061.           13.4                    970
  1062.           20.0                    1030
  1063.           26.7                    1075
  1064.   ______________________________________________________________________
  1065.  
  1066.   You would be hard pressed to do better than 1075kB/s with any 10Mb/s
  1067.   ethernet card, using TCP/IP. However, don't expect every system to
  1068.   work at fast ISA bus speeds. Most systems will not function properly
  1069.   at speeds above 13MHz. (Also, most PCI systems have the ISA bus speed
  1070.   fixed at 8MHz, so that the end user does not have the option of
  1071.   increasing it.)
  1072.  
  1073.   In addition to faster transfer speeds, one will usually also benefit
  1074.   from a reduction in CPU usage due to the shorter duration memory and
  1075.   i/o cycles. (Note that hard disks and video cards located on the ISA
  1076.   bus will also usually experience a performance increase from an
  1077.   increased ISA bus speed.)
  1078.  
  1079.   4.3.  Setting the TCP Rx Window
  1080.  
  1081.   Once again, cards with small amounts of onboard RAM and relatively
  1082.   slow data paths between the card and the computer's memory run into
  1083.   trouble. The default TCP Rx window setting is 32kB, which means that a
  1084.   fast computer on the same subnet as you can dump 32k of data on you
  1085.   without stopping to see if you received any of it okay.
  1086.  
  1087.   Recent versions of the route command have the ability to set the size
  1088.   of this window on the fly. Usually it is only for the local net that
  1089.   this window must be reduced, as computers that are behind a couple of
  1090.   routers or gateways are `buffered' enough to not pose a problem. An
  1091.   example usage would be:
  1092.  
  1093.   ______________________________________________________________________
  1094.           route add <whatever> ... window <win_size>
  1095.   ______________________________________________________________________
  1096.  
  1097.   where win_size is the size of the window you wish to use (in bytes).
  1098.   An 8 bit 3c503 card on an ISA bus operating at a speed of 10MHz or
  1099.   less would work well with a window size of about 4kB. Too large a
  1100.   window will cause overruns and dropped packets, and a drastic
  1101.   reduction in ethernet throughput. You can check the operating status
  1102.   by doing a cat /proc/net/dev which will display any dropped or overrun
  1103.   conditions that occurred.
  1104.  
  1105.   4.4.  Increasing NFS performance
  1106.  
  1107.   Some people have found that using 8 bit cards in NFS clients causes
  1108.   poorer than expected performance, when using 8kB (native Sun) NFS
  1109.   packet size.
  1110.  
  1111.   The possible reason for this could be due to the difference in on
  1112.   board buffer size between the 8 bit and the 16 bit cards.  The maximum
  1113.   ethernet packet size is about 1500 bytes. Now that 8kB NFS packet will
  1114.   arrive as about 6 back to back maximum size ethernet packets. Both the
  1115.   8 and 16 bit cards have no problem Rx'ing back to back packets. The
  1116.   problem arises when the machine doesn't remove the packets from the
  1117.   cards buffer in time, and the buffer overflows. The fact that 8 bit
  1118.   cards take an extra ISA bus cycle per transfer doesn't help either.
  1119.   What you can do if you have an 8 bit card is either set the NFS
  1120.   transfer size to 4kB, or try increasing the ISA bus speed in order to
  1121.   get the card's buffer cleared out faster.
  1122.  
  1123.   5.  Vendor/Manufacturer/Model Specific Information
  1124.  
  1125.   5.1.  3Com
  1126.  
  1127.   If you are not sure what your card is, but you think it is a 3Com
  1128.   card, you can probably figure it out from the assembly number. 3Com
  1129.   has a document `Identifying 3Com Adapters By Assembly Number' (ref
  1130.   24500002) that would most likely clear things up. See ``Technical
  1131.   Information from 3Com'' for info on how to get documents from 3Com.
  1132.  
  1133.   Also note that 3Com has a FTP site with various goodies: ftp.3Com.com
  1134.   that you may want to check out.
  1135.  
  1136.   For those of you browsing this document by a WWW browser, you can try
  1137.   3Com's WWW site
  1138.  
  1139.   5.1.1.  3c501
  1140.  
  1141.   Status -- Semi-Supported
  1142.  
  1143.   Too brain-damaged to use. Available surplus from many places. Avoid it
  1144.   like the plague. Again, do not purchase this card, even as a joke.
  1145.   It's performance is horrible, and it breaks in many ways.
  1146.  
  1147.   Cameron L. Spitzer of 3Com said: ``I'm speaking only for myself here,
  1148.   of course, but I believe 3Com advises against installing a 3C501 in a
  1149.   new system, mostly for the same reasons Donald has discussed. You
  1150.   probably won't be happy with the 3C501 in your Linux box. The data
  1151.   sheet is marked `(obsolete)' on 3Com's Developers' Order Form, and the
  1152.   board is not part of 3Com's program for sending free Technical
  1153.   Reference Manuals to people who need them. The decade-old things are
  1154.   nearly indestructible, but that's about all they've got going for them
  1155.   any more.''
  1156.  
  1157.   For those not yet convinced, the 3c501 can only do one thing at a time
  1158.   -- while you are removing one packet from the single-packet buffer it
  1159.   cannot receive another packet, nor can it receive a packet while
  1160.   loading a transmit packet. This was fine for a network between two
  1161.   8088-based computers where processing each packet and replying took
  1162.   10's of msecs, but modern networks send back-to-back packets for
  1163.   almost every transaction.
  1164.  
  1165.   AutoIRQ works, DMA isn't used, the autoprobe only looks at 0x280 and
  1166.   0x300, and the debug level is set with the third boot-time argument.
  1167.  
  1168.   Once again, the use of a 3c501 is strongly discouraged!  Even more so
  1169.   with a IP multicast kernel, as you will grind to a halt while
  1170.   listening to all multicast packets. See the comments at the top of the
  1171.   source code for more details.
  1172.  
  1173.   5.1.2.  3c503, 3c503/16
  1174.  
  1175.   Status -- Supported
  1176.  
  1177.   If you have a 3c503/16 you may be interested to know that as of 1.3.37
  1178.   the driver has the facility to use the full 16kB RAM on your card.
  1179.   Previous versions treated the 16bit cards as 8bit cards, and only used
  1180.   half of the available RAM. This update also detects the newer 3Com
  1181.   prefix found on newly manufactured cards mentioned below.
  1182.  
  1183.   Recently made 3c503/16 cards have a new base hardware address because
  1184.   3Com ran out of numbers (they made too many cards!) The cards used to
  1185.   start with 02 60 8C and the newer ones use 00 20 AF. Up to 1.3.37, the
  1186.   driver will only check for the old address, and skip over the newer
  1187.   cards.  You can upgrade to a kernel newer than 1.3.37, or change the
  1188.   numbers in 3c503.c for older kernels.
  1189.  
  1190.   These shared-memory ethercards also have a programmed I/O mode that
  1191.   doesn't use the 8390 facilities (their engineers found too many bugs!)
  1192.   It should be about the same speed as the same bus width WD80x3, but it
  1193.   is actually a bit slower.  The 3c503 does not have ``EEPROM setup'',
  1194.   so a diagnostic/setup program isn't needed before running the card
  1195.   with Linux. The shared memory address of the 3c503 is set using
  1196.   jumpers that are shared with the boot PROM address. This is confusing
  1197.   to people familiar with other ISA cards, where you always leave the
  1198.   jumper set to ``disable'' unless you have a boot PROM.
  1199.  
  1200.   The Linux 3c503 driver can also work with the 3c503 in programmed-I/O
  1201.   mode, but this is slower and less reliable than shared memory mode.
  1202.   Also, programmed-I/O mode is not as well tested when updating the
  1203.   drivers.  You still shouldn't use the programmed-I/O mode though,
  1204.   unless you need it for MS-DOS compatibility.
  1205.  
  1206.   The 3c503's IRQ line is set in software, with no hints from an EEPROM.
  1207.   Unlike the MS-DOS drivers, the Linux driver has capability to autoIRQ:
  1208.   it uses the first available IRQ line in {5,2/9,3,4}, selected each
  1209.   time the card is ifconfig'ed. (Older driver versions selected the IRQ
  1210.   at boot time.) The ioctl() call in `ifconfig' will return EAGAIN if no
  1211.   IRQ line is available at that time.
  1212.  
  1213.   Some common problems that people have with the 503 are discussed in
  1214.   ``Problems with...''.
  1215.  
  1216.   If you intend on using this driver as a loadable module you should
  1217.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  1218.   Based Cards as Modules'' for module specific information.
  1219.  
  1220.   5.1.3.  3c505
  1221.  
  1222.   Status -- Semi-Supported
  1223.  
  1224.   This is a driver that was written by Craig Southeren
  1225.   geoffw@extro.ucc.su.oz.au. These cards also use the i82586 chip.
  1226.   There are not that many of these cards about.  It is included in the
  1227.   standard kernel, but it is classed as an alpha driver. See ``Alpha
  1228.   Drivers'' for important information on using alpha-test ethernet
  1229.   drivers with Linux.
  1230.  
  1231.   There is also the file /usr/src/linux/drivers/net/README.3c505 that
  1232.   you should read if you are going to use one of these cards.  It
  1233.   contains various options that you can enable/disable.  Technical
  1234.   information is available in ``Programming the Intel chips''.
  1235.  
  1236.   5.1.4.  3c507
  1237.  
  1238.   Status -- Semi-Supported
  1239.  
  1240.   This card uses one of the Intel chips, and the development of the
  1241.   driver is closely related to the development of the Intel Ether
  1242.   Express driver.  The driver is included in the standard kernel
  1243.   release, but as an alpha driver.
  1244.  
  1245.   See ``Alpha Drivers'' for important information on using alpha-test
  1246.   ethernet drivers with Linux. Technical information is available in
  1247.   ``Programming the Intel chips''.
  1248.  
  1249.   5.1.5.  3c509 / 3c509B
  1250.  
  1251.   Status -- Supported
  1252.  
  1253.   Note: Donald has an updated driver for these cards that is not
  1254.   presently in the default kernel. It fixes harmless irq N for unknown
  1255.   device messages at boot, has better handling for the 3c509B Plug and
  1256.   Pray cards, and recovers from certain adapter failure status values.
  1257.  
  1258.   It's fairly inexpensive and has excellent performance for a non-bus-
  1259.   master design.  The drawbacks are that the original 3c509 requires
  1260.   very low interrupt latency. The 3c509B shouldn't suffer from the same
  1261.   problem, due to having a larger buffer. (See below.)
  1262.  
  1263.   Note that the ISA card detection uses a different method than most
  1264.   cards. Basically, you ask the cards to respond by sending data to an
  1265.   ID_PORT (port 0x100). Note that if you have some other strange ISA
  1266.   card using an I/O range that includes the ID_PORT of the 3c509, it
  1267.   will probably not get detected. Note that you can change the ID_PORT
  1268.   to 0x110 or 0x120 or... in 3c509.c if you have a conflicting ISA card,
  1269.   and the 3c509 will still be happy.  Also note that this detection
  1270.   method means that a particular card will always get detected first in
  1271.   a multiple ISA 3c509 configuration.  The card with the lowest hardware
  1272.   ethernet address will always end up being eth0. This shouldn't matter
  1273.   to anyone, except for those people who want to assign a 6 byte
  1274.   hardware address to a particular interface.  If you have multiple
  1275.   3c509 cards, it is best to append ether=0,0,ethN commands without the
  1276.   i/o port specified (i.e. use i/o=zero) and allow the probe to sort out
  1277.   which card is first, otherwise it may not detect all your cards.
  1278.  
  1279.   The original 3c509 has a smaller packet buffer (4kB total, 2kB Rx, 2kB
  1280.   Tx), causing the driver to occasionally drop a packet if interrupts
  1281.   are masked for too long. To minimize this problem, you can try
  1282.   unmasking interrupts during IDE disk transfers (see hdparm(8)) and/or
  1283.   increasing your ISA bus speed so IDE transfers finish sooner.
  1284.  
  1285.   (Note that the driver could be completely rewritten to use predictive
  1286.   interrupts, but performance re-writes of working drivers are low
  1287.   priority unless there is some particular incentive or need.)
  1288.  
  1289.   Cameron Spitzer writes: ``Beware that if you put a '509 in EISA
  1290.   addressing mode by mistake and save that in the EEPROM, you'll have to
  1291.   use an EISA machine or the infamous Test Via to get it back to normal,
  1292.   and it will conflict at IO location 0 which may hang your ISA machine.
  1293.   I believe this problem is corrected in the 3C509B version of the
  1294.   board.''
  1295.  
  1296.   The newer model 3c509B has 8kB on board, and the buffer can be split
  1297.   4/4, 5/3 or 6/2 for Rx/Tx. This setting can also be stored on the
  1298.   EEPROM. This should alleviate the above problem with the original
  1299.   3c509. At this point in time, the Linux driver is not aware of this,
  1300.   and treats the 3c509B as an older 3c509.
  1301.  
  1302.   3c509B users should use the supplied DOS utility to disable the plug
  1303.   and play support, and to set the output media to what they require.
  1304.   Cameron adds: ``The 3C509B has 3Com's relocatable I/O port scheme, and
  1305.   Microsofttm Plug-and-play ("PnP").  You can't use them both at the
  1306.   same time.  Some (broken, IMHO) BIOSes begin a PnP sequence by writing
  1307.   to the PnP address (0x279 ?), which causes PnP adapters like 3C509B to
  1308.   enter the PnP state, but then they (these funny BIOSes) never come
  1309.   back to finish the job.  The 3C509Bs hang there in the middle of the
  1310.   PnP ID Sequence, where they have no idea you didn't mean it and you're
  1311.   going to use the 3Com ID sequence after all.  3C5X9CFG /PNPRST clears
  1312.   this hang.  Disable PnP if your drivers (eg., Linux) don't use it.
  1313.  
  1314.   It was a marketing decision to turn PnP on as a factory default
  1315.   setting.  If it caused you a hassle, or not, please take the time to
  1316.   say so when you mail in your warranty card.  The more info they have,
  1317.   the better decisions they can make.  Also, check with your motherboard
  1318.   supplier to see if you need a BIOS upgrade.''
  1319.  
  1320.   With regards to the media detection features, Cameron said:
  1321.   ``Autoselect is a feature of the commercial *drivers* for 3C509(B).
  1322.   AFAIK nobody ever claimed the Linux driver attempts it.  When
  1323.   drivers/net/3c509.c recognizes my 3C509B at boot time, it says: eth0:
  1324.   3c509 at 0x300 tag 1, 10baseT port, ...  revealing that the card is
  1325.   configured for 10BASE-T.  It finds that out by reading the little
  1326.   EEPROM, which IMHO is the Right Way To Do It.''
  1327.  
  1328.   5.1.6.  3c523
  1329.  
  1330.   Status -- Not Supported
  1331.  
  1332.   This MCA bus card uses the i82586, and now that people are actually
  1333.   running Linux on MCA machines, someone may wish to try and recycle
  1334.   parts of the 3c507 driver into a driver for this card.
  1335.  
  1336.   5.1.7.  3c527
  1337.  
  1338.   Status -- Not Supported
  1339.  
  1340.   Yes, another MCA card. No, not too much interest in it.  Better
  1341.   chances with the 3c523 or the 3c529.
  1342.  
  1343.   5.1.8.  3c529
  1344.  
  1345.   Status -- Not Supported
  1346.  
  1347.   This card actually uses the same chipset as the 3c509.  Donald
  1348.   actually put hooks into the 3c509 driver to check for MCA cards after
  1349.   probing for EISA cards, and before probing for ISA cards. But it
  1350.   hasn't evolved much further than that. Donald writes:
  1351.  
  1352.   ``I don't have access to a MCA machine (nor do I fully understand the
  1353.   probing code) so I never wrote the mca_adaptor_select_mode() or
  1354.   mca_adaptor_id() routines. If you can find a way to get the adaptor
  1355.   I/O address that assigned at boot time, you can just hard-wire that in
  1356.   place of the commented-out probe. Be sure to keep the code that reads
  1357.   the IRQ, if_port, and ethernet address.''
  1358.  
  1359.   5.1.9.  3c562
  1360.  
  1361.   Status -- Supported
  1362.  
  1363.   This PCMCIA card is the combination of a 3c589B ethernet card with a
  1364.   modem. The modem appears as a standard modem to the end user. The only
  1365.   difficulty is getting the two separate linux drivers to share one
  1366.   interrupt. There are a couple of new registers and some hardware
  1367.   interrupt sharing support.
  1368.  
  1369.   Thanks again to Cameron for getting a sample unit and documentation
  1370.   sent off to David Hinds. Look for support in David's next PCMCIA
  1371.   package release.
  1372.  
  1373.   5.1.10.  3c579
  1374.  
  1375.   Status -- Supported
  1376.  
  1377.   The EISA version of the 509. The current EISA version uses the same 16
  1378.   bit wide chip rather than a 32 bit interface, so the performance
  1379.   increase isn't stunning.  The EISA probe code was added to 3c509.c for
  1380.   0.99pl14.  We would be interested in hearing progress reports from any
  1381.   3c579 users. (Read the above 3c509 section for info on the driver.)
  1382.  
  1383.   Cameron Spitzer writes: ``The 3C579 (Etherlink III EISA) should be
  1384.   configured as an EISA card. The IO Base Address (window 0 register 6
  1385.   bits 4:0) should be 1f, which selects EISA addressing mode. Logic
  1386.   outside the ASIC decodes the IO address s000, where s is the slot
  1387.   number. I don't think it was documented real well. Except for its IO
  1388.   Base Address, the '579 should behave EXACTLY like the'509 (EL3 ISA),
  1389.   and if it doesn't, I want to hear about it (at my work address).''
  1390.  
  1391.   5.1.11.  3c589 / 3c589B
  1392.  
  1393.   Status -- Semi-Supported
  1394.  
  1395.   Many people have been using this PCMCIA card for quite some time now.
  1396.   Note that support for it is not (at present) included in the default
  1397.   kernel source tree. You will also need a supported PCMCIA controller
  1398.   chipset. There are drivers available on Donald's ftp site:
  1399.  
  1400.           cesdis.gsfc.nasa.gov:/pub/linux/pcmcia/README.3c589
  1401.           cesdis.gsfc.nasa.gov:/pub/linux/pcmcia/3c589.c
  1402.           cesdis.gsfc.nasa.gov:/pub/linux/pcmcia/dbether.c
  1403.  
  1404.   Or for those that are net-surfing you can try:
  1405.  
  1406.   Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>
  1407.  
  1408.   You will still need a PCMCIA socket enabler as well.
  1409.  
  1410.   See ``PCMCIA Support'' for more info on PCMCIA chipsets, socket
  1411.   enablers, etc.
  1412.  
  1413.   The "B" in the name means the same here as it does for the 3c509 case.
  1414.  
  1415.   5.1.12.  3c590 / 3c595
  1416.  
  1417.   Status -- Supported
  1418.  
  1419.   These ``Vortex'' cards are for PCI bus machines, with the '590 being
  1420.   10Mbps and the '595 being 3Com's 100Mbs offering.  Also note that you
  1421.   can run the '595 as a '590 (i.e. in a 10Mbps mode).  The driver will
  1422.   eventually appear in the 1.3.x kernel, but you can get the driver now
  1423.   from the following URL:
  1424.  
  1425.   Vortex <http://cesdis.gsfc.nasa.gov/linux/drivers/vortex.html>
  1426.  
  1427.   3Com has been offering an evaluation deal where you get 2 '595 cards
  1428.   for a total price of $250. Check with your local 3Com distributor to
  1429.   see if this is still available.
  1430.  
  1431.   A thanks to Cameron Spitzer and Terry Murphy of 3Com for sending cards
  1432.   and documentation to Donald so he could write the driver.
  1433.  
  1434.   5.1.13.  3c597
  1435.  
  1436.   Status -- Supported
  1437.  
  1438.   This is the recently released EISA version of the 3c59x series of
  1439.   cards. The 3c597 (aka Demon) should work with the vortex driver
  1440.   discussed above.
  1441.  
  1442.   5.2.  Accton
  1443.  
  1444.   5.2.1.  Accton MPX
  1445.  
  1446.   Status -- Supported
  1447.  
  1448.   Don't let the name fool you. This is still supposed to be a NE2000
  1449.   compatible card. The MPX is supposed to stand for MultiPacket
  1450.   Accelerator, which, according to Accton, increases throughput
  1451.   substantially. But if you are already sending back-to-back packets,
  1452.   how can you get any faster...
  1453.  
  1454.   5.2.2.  Accton EN1203, EN 1207, EtherDuo-PCI
  1455.  
  1456.   Status -- Supported
  1457.  
  1458.   This is another implementation of the DEC 21040 PCI chip.
  1459.  
  1460.   See ``DEC 21040'' for more information on these cards, and the present
  1461.   driver situation.
  1462.  
  1463.   5.2.3.  Accton EN2212 PCMCIA Card
  1464.  
  1465.   Status -- Semi-Supported
  1466.  
  1467.   David Hinds has been working on a driver for this card, and you are
  1468.   best to check the latest release of his PCMCIA package to see what the
  1469.   present status is.
  1470.  
  1471.   5.3.  Allied Telesyn/Telesis
  1472.  
  1473.   5.3.1.  AT1500
  1474.  
  1475.   Status --Supported
  1476.  
  1477.   These are a series of low-cost ethercards using the 79C960 version of
  1478.   the AMD LANCE. These are bus-master cards, and hence one of the faster
  1479.   ISA bus ethercards available.
  1480.  
  1481.   DMA selection and chip numbering information can be found in ``AMD
  1482.   LANCE''.
  1483.  
  1484.   More technical information on AMD LANCE based Ethernet cards can be
  1485.   found in ``Notes on AMD...''.
  1486.  
  1487.   5.3.2.  AT1700
  1488.  
  1489.   Status -- Supported
  1490.  
  1491.   The Allied Telesis AT1700 series ethercards are based on the Fujitsu
  1492.   MB86965. This chip uses a programmed I/O interface, and a pair of
  1493.   fixed-size transmit buffers. This allows small groups of packets to be
  1494.   sent back-to-back, with a short pause while switching buffers.
  1495.  
  1496.   A unique feature is the ability to drive 150ohm STP (Shielded Twisted
  1497.   Pair) cable commonly installed for Token Ring, in addition to 10baseT
  1498.   100ohm UTP (unshielded twisted pair).
  1499.  
  1500.   The Fujitsu chip used on the AT1700 has a design flaw: it can only be
  1501.   fully reset by doing a power cycle of the machine.  Pressing the reset
  1502.   button doesn't reset the bus interface. This wouldn't be so bad,
  1503.   except that it can only be reliably detected when it has been freshly
  1504.   reset. The solution/work-around is to power-cycle the machine if the
  1505.   kernel has a problem detecting the AT1700.
  1506.  
  1507.   Some production runs of the AT1700 had another problem: they are
  1508.   permanently wired to DMA channel 5.  This is undocumented, there are
  1509.   no jumpers to disable the "feature", and no driver dares use the DMA
  1510.   capability because of compatibility problems. No device driver will be
  1511.   written using DMA if installing a second card into the machine breaks
  1512.   both, and the only way to disable the DMA is with a knife.
  1513.  
  1514.   The at1700 driver is included in the standard kernel source tree.
  1515.  
  1516.   5.3.3.  AT2450
  1517.  
  1518.   Status -- Supported
  1519.  
  1520.   This is the PCI version of the AT1500, and it doesn't suffer from the
  1521.   problems that the Boca 79c970 PCI card does.  Allied Telsyn was still
  1522.   `beta testing' the card in early/mid 1995, so it may not have spread
  1523.   to various retailers yet (but it doesn't hurt to ask.)
  1524.  
  1525.   DMA selection and chip numbering information can be found in ``AMD
  1526.   LANCE''.
  1527.  
  1528.   More technical information on AMD LANCE based Ethernet cards can be
  1529.   found in ``Notes on AMD...''.
  1530.  
  1531.   5.4.  AMD / Advanced Micro Devices
  1532.  
  1533.   5.4.1.  AMD LANCE (7990, 79C960, PCnet-ISA)
  1534.  
  1535.   Status -- Supported
  1536.  
  1537.   There really is no AMD ethernet card. You are probably reading this
  1538.   because the only markings you could find on your card said AMD and the
  1539.   above number. The 7990 is the original `LANCE' chip, but most stuff
  1540.   (including this document) refer to all these similar chips as `LANCE'
  1541.   chips. (...incorrectly, I might add.)
  1542.  
  1543.   These above numbers refer to chips from AMD that are the heart of many
  1544.   ethernet cards.  For example, the Allied Telesis AT1500 (see
  1545.   ``AT1500'') the NE1500/2100 (see ``NE1500'') and the Boca-VLB/PCI
  1546.   cards (see ``Boca-VLB/PCI'')
  1547.  
  1548.   The 79C960 (a.k.a. PCnet-ISA) contains enhancements and bug fixes over
  1549.   the original 7990 LANCE design.
  1550.  
  1551.   One common problem people have is the `busmaster arbitration failure'
  1552.   message. This is printed out when the LANCE driver can't get access to
  1553.   the bus after a reasonable amount of time has elapsed (50us). This
  1554.   usually indicates that the motherboard implementation of bus-mastering
  1555.   DMA is broken, or some other device is hogging the bus, or there is a
  1556.   DMA channel conflict. If your BIOS setup has the `GAT option' (for
  1557.   Guaranteed Access Time) then try toggling/altering that setting to see
  1558.   if it helps.
  1559.  
  1560.   Chances are that the existing LANCE driver will work with all AMD
  1561.   LANCE based cards. (except perhaps some of the original 7990 designs
  1562.   with shared memory.)  This driver should also work with NE1500 and
  1563.   NE2100 clones.
  1564.  
  1565.   For the ISA bus master mode all structures used directly by the LANCE,
  1566.   the initialization block, Rx and Tx rings, and data buffers, must be
  1567.   accessible from the ISA bus, i.e. in the lower 16M of real memory.  If
  1568.   more than 16MB of memory is installed, low-memory `bounce-buffers' are
  1569.   used when needed.
  1570.  
  1571.   The DMA channel can be set with the low bits of the otherwise-unused
  1572.   dev->mem_start value (a.k.a. PARAM_1).  (see ``PARAM_1'') If unset it
  1573.   is probed for by enabling each free DMA channel in turn and checking
  1574.   if initialization succeeds.
  1575.  
  1576.   The HP-J2405A board is an exception: with this board it's easy to read
  1577.   the EEPROM-set values for the IRQ, and DMA.
  1578.  
  1579.   See ``Notes on AMD...''  for more info on these chips.
  1580.  
  1581.   5.4.2.  AMD 79C961 (PCnet-ISA+)
  1582.  
  1583.   Status -- Supported
  1584.  
  1585.   This is the PCnet-ISA+  -- an enhanced version of the 79C960.  It has
  1586.   support for jumper-less configuration and Plug and Play.  See the info
  1587.   in the above section.
  1588.  
  1589.   5.4.3.  AMD 79C965 (PCnet-32)
  1590.  
  1591.   Status -- Supported
  1592.  
  1593.   This is the PCnet-32 -- a 32 bit bus-master version of the original
  1594.   LANCE chip for VL-bus and local bus systems.  Minor cleanups were
  1595.   added to the original lance driver around v1.1.50 to support these 32
  1596.   bit versions of the LANCE chip.  The main problem was that the current
  1597.   versions of the '965 and '970 chips have a minor bug.  They clear the
  1598.   Rx buffer length field in the Rx ring when they are explicitly
  1599.   documented not to. Again, see the above info.
  1600.  
  1601.   5.4.4.  AMD 79C970 (PCnet-PCI)
  1602.  
  1603.   Status -- Supported
  1604.  
  1605.   This is the PCnet-PCI -- similar to the PCnet-32, but designed for PCI
  1606.   bus based systems. Again, see the above info.  Donald has modified the
  1607.   LANCE driver to use the PCI BIOS structure that was introduced by Drew
  1608.   Eckhardt for the PCI-NCR SCSI driver. This means that you need to
  1609.   build a kernel with PCI BIOS support enabled.
  1610.  
  1611.   Note that the Boca implementation of the 79C970 fails on fast Pentium
  1612.   machines. This is a hardware problem, as it affects DOS users as well.
  1613.   See the Boca section for more details.
  1614.  
  1615.   5.4.5.  AMD 79C974 (PCnet-SCSI)
  1616.  
  1617.   Status -- Supported
  1618.  
  1619.   This is the PCnet-SCSI --  which is basically treated like a '970 from
  1620.   an Ethernet point of view. A minor '974 specific fix was added to the
  1621.   1.1.8x kernels, so get a 1.1.90 or newer kernel. Also see the above
  1622.   info. Don't ask if the SCSI half of the chip is supported -- this is
  1623.   the Ethernet-Howto, not the SCSI-Howto.
  1624.  
  1625.   5.5.  Ansel Communications
  1626.  
  1627.   5.5.1.  AC3200 EISA
  1628.  
  1629.   Status -- Semi-Supported
  1630.  
  1631.   This driver is included in the present kernel as an alpha test driver.
  1632.   It is based on the common NS8390 chip used in the ne2000 and wd80x3
  1633.   cards.  Please see ``Alpha Drivers'' in this document for important
  1634.   information regarding alpha drivers.  If you use it, let Donald know
  1635.   how things work out, as not too many people have this card and
  1636.   feedback has been low, even though the driver has been in the kernel
  1637.   since v1.1.25.
  1638.  
  1639.   If you intend on using this driver as a loadable module you should
  1640.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  1641.   Based Cards as Modules'' for module specific information.
  1642.  
  1643.   5.6.  Apricot
  1644.  
  1645.   5.6.1.  Apricot Xen-II On Board Ethernet
  1646.  
  1647.   Status -- Supported
  1648.  
  1649.   This on board ethernet uses an i82596 bus-master chip.  It can only be
  1650.   at i/o address 0x300. The author of this driver is Mark Evans. By
  1651.   looking at the driver source, it appears that the IRQ is hardwired to
  1652.   10.
  1653.  
  1654.   Earlier versions of the driver had a tendency to think that anything
  1655.   living at 0x300 was an apricot NIC.  Since then the hardware address
  1656.   is checked to avoid these false detections.
  1657.  
  1658.   5.7.  Arcnet
  1659.  
  1660.   Status -- Supported
  1661.  
  1662.   With the very low cost and better performance of ethernet, chances are
  1663.   that most places will be giving away their Arcnet hardware for free,
  1664.   resulting in a lot of home systems with Arcnet.
  1665.  
  1666.   An advantage of Arcnet is that all of the cards have identical
  1667.   interfaces, so one driver will work for everyone. It also has built in
  1668.   error handling so that it supposedly never loses a packet.  (Great for
  1669.   UDP traffic!)
  1670.  
  1671.   Avery Pennarun's arcnet driver has been in the default kernel sources
  1672.   since 1.1.80. The arcnet driver uses `arc0' as its name instead of the
  1673.   usual `eth0' for ethernet devices.  Bug reports and success stories
  1674.   can be mailed to:
  1675.  
  1676.   apenwarr@foxnet.net
  1677.  
  1678.   There are information files contained in the standard kernel for
  1679.   setting jumpers and general hints.
  1680.  
  1681.   Supposedly the driver also works with the 100Mbs ARCnet cards as well!
  1682.  
  1683.   5.8.  AT&T
  1684.  
  1685.   Note that AT&T's StarLAN is an orphaned technology, like SynOptics
  1686.   LattisNet, and can't be used in a standard 10Base-T environment,
  1687.   without a hub that `speaks' both.
  1688.  
  1689.   5.8.1.  AT&T T7231 (LanPACER+)
  1690.  
  1691.   Status -- Not Supported
  1692.  
  1693.   These StarLAN cards use an interface similar to the i82586 chip. At
  1694.   one point, Matthijs Melchior (matthijs.n.melchior@att.com) was playing
  1695.   with the 3c507 driver, and almost had something useable working.
  1696.   Haven't heard much since that.
  1697.  
  1698.   5.9.  AT-Lan-Tec / RealTek
  1699.  
  1700.   5.9.1.  AT-Lan-Tec / RealTek Pocket adaptor
  1701.  
  1702.   Status -- Supported
  1703.  
  1704.   This is a generic, low-cost OEM pocket adaptor being sold by AT-Lan-
  1705.   Tec, and (likely) a number of other suppliers. A driver for it is
  1706.   included in the standard kernel.  Note that there is substantial
  1707.   information contained in the driver source file `atp.c'.  BTW, the
  1708.   adaptor (AEP-100L) has both 10baseT and BNC connections!  You can
  1709.   reach AT-Lan-Tec at 1-301-948-7070. Ask for the model that works with
  1710.   Linux, or ask for tech support.
  1711.  
  1712.   In the Netherlands a compatible adaptor is sold under the name SHI-TEC
  1713.   PE-NET/CT, and sells for about $125. The vendor was Megasellers.  They
  1714.   state that they do not sell to private persons, but this doesn't
  1715.   appear to be strictly adhered to.  They are: Megasellers, Vianen, The
  1716.   Netherlands. They always advertise in Dutch computer magazines.  Note
  1717.   that the newer model EPP-NET/CT appears to be significantly different
  1718.   than the PE-NET/CT, and will not work with the present driver.
  1719.   Hopefully someone will come up with the programming information and
  1720.   this will be fixed up.
  1721.  
  1722.   In Germany, a similar adaptor comes as a no-brand-name product. Prolan
  1723.   890b, no brand on the casing, only a roman II. Resellers can get a
  1724.   price of about $130, including a small wall transformer for the power.
  1725.  
  1726.   The adaptor is `normal size' for the product class, about 57mm wide,
  1727.   22mm high tapering to 15mm high at the DB25 connector, and 105mm long
  1728.   (120mm including the BNC socket). It's switchable between the RJ45 and
  1729.   BNC jacks with a small slide switch positioned between the two: a very
  1730.   intuitive design.
  1731.  
  1732.   Donald performed some power draw measurements, and determined that the
  1733.   average current draw was only about 100mA @ 5V.  This power draw is
  1734.   low enough that you could buy or build a cable to take the 5V directly
  1735.   from the keyboard/mouse port available on many laptops. (Bonus points
  1736.   here for using a standardized power connector instead of a proprietary
  1737.   one.)
  1738.  
  1739.   Note that the device name that you pass to ifconfig is not eth0 but
  1740.   atp0 for this device.
  1741.  
  1742.   5.10.  Boca Research
  1743.  
  1744.   Yes, they make more than just multi-port serial cards.  :-)
  1745.  
  1746.   5.10.1.  Boca BEN (PCI, VLB)
  1747.  
  1748.   Status -- Supported
  1749.  
  1750.   These cards are based on AMD's PCnet chips, used in the AT1500 and the
  1751.   like. You can pick up a combo (10BaseT and 10Base2) PCI card for under
  1752.   $70 at the moment.
  1753.  
  1754.   Perspective buyers should be warned that many users have had endless
  1755.   problems with these cards. Owners of fast Pentium systems have been
  1756.   especially hit. Note that this is not a driver problem, as it hits
  1757.   DOS/Win/NT users as well.  Boca's technical support number is (407)
  1758.   241-8088, and you can also reach them at 75300.2672@compuserve.com.
  1759.  
  1760.   Donald did a comparitive test with the above Boca PCI card and a
  1761.   similar Allied Telsyn PCnet/PCI implementation, which showed that the
  1762.   problem lies in Boca's implementation of the PCnet/PCI chip. These
  1763.   test results can be accessed on Don's www server.
  1764.  
  1765.   Linux at CESDIS <http://cesdis.gsfc.nasa.gov/linux/>
  1766.  
  1767.   Also, Dave Platt has compared the recommended implementation given on
  1768.   the AMD data sheet with the Boca implementation, and has determined
  1769.   that Boca has left out a substantial number of important filtering
  1770.   capacitors. At the risk of being verbose, here is a quote from Dave,
  1771.   which will allow you to assess if the problem has been addressed yet,
  1772.   given a card for visual inspection.
  1773.  
  1774.   ``I just reviewed Appendix B in the 79c970 data sheet.  It recommends
  1775.   a _minimum_ of 8 high-frequency bypassing caps (.1 uF multilayer
  1776.   ceramic) around the chip, to keep ground and power bounce from causing
  1777.   unreliable operation.  Looking at the card I have here, I see a total
  1778.   of 5 such caps on the entire card - only a couple of them are close
  1779.   enough to the chip to do a decent job of high-frequency bypassing.
  1780.  
  1781.   If you hold the card with chips facing up, and the PCI pins pointed
  1782.   towards you, the lower-left corner of the '970 has the positioning
  1783.   dimple.  The upper-left corner of the chip is the `analog corner',
  1784.   where the analog power and ground pins are.  Appendix B calls these
  1785.   `the most cricical pins in the layout of a PCnet-PCI card'.  There are
  1786.   4 analog power pins, and 2 analog ground pins... all of them are
  1787.   supposed to be connected, and properly bypassed.
  1788.  
  1789.   On the left side of the chip, the uppermost pin is AVSS1 (analog
  1790.   ground 1).  On the top edge, the fourth pin from the left is AVDD3
  1791.   (analog power 3).  The Appendix specifically recommends having a .1 uF
  1792.   bypass cap tied directly to these two pins (not going through the
  1793.   common ground plane).  On the card I have, there is no such cap - the
  1794.   nearest bypass cap is about half-an-inch away over by the crystal, and
  1795.   is tied to the ground plane.
  1796.  
  1797.   The Appendix also specifically recommends `low-frequency bulk
  1798.   capacitors' (by which I assume that they mean multi-uF tantalum or
  1799.   aluminum electrolytics) as well as high-frequency bypass caps.  I see
  1800.   only two bulk capacitors (one 10 uF in the AVSS2/AVDD2 filter circuit,
  1801.   and one 4.7 uF up above the chip which also appears to be part of a
  1802.   filter circuit).  The Appendix recommends `at least one low-frequency
  1803.   bulk (e.g. 22 uF) bypass capactor...  connected directly to the power
  1804.   and ground planes.'  There is no capacitor on the board which matches
  1805.   this description.
  1806.  
  1807.   It appears that Boca ignored _several_ of AMD's recommendations,
  1808.   regarding the number, size, placement, and wiring of the power supply
  1809.   bypass capacitors.''
  1810.  
  1811.   (Thanks Dave.) Boca is offering a `warranty repair' for affected
  1812.   owners, which involves adding one of the missing capacitors, but it
  1813.   appears that this fix doesn't work 100 percent for most people,
  1814.   although it helps some.
  1815.  
  1816.   If you are still thinking of buying one of these cards, then at least
  1817.   try and get a 7 day unconditional return policy, so that if it doesn't
  1818.   work properly in your system, you can return it.
  1819.  
  1820.   More general information on the AMD chips can be found in ``AMD
  1821.   LANCE''.
  1822.  
  1823.   More technical information on AMD LANCE based Ethernet cards can be
  1824.   found in ``Notes on AMD...''.
  1825.  
  1826.   5.11.  Cabletron
  1827.  
  1828.   Donald writes: `Yes, another one of these companies that won't release
  1829.   its programming information. They waited for months before actually
  1830.   confirming that all their information was proprietary, deliberately
  1831.   wasting my time. Avoid their cards like the plague if you can.  Also
  1832.   note that some people have phoned Cabletron, and have been told things
  1833.   like `a D. Becker is working on a driver for linux' -- making it sound
  1834.   like I work for them. This is NOT the case.'
  1835.  
  1836.   If you feel like asking them why they don't want to release their low
  1837.   level programming info so that people can use their cards, write to
  1838.   support@ctron.com.  Tell them that you are using Linux, and are
  1839.   disappointed that they don't support open systems. And no, the usual
  1840.   driver development kit they supply is useless. It is just a DOS object
  1841.   file that you are supposed to link against. Which you aren't allowed
  1842.   to even reverse engineer.
  1843.  
  1844.   5.11.1.  E10**, E10**-x, E20**, E20**-x
  1845.  
  1846.   Status -- Semi-Supported
  1847.  
  1848.   These are NEx000 almost-clones that are reported to work with the
  1849.   standard NEx000 drivers, thanks to a ctron-specific check during the
  1850.   probe. If there are any problems, they are unlikely to be fixed, as
  1851.   the programming information is unavailable.
  1852.  
  1853.   5.11.2.  E2100
  1854.  
  1855.   Status -- Semi-Supported
  1856.  
  1857.   Again, there is not much one can do when the programming information
  1858.   is proprietary.  The E2100 is a poor design. Whenever it maps its
  1859.   shared memory in during a packet transfer, it maps it into the whole
  1860.   128K region! That means you can't safely use another interrupt-driven
  1861.   shared memory device in that region, including another E2100.  It will
  1862.   work most of the time, but every once in a while it will bite you.
  1863.   (Yes, this problem can be avoided by turning off interrupts while
  1864.   transferring packets, but that will almost certainly lose clock
  1865.   ticks.) Also, if you mis-program the board, or halt the machine at
  1866.   just the wrong moment, even the reset button won't bring it back. You
  1867.   will have to turn it off and leave it off for about 30 seconds.
  1868.  
  1869.   Media selection is automatic, but you can override this with the low
  1870.   bits of the dev->mem_end parameter.  See ``PARAM_2''. Module users can
  1871.   specify an xcvr=N value on the insmod command line to do the same.
  1872.  
  1873.   Also, don't confuse the E2100 for a NE2100 clone.  The E2100 is a
  1874.   shared memory NatSemi DP8390 design, roughly similar to a brain-
  1875.   damaged WD8013, whereas the NE2100 (and NE1500) use a bus-mastering
  1876.   AMD LANCE design.
  1877.  
  1878.   There is an E2100 driver included in the standard kernel.  However,
  1879.   seeing as programming info isn't available, don't expect bug-fixes.
  1880.   Don't use one unless you are already stuck with the card.
  1881.  
  1882.   If you intend on using this driver as a loadable module you should
  1883.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  1884.   Based Cards as Modules'' for module specific information.
  1885.  
  1886.   5.12.  Cogent
  1887.  
  1888.   Here is where and how to reach them:
  1889.  
  1890.           Cogent Data Technologies, Inc.
  1891.           175 West Street, P.O. Box 926
  1892.           Friday Harbour, WA 98250, USA.
  1893.  
  1894.           Cogent Sales
  1895.           15375 S.E. 30th Place, Suite 310
  1896.           Bellevue, WA 98007, USA.
  1897.  
  1898.           Technical Support:
  1899.           Phone (360) 378-2929 between 8am and 5pm PST
  1900.           Fax (360) 378-2882
  1901.           Compuserve GO COGENT
  1902.           Bulletin Board Service (360) 378-5405
  1903.           Internet: support@cogentdata.com
  1904.  
  1905.   5.12.1.  Cogent eMASTER+, EM100, EM400, EM960, EM964
  1906.  
  1907.   Status -- Supported
  1908.  
  1909.   These are yet another DEC 21040 implementation that should work fine
  1910.   with the standard 21040 driver.
  1911.  
  1912.   The EM400 and the EM964 are four port cards using a DEC 21050 bridge
  1913.   and 4 21040 chips.
  1914.  
  1915.   See ``DEC 21040'' for more information on these cards, and the present
  1916.   driver situation.
  1917.  
  1918.   5.13.  D-Link
  1919.  
  1920.   Some people have had difficulty in finding vendors that carry D-link
  1921.   stuff. This should help.
  1922.  
  1923.                   (714) 455-1688  in the US
  1924.                   (081) 203-9900  in the UK
  1925.                   (416) 828-0260  in Canada
  1926.                   (02) 916-1600   in Taiwan
  1927.  
  1928.   5.13.1.  DE-100, DE-200, DE-220-T
  1929.  
  1930.   Status -- Supported
  1931.  
  1932.   The manual says that it is 100 % compatible with the NE2000. This is
  1933.   not true. You should call them and tell them you are using their card
  1934.   with Linux, and they should correct their documentation. Some
  1935.   pre-0.99pl12 driver versions may have trouble recognizing the DE2**
  1936.   series as 16 bit cards, and these cards are the most widely reported
  1937.   as having the spurious transfer address mismatch errors. Note that
  1938.   there are cards from Digital (DEC) that are also named DE100 and
  1939.   DE200, but the similarity stops there.
  1940.  
  1941.   5.13.2.  DE-520
  1942.  
  1943.   Status -- Supported
  1944.  
  1945.   This is a PCI card using the PCI version of AMD's LANCE chip.  DMA
  1946.   selection and chip numbering information can be found in ``AMD
  1947.   LANCE''.
  1948.  
  1949.   More technical information on AMD LANCE based Ethernet cards can be
  1950.   found in ``Notes on AMD...''.
  1951.  
  1952.   5.13.3.  DE-530
  1953.  
  1954.   Status -- Supported
  1955.  
  1956.   This is a generic DEC 21040 PCI chip implementation, and works with
  1957.   the generic 21040 driver.
  1958.  
  1959.   See ``DEC 21040'' for more information on these cards, and the present
  1960.   driver situation.
  1961.  
  1962.   5.13.4.  DE-600
  1963.  
  1964.   Status -- Supported
  1965.  
  1966.   Laptop users and other folk who might want a quick way to put their
  1967.   computer onto the ethernet may want to use this. The driver is
  1968.   included with the default kernel source tree.  Bjorn Ekwall
  1969.   bj0rn@blox.se wrote the driver.  Expect about 180kb/s transfer speed
  1970.   from this via the parallel port. You should read the README.DLINK file
  1971.   in the kernel source tree.
  1972.  
  1973.   Note that the device name that you pass to ifconfig is now eth0 and
  1974.   not the previously used dl0.
  1975.  
  1976.   If your parallel port is not at the standard 0x378 then you will have
  1977.   to recompile. Bjorn writes: ``Since the DE-620 driver tries to sqeeze
  1978.   the last microsecond from the loops, I made the irq and port address
  1979.   constants instead of variables. This makes for a usable speed, but it
  1980.   also means that you can't change these assignements from e.g. lilo;
  1981.   you _have_ to recompile...'' Also note that some laptops implement the
  1982.   on-board parallel port at 0x3bc which is where the parallel ports on
  1983.   monochrome cards were/are.
  1984.  
  1985.   5.13.5.  DE-620
  1986.  
  1987.   Status -- Supported
  1988.  
  1989.   Same as the DE-600, only with two output formats.  Bjorn has written a
  1990.   driver for this model, for kernel versions 1.1 and above. See the
  1991.   above information on the DE-600.
  1992.  
  1993.   5.13.6.  DE-650
  1994.  
  1995.   Status -- Semi-Supported
  1996.  
  1997.   Some people have been using this PCMCIA card for some time now with
  1998.   their notebooks. It is a basic 8390 design, much like a NE2000. The
  1999.   LinkSys PCMCIA card and the IC-Card Ethernet (available from Midwest
  2000.   Micro) are supposedly DE-650 clones as well.  Note that at present,
  2001.   this driver is not part of the standard kernel, and so you will have
  2002.   to do some patching.
  2003.  
  2004.   See ``PCMCIA Support'' in this document, and if you can, have a look
  2005.   at:
  2006.  
  2007.   Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>
  2008.  
  2009.   5.14.  DFI
  2010.  
  2011.   5.14.1.  DFINET-300 and DFINET-400
  2012.  
  2013.   Status -- Supported
  2014.  
  2015.   These cards are now detected (as of 0.99pl15) thanks to Eberhard
  2016.   Moenkeberg emoenke@gwdg.de who noted that they use `DFI' in the first
  2017.   3 bytes of the prom, instead of using 0x57 in bytes 14 and 15, which
  2018.   is what all the NE1000 and NE2000 cards use. (The 300 is an 8 bit
  2019.   pseudo NE1000 clone, and the 400 is a pseudo NE2000 clone.)
  2020.  
  2021.   5.15.  Digital / DEC
  2022.  
  2023.   5.15.1.  DEPCA, DE100/1, DE200/1/2, DE210, DE422
  2024.  
  2025.   Status -- Supported
  2026.  
  2027.   As of linux v1.0, there is a driver included as standard for these
  2028.   cards. It was written by David C. Davies.  There is documentation
  2029.   included in the source file `depca.c', which includes info on how to
  2030.   use more than one of these cards in a machine. Note that the DE422 is
  2031.   an EISA card. These cards are all based on the AMD LANCE chip.  See
  2032.   ``AMD LANCE'' for more info.  A maximum of two of the ISA cards can be
  2033.   used, because they can only be set for 0x300 and 0x200 base I/O
  2034.   address.  If you are intending to do this, please read the notes in
  2035.   the driver source file depca.c in the standard kernel source tree.
  2036.  
  2037.   This driver will also work on Alpha CPU based machines, and there are
  2038.   various ioctl()s that the user can play with.
  2039.  
  2040.   5.15.2.  Digital EtherWorks 3 (DE203, DE204, DE205)
  2041.  
  2042.   Status -- Supported
  2043.  
  2044.   Included into kernels v1.1.62 and above is this driver, also by David
  2045.   C. Davies of DEC. These cards use a proprietary chip from DEC, as
  2046.   opposed to the LANCE chip used in the earlier cards like the DE200.
  2047.   These cards support both shared memory or programmed I/O, although you
  2048.   take about a 50%performance hit if you use PIO mode. The shared memory
  2049.   size can be set to 2kB, 32kB or 64kB, but only 2 and 32 have been
  2050.   tested with this driver. David says that the performance is virtually
  2051.   identical between the 2kB and 32kB mode. There is more information
  2052.   (including using the driver as a loadable module) at the top of the
  2053.   driver file ewrk3.c and also in README.ewrk3.  Both of these files
  2054.   come with the standard kernel distribution.
  2055.  
  2056.   The standard driver has a number of interesting ioctl() calls that can
  2057.   be used to get or clear packet statistics, read/write the EEPROM,
  2058.   change the hardware address, and the like. Hackers can see the source
  2059.   code for more info on that one.
  2060.  
  2061.   David has also written a configuration utility for this card (along
  2062.   the lines of the DOS program NICSETUP.EXE) along with other tools.
  2063.   These can be found on sunsite.unc.edu in the directory
  2064.   /pub/Linux/system/Network/management -- look for the file ewrk3tools-
  2065.   X.XX.tar.gz.
  2066.  
  2067.   The next release of this driver (v0.40) will have Alpha CPU support
  2068.   like depca.c does and is available from David now if you require it.
  2069.  
  2070.   5.15.3.  DE425 (EISA), DE434, DE435, DE500
  2071.  
  2072.   Status -- Supported
  2073.  
  2074.   These cards are based on the 21040 chip mentioned below.  Included
  2075.   into kernels v1.1.86 and above is this driver, also by David C. Davies
  2076.   of DEC. It sure is nice to have support from someone on the inside
  2077.   ;-) The DE500 uses the newer 21140 chip to provide 10/100Mbs ethernet
  2078.   connections.  Have a read of the 21040 section below for extra info.
  2079.  
  2080.   Note that as of 1.1.91, David has added a compile time option that
  2081.   will allow non-DEC cards to work with this driver. Have a look at
  2082.   README.de4x5 for details.
  2083.  
  2084.   All the Digital cards will autoprobe for their media (except,
  2085.   temporarily, the DE500 due to a patent issue).
  2086.  
  2087.   This driver is also ALPHA CPU ready and supports being loaded as a
  2088.   module.  Users can access the driver internals through ioctl() calls -
  2089.   see the 'ewrk3' tools and the de4x5.c sources for information about
  2090.   how to do this.
  2091.  
  2092.   5.15.4.  DEC 21040, 21041, 21140, Tulip
  2093.  
  2094.   Status -- Supported
  2095.  
  2096.   The DEC 21040 is a bus-mastering single chip ethernet solution from
  2097.   Digital, similar to AMD's PCnet chip. The 21040 is specifically
  2098.   designed for the PCI bus architecture.  SMC's new EtherPower PCI card
  2099.   uses this chip.
  2100.  
  2101.   You have a choice of two drivers for cards based on this chip. There
  2102.   is the DE425 driver discussed above, and the generic 21040 driver that
  2103.   Donald has written.
  2104.  
  2105.   The updated 21041 chip is also found in place of the 21040 on newly
  2106.   produced SMC EtherPower cards.  The 21140 is for supporting 100Base-?
  2107.   and works with the Linux drivers for the 21040 chip.  To use David's
  2108.   de4x5 driver with non-DEC cards, have a look at README.de4x5 for
  2109.   details.
  2110.  
  2111.   Donald has used SMC EtherPower-10/100 cards to develop the `tulip'
  2112.   driver. Note that the driver that is in the standard kernel tree at
  2113.   the moment is not the most up to date version. If you intend on using
  2114.   this driver, you should get the newest version from Donald's ftp/WWW
  2115.   site.
  2116.  
  2117.   Tulip Driver <http://cesdis.gsfc.nasa.gov/linux/drivers/tulip.html>
  2118.  
  2119.   The above URL also contains a (non-exhaustive) list of various
  2120.   cards/vendors that use the 21040 chip.
  2121.  
  2122.   Also note that the tulip driver is still considered an alpha driver
  2123.   (see ``Alpha Drivers'') at the moment, and should be treated as such.
  2124.   To use it, you will have to edit arch/i386/config.in and uncomment the
  2125.   line for CONFIG_DEC_ELCP support.
  2126.  
  2127.   5.16.  Farallon
  2128.  
  2129.   Farallon sells EtherWave adaptors and transceivers. This device allows
  2130.   multiple 10baseT devices to be daisy-chained.
  2131.  
  2132.   5.16.1.  Farallon Etherwave
  2133.  
  2134.   Status -- Supported
  2135.  
  2136.   This is reported to be a 3c509 clone that includes the EtherWave
  2137.   transceiver. People have used these successfully with Linux and the
  2138.   present 3c509 driver. They are too expensive for general use, but are
  2139.   a great option for special cases.  Hublet prices start at $125, and
  2140.   Etherwave adds $75-$100 to the price of the board -- worth it if you
  2141.   have pulled one wire too few, but not if you are two network drops
  2142.   short.
  2143.  
  2144.   5.17.  Hewlett Packard
  2145.  
  2146.   The 272** cards use programmed I/O, similar to the NE*000 boards, but
  2147.   the data transfer port can be `turned off' when you aren't accessing
  2148.   it, avoiding problems with autoprobing drivers.
  2149.  
  2150.   Thanks to Glenn Talbott for helping clean up the confusion in this
  2151.   section regarding the version numbers of the HP hardware.
  2152.   5.17.1.  27245A
  2153.  
  2154.   Status -- Supported
  2155.  
  2156.   8 Bit 8390 based 10BaseT, not recommended for all the 8 bit reasons.
  2157.   It was re-designed a couple years ago to be highly integrated which
  2158.   caused some changes in initialization timing which only affected
  2159.   testing programs, not LAN drivers. (The new card is not `ready' as
  2160.   soon after switching into and out of loopback mode.)
  2161.  
  2162.   If you intend on using this driver as a loadable module you should
  2163.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  2164.   Based Cards as Modules'' for module specific information.
  2165.  
  2166.   5.17.2.  HP PC Lan+ (27247, 27252A)
  2167.  
  2168.   Status -- Supported
  2169.  
  2170.   The HP PC Lan+ is different to the standard HP PC Lan card. This
  2171.   driver was added to the list of drivers in the standard kernel during
  2172.   the v1.1.x development cycle. It can be operated in either a PIO mode
  2173.   like a ne2000, or a shared memory mode like a wd8013.
  2174.  
  2175.   The 47B is a 16 Bit 8390 based 10BaseT w/AUI, and the 52A is a 16 Bit
  2176.   8390 based ThinLAN w/AUI.  These cards have 32K onboard RAM for Tx/Rx
  2177.   packet buffering instead of the usual 16KB, and they both offer LAN
  2178.   connector autosense.
  2179.  
  2180.   If you intend on using this driver as a loadable module you should
  2181.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  2182.   Based Cards as Modules'' for module specific information.
  2183.  
  2184.   5.17.3.  HP-J2405A
  2185.  
  2186.   Status -- Supported
  2187.  
  2188.   These are lower priced, and slightly faster than the 27247/27252A, but
  2189.   are missing some features, such as AUI, ThinLAN connectivity, and boot
  2190.   PROM socket.  This is a fairly generic LANCE design, but a minor
  2191.   design decision makes it incompatible with a generic `NE2100' driver.
  2192.   Special support for it (including reading the DMA channel from the
  2193.   board) is included thanks to information provided by HP's Glenn
  2194.   Talbott.
  2195.  
  2196.   More technical information on LANCE based cards can be found in
  2197.   ``Notes on AMD...''
  2198.  
  2199.   5.17.4.  HP-Vectra On Board Ethernet
  2200.  
  2201.   Status -- Supported
  2202.  
  2203.   The HP-Vectra has an AMD PCnet chip on the motherboard.  Earlier
  2204.   kernel versions would detect it as the HP-J2405A but that would fail,
  2205.   as the Vectra doesn't report the IRQ and DMA channel like the J2405A.
  2206.   Get a kernel newer than v1.1.53 to avoid this problem.
  2207.  
  2208.   DMA selection and chip numbering information can be found in ``AMD
  2209.   LANCE''.
  2210.  
  2211.   More technical information on LANCE based cards can be found in
  2212.   ``Notes on AMD...''
  2213.  
  2214.   5.17.5.  HP 10/100 VG Any Lan Cards (27248B, J2573, J2577, J2585)
  2215.  
  2216.   Status -- Supported
  2217.  
  2218.   As of early 1.3.x kernels, this driver was made available by Jaroslav
  2219.   Kysela, (perex@pf.jcu.cz). Due to the newness of the driver and the
  2220.   relatively small number of VG cards in use, feedback on this driver
  2221.   has been low.
  2222.  
  2223.   Donald has also written a driver for these cards. Unlike the above, it
  2224.   is not presently in the standard kernel source tree.  Check out the
  2225.   following URL for more information on Donald's 100VG work.
  2226.  
  2227.   Donald's 100VG Page
  2228.   <http://cesdis.gsfc.nasa.gov/linux/drivers/100vg.html>
  2229.  
  2230.   5.18.  IBM / International Business Machines
  2231.  
  2232.   5.18.1.  IBM Thinkpad 300
  2233.  
  2234.   Status -- Supported
  2235.  
  2236.   This is compatible with the Intel based Zenith Z-note.  See ``Z-note''
  2237.   for more info.
  2238.  
  2239.   Supposedly this site has a comprehensive database of useful stuff for
  2240.   newer versions of the Thinkpad. I haven't checked it out myself yet.
  2241.  
  2242.   Thinkpad-info <http://peipa.essex.ac.uk/html/linux-thinkpad.html>
  2243.  
  2244.   For those without a WWW browser handy, try
  2245.   peipa.essex.ac.uk:/pub/tp750/
  2246.  
  2247.   5.18.2.  IBM Credit Card Adaptor for Ethernet
  2248.  
  2249.   Status -- Semi-Supported
  2250.  
  2251.   People have been using this PCMCIA card with Linux as well.  Similar
  2252.   points apply, those being that you need a supported PCMCIA chipset on
  2253.   your notebook, and that you will have to patch the PCMCIA support into
  2254.   the standard kernel.
  2255.  
  2256.   See ``PCMCIA Support'' in this document, and if you can, have a look
  2257.   at:
  2258.  
  2259.   Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>
  2260.  
  2261.   5.18.3.  IBM Token Ring
  2262.  
  2263.   Status -- Semi-Supported
  2264.  
  2265.   To support token ring requires more than only writing a device driver,
  2266.   it also requires writing the source routing routines for token ring.
  2267.   It is the source routing that would be the most time comsuming to
  2268.   write.
  2269.  
  2270.   Peter De Schrijver has been spending some time on Token Ring lately.
  2271.   and has worked with IBM ISA and MCA token ring cards.
  2272.  
  2273.   The present token ring code has been included into the first of the
  2274.   1.3.x series kernels.
  2275.  
  2276.   Peter says that it was originally tested on an MCA 16/4 Megabit Token
  2277.   Ring board, but it should work with other Tropic based boards.
  2278.  
  2279.   5.19.  ICL Ethernet Cards
  2280.  
  2281.   5.19.1.  ICL EtherTeam 16i/32
  2282.  
  2283.   Status -- Supported
  2284.  
  2285.   Mika Kuoppala (miku@pupu.elt.icl.fi) wrote this driver, and it was
  2286.   included into early 1.3.4x kernels. It uses the Fujitsu MB86965 chip
  2287.   that is also used on the at1700 cards.
  2288.  
  2289.   5.20.  Intel Ethernet Cards
  2290.  
  2291.   5.20.1.  Ether Express
  2292.  
  2293.   Status -- Semi-Supported
  2294.  
  2295.   This card uses the intel i82586. (Surprise, huh?)  The driver is in
  2296.   the standard release of the kernel, as an alpha driver. See ``Alpha
  2297.   Drivers'' for important information on using alpha-test ethernet
  2298.   drivers with Linux.
  2299.  
  2300.   The reason is that the driver works well with slow machines, but the
  2301.   i82586 occasionally hangs from the packet buffer contention that a
  2302.   fast machine can cause.  One reported hack/fix is to change all of the
  2303.   outw() calls to outw_p(). Also, the driver is missing promiscuous and
  2304.   multicast modes. (See ``Multicast and...'')
  2305.  
  2306.   There is also the standard way of using the chip (read slower) that is
  2307.   described in the chip manual, and used in other i82586 drivers, but
  2308.   this would require a re-write of the entire driver.
  2309.  
  2310.   There is some technical information available on the i82586 in
  2311.   ``Programming the Intel Chips'' and also in the source code for the
  2312.   driver `eexpress.c'. Don't be afraid to read it. ;-)
  2313.  
  2314.   5.20.2.  Ether Express PRO/10
  2315.  
  2316.   Status -- Supported
  2317.  
  2318.   Bao Chau Ha has written a driver for these cards that has been
  2319.   included into early 1.3.x kernels. It may also work with some of the
  2320.   Compaq built-in ethernet systems that are based on the i82595 chip.
  2321.  
  2322.   5.20.3.  Ether Express PRO/100
  2323.  
  2324.   Status -- Not Supported
  2325.  
  2326.   These PCI and EISA cards use a different chip that the PRO/10 cards
  2327.   do. Bao is currently trying to get a datasheet out of Intel without
  2328.   having to sign a NDA. Good Luck!
  2329.  
  2330.   5.21.  LinkSys
  2331.  
  2332.   5.21.1.  LinkSys Pocket Ethernet Adapter Plus (PEAEPP)
  2333.  
  2334.   Status -- Supported
  2335.  
  2336.   This is supposedly a DE-620 clone, and is reported to work well with
  2337.   that driver. See ``DE-620'' for more information.
  2338.  
  2339.   5.21.2.  LinkSys PCMCIA Adaptor
  2340.  
  2341.   Status -- Supported
  2342.  
  2343.   This is supposed to be a re-badged DE-650. See ``DE-650'' for more
  2344.   information.
  2345.  
  2346.   5.22.  Microdyne
  2347.  
  2348.   5.22.1.  Microdyne Exos 205T
  2349.  
  2350.   Status -- Semi-Supported
  2351.  
  2352.   Another i82586 based card. Dirk Niggemann dabn100@hermes.cam.ac.uk has
  2353.   written a driver that he classes as ``pre-alpha'' that he would like
  2354.   people to test. Mail him for more details.
  2355.  
  2356.   5.23.  Mylex
  2357.  
  2358.   Mylex can be reached at the following numbers, in case anyone wants to
  2359.   ask them anything.
  2360.  
  2361.           MYLEX CORPORATION, Fremont
  2362.           Sales:  800-77-MYLEX, (510) 796-6100
  2363.           FAX:    (510) 745-8016.
  2364.  
  2365.   5.23.1.  Mylex LNP101
  2366.  
  2367.   Status -- Supported
  2368.  
  2369.   This is a PCI card that is based on DEC's 21040 chip.  It is
  2370.   selectable between 10BaseT, 10Base2 and 10Base5 output.  The LNP101
  2371.   card has been verified to work with the generic 21040 driver.
  2372.  
  2373.   See the section on the 21040 chip (``DEC 21040'') for more
  2374.   information.
  2375.  
  2376.   5.23.2.  Mylex LNP104
  2377.  
  2378.   Status -- Not Supported
  2379.  
  2380.   The LNP104 uses the DEC 21050 chip to deliver four independent 10BaseT
  2381.   ports. It may work with 21040 drivers, but nobody has tried yet.
  2382.  
  2383.   5.23.3.  Mylex M390B EISA
  2384.  
  2385.   Status -- Not Supported
  2386.  
  2387.   Russ writes that "...it's a fairly vanilla 8390-based adapter.  Only
  2388.   really tricky thing is that, like the Interlan es3210, you MUST do
  2389.   only 32-bit transfers to/from the board.  Look at the Crynwr packet
  2390.   driver and try making the changes yourself...''
  2391.  
  2392.   5.24.  Novell Ethernet, NExxxx and associated clones.
  2393.  
  2394.   The prefix `NE' came from Novell Ethernet. Novell followed the
  2395.   cheapest NatSemi databook design and sold the manufacturing rights
  2396.   (spun off?) Eagle, just to get reasonably-priced ethercards into the
  2397.   market. (The now ubiquitous NE2000 card.)
  2398.  
  2399.   5.24.1.  NE1000, NE2000
  2400.  
  2401.   Status -- Supported
  2402.  
  2403.   NOTE: If you are using a kernel that is older than v1.2.9, it is
  2404.   strongly recommended that you upgrade to a newer version. There was an
  2405.   important bugfix made to the ne driver in 1.2.7, and another important
  2406.   bugfix made to the upper layers (dev.c) in 1.2.9. Both of these bugs
  2407.   can cause a ne2000 card to hang your computer.
  2408.  
  2409.   The ne2000 is now a generic name for a bare-bones design around the
  2410.   NatSemi 8390 chip. They use programmed I/O rather than shared memory,
  2411.   leading to easier installation but slightly lower performance and a
  2412.   few problems. Again, the savings of using an 8 bit NE1000 over the
  2413.   NE2000 are only warranted if you expect light use. Some recently
  2414.   introduced NE2000 clones use the National Semiconductor `AT/LANTic'
  2415.   83905 chip, which offers a shared memory mode similar to the 8013 and
  2416.   EEPROM or software configuration. Some problems can arise with poor
  2417.   NE2000 clones. See ``Problems with...'', and ``Poor NE2000 Clones'' In
  2418.   general it is not a good idea to put a NE2000 clone at I/O address
  2419.   0x300 because nearly every device driver probes there at boot. Some
  2420.   poor NE2000 clones don't take kindy to being prodded in the wrong
  2421.   areas, and will respond by locking your machine.
  2422.  
  2423.   Donald has written a NE2000 diagnostic program, but it is still
  2424.   presently in alpha test. (ne2k) See ``Diagnostic Programs'' for more
  2425.   information.
  2426.  
  2427.   If you intend on using this driver as a loadable module you should
  2428.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  2429.   Based Cards as Modules'' for module specific information.
  2430.  
  2431.   5.24.2.  NE1500, NE2100
  2432.  
  2433.   Status -- Supported
  2434.  
  2435.   These cards use the original 7990 LANCE chip from AMD and are
  2436.   supported using the Linux lance driver. Newer NE2100 clones use the
  2437.   updated PCnet/ISA chip from AMD.
  2438.  
  2439.   Some earlier versions of the lance driver had problems with getting
  2440.   the IRQ line via autoIRQ from the original Novell/Eagle 7990 cards.
  2441.   Hopefully this is now fixed.  If not, then specify the IRQ via LILO,
  2442.   and let us know that it still has problems.
  2443.  
  2444.   DMA selection and chip numbering information can be found in ``AMD
  2445.   LANCE''.
  2446.  
  2447.   More technical information on LANCE based cards can be found in
  2448.   ``Notes on AMD...''
  2449.  
  2450.   5.24.3.  NE3200
  2451.  
  2452.   Status -- Not Supported
  2453.  
  2454.   This card uses a lowly 8MHz 80186, and hence you are better off using
  2455.   a cheap NE2000 clone. Even if a driver was available, the NE2000 card
  2456.   would most likely be faster.
  2457.  
  2458.   5.25.  Pure Data
  2459.  
  2460.   5.25.1.  PDUC8028, PDI8023
  2461.  
  2462.   Status -- Supported
  2463.  
  2464.   The PureData PDUC8028 and PDI8023 series of cards are reported to
  2465.   work, thanks to special probe code contributed by Mike Jagdis
  2466.   jaggy@purplet.demon.co.uk. The support is integrated with the WD
  2467.   driver.
  2468.  
  2469.   5.26.  Racal-Interlan
  2470.  
  2471.   5.26.1.  NI5210
  2472.  
  2473.   Status -- Semi-Supported
  2474.  
  2475.   Michael Hipp has written a driver for this card. It is included in the
  2476.   standard kernel as an `alpha' driver. Michael would like to hear
  2477.   feedback from users that have this card. See ``Alpha Drivers'' for
  2478.   important information on using alpha-test ethernet drivers with Linux.
  2479.  
  2480.   Michael says that ``the internal sysbus seems to be slow.  So we often
  2481.   lose packets because of overruns while receiving from a fast remote
  2482.   host.''
  2483.  
  2484.   This card also uses one of the Intel chips. See ``Programming the
  2485.   Intel Chips'' for more technical information.
  2486.  
  2487.   5.26.2.  NI6510 (not EB)
  2488.  
  2489.   Status -- Semi-Supported
  2490.  
  2491.   There is also a driver for the LANCE based NI6510, and it is also
  2492.   written by Michael Hipp. Again, it is also an `alpha' driver. For some
  2493.   reason, this card is not compatible with the generic LANCE driver. See
  2494.   ``Alpha Drivers'' for important information on using alpha-test
  2495.   ethernet drivers with Linux.
  2496.  
  2497.   5.26.3.  EtherBlaster (aka NI6510EB)
  2498.  
  2499.   Status -- Supported
  2500.  
  2501.   As of kernel 1.3.23, the generic LANCE driver had a check added to it
  2502.   for the 0x52, 0x44 NI6510EB specific signature.  Others have reported
  2503.   that this signature is not the same for all NI6510EB cards however,
  2504.   which will cause the lance driver to not detect your card. If this
  2505.   happens to you, you can change the probe (at about line 322 in
  2506.   lance.c) to printk() out what the values are for your card and then
  2507.   use them instead of the 0x52, 0x44 defaults.
  2508.  
  2509.   The cards should probably be run in `high-performance' mode and not in
  2510.   the NI6510 compatible mode when using the lance driver.
  2511.  
  2512.   5.27.  Sager
  2513.  
  2514.   5.27.1.  Sager NP943
  2515.  
  2516.   Status -- Semi-Supported
  2517.  
  2518.   This is just a 3c501 clone, with a different S.A. PROM prefix. I
  2519.   assume it is equally as brain dead as the original 3c501 as well.
  2520.   Kernels 1.1.53 and up check for the NP943 i.d. and then just treat it
  2521.   as a 3c501 after that. See ``3Com 3c501'' for all the reasons as to
  2522.   why you really don't want to use one of these cards.
  2523.  
  2524.   5.28.  Schneider & Koch
  2525.  
  2526.   5.28.1.  SK G16
  2527.  
  2528.   Status -- Supported
  2529.  
  2530.   This driver was included into the v1.1 kernels, and it was written by
  2531.   PJD Weichmann and SWS Bern. It appears that the SK G16 is similar to
  2532.   the NI6510, in that it is based on the first edition LANCE chip (the
  2533.   7990). Once again, it appears as though this card won't work with the
  2534.   generic LANCE driver.
  2535.  
  2536.   5.29.  SEEQ
  2537.  
  2538.   5.29.1.  SEEQ 8005
  2539.  
  2540.   Status -- Supported
  2541.  
  2542.   This driver was included into early 1.3.x kernels, and was written by
  2543.   Hamish Coleman.  There is little information about the card included
  2544.   in the driver, and hence little information to be put here. If you
  2545.   have a question, you are probably best off e-mailing
  2546.   hamish@zot.apana.org.au
  2547.  
  2548.   5.30.  SMC (Standard Microsystems Corp.)
  2549.  
  2550.   Please see ``Western Digital'' for information on SMC cards.
  2551.  
  2552.   5.31.  Thomas Conrad
  2553.  
  2554.   5.31.1.  Thomas Conrad TC-5048
  2555.  
  2556.   This is yet another PCI card that is based on DEC's 21040 chip.
  2557.  
  2558.   See the section on the 21040 chip (``DEC 21040'') for more
  2559.   information.
  2560.  
  2561.   5.32.  Western Digital / SMC
  2562.  
  2563.   The ethernet part of Western Digital has been bought out by SMC.  One
  2564.   common mistake people make is that the relatively new SMC Elite Ultra
  2565.   is the same as the older SMC Elite16 models -- this is not the case.
  2566.  
  2567.   Here is how to contact SMC (not that you should need to.)
  2568.  
  2569.        SMC / Standard Microsystems Corp., 80 Arkay Drive, Hauppage,
  2570.        New York, 11788, USA.
  2571.  
  2572.   Technical Support via phone:
  2573.  
  2574.           800-992-4762 (USA)
  2575.           800-433-5345 (Canada)
  2576.           516-435-6250 (Other Countries)
  2577.  
  2578.   Literature requests:
  2579.  
  2580.           800-SMC-4-YOU (USA)
  2581.           800-833-4-SMC (Canada)
  2582.           516-435-6255  (Other Countries)
  2583.  
  2584.   Technical Support via E-mail:
  2585.  
  2586.           techsupt@ccmail.west.smc.com
  2587.  
  2588.   FTP Site:
  2589.  
  2590.           ftp.smc.com
  2591.  
  2592.   5.32.1.  WD8003, SMC Elite
  2593.  
  2594.   Status -- Supported
  2595.  
  2596.   These are the 8-bit versions of the card. The 8 bit 8003 is slightly
  2597.   less expensive, but only worth the savings for light use. Note that
  2598.   some of the non-EEPROM cards (clones with jumpers, or old old old
  2599.   wd8003 cards) have no way of reporting the IRQ line used. In this
  2600.   case, auto-irq is used, and if that fails, the driver silently assings
  2601.   IRQ 5.  Information regarding what the jumpers on old non-EEPROM
  2602.   wd8003 cards do can be found in conjunction with the SMC setup/driver
  2603.   disks stored on dorm.rutgers.edu in the directory
  2604.   /pub/novell/nic_drvs/. Note that some of the newer SMC `SuperDisk'
  2605.   programs will fail to detect the old EEPROM-less cards. The file
  2606.   SMCDSK46.EXE seems to be a good all-round choice. Also the jumper
  2607.   settings for old cards are in an ascii text file in the aforementioned
  2608.   archive. The latest (greatest?) version can be obtained from
  2609.   ftp.smc.com.
  2610.  
  2611.   As these are basically the same as their 16 bit counterparts (WD8013 /
  2612.   SMC Elite16), you should see the next section for more information.
  2613.  
  2614.   5.32.2.  WD8013, SMC Elite16
  2615.  
  2616.   Status -- Supported
  2617.  
  2618.   Over the years the design has added more registers and an EEPROM.
  2619.   Clones usually go by the `8013' name, and usually use a non-EEPROM
  2620.   (jumpered) design.  Late model SMC cards will have two main PLCC chips
  2621.   on board; the SMC 83c690 and the SMC 83c694.  The shared memory design
  2622.   makes the cards 10-20 % faster, than PIO cards, especially with larger
  2623.   packets.  More importantly, from the driver's point of view, it avoids
  2624.   a few bugs in the programmed-I/O mode of the 8390, allows safe multi-
  2625.   threaded access to the packet buffer, and it doesn't have a
  2626.   programmed-I/O data register that hangs your machine during warm-boot
  2627.   probes.
  2628.  
  2629.   Non-EEPROM cards that can't just read the selected IRQ will attempt
  2630.   auto-irq, and if that fails, they will silently assign IRQ 10. (8 bit
  2631.   versions will assign IRQ 5)
  2632.  
  2633.   Cards with a non standard amount of memory on board can have the
  2634.   memory size specified at boot (or at `insmod' time if using modules).
  2635.   The standard memory size is 8kB for an 8bit card and 16kB for a 16bit
  2636.   card.  For example, the older WD8003EBT cards could be jumpered for
  2637.   32kB memory. To make full use of that RAM, you would use something
  2638.   like (for i/o=0x280 and IRQ 9):
  2639.  
  2640.   ______________________________________________________________________
  2641.           LILO: linux ether=9,0x280,0xd0000,0xd8000,eth0
  2642.   ______________________________________________________________________
  2643.  
  2644.   Also see ``8013 problems'' for some of the more common problems that
  2645.   people have.
  2646.  
  2647.   If you intend on using this driver as a loadable module you should
  2648.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  2649.   Based Cards as Modules'' for module specific information.
  2650.  
  2651.   5.32.3.  SMC Elite Ultra
  2652.  
  2653.   Status -- Supported
  2654.  
  2655.   This ethercard is based on a new chip from SMC, with a few new
  2656.   features. While it has a mode that is similar to the older SMC
  2657.   ethercards, it's not entirely compatible with the old WD80*3 drivers.
  2658.   However, in this mode it shares most of its code with the other 8390
  2659.   drivers, while operating slightly faster than a WD8013 clone.
  2660.  
  2661.   Since part of the Ultra looks like an 8013, the Ultra probe is
  2662.   supposed to find an Ultra before the wd8013 probe has a chance to
  2663.   mistakenly identify it.
  2664.  
  2665.   Donald mentioned that it is possible to write a separate driver for
  2666.   the Ultra's `Altego' mode which allows chaining transmits at the cost
  2667.   of inefficient use of receive buffers, but that will probably not
  2668.   happen.
  2669.  
  2670.   Bus-Master SCSI host adaptor users take note: In the manual that ships
  2671.   with Interactive UNIX, it mentions that a bug in the SMC Ultra will
  2672.   cause data corruption with SCSI disks being run from an aha-154X host
  2673.   adaptor.  This will probably bite aha-154X compatible cards, such as
  2674.   the BusLogic boards, and the AMI-FastDisk SCSI host adaptors as well.
  2675.  
  2676.   SMC has acknowledged the problem occurs with Interactive, and older
  2677.   Windows NT drivers. It is a hardware conflict with early revisions of
  2678.   the card that can be worked around in the driver design. The current
  2679.   Ultra driver protects against this by only enabling the shared memory
  2680.   during data transfers with the card. Make sure your kernel version is
  2681.   at least 1.1.84, or that the driver version reported at boot is at
  2682.   least smc-ultra.c:v1.12 otherwise you are vulnerable.
  2683.  
  2684.   If you intend on using this driver as a loadable module you should
  2685.   probably see ``Using the Ethernet Drivers as Modules'' and also ``8390
  2686.   Based Cards as Modules'' for module specific information.
  2687.  
  2688.   5.32.4.  SMC 8416 (EtherEZ)
  2689.  
  2690.   Status -- Supported
  2691.  
  2692.   This card uses SMC's 83c795 chip and supports the Plug 'n Play
  2693.   specification. It also has an SMC Ultra compatible mode, which allows
  2694.   it to be used with the Linux Ultra driver.  In this compatibility
  2695.   mode, it uses shared memory instead of programmed i/o. Be sure to set
  2696.   your card for this compatibility mode. See the above information for
  2697.   notes on the Ultra driver.
  2698.  
  2699.   Note that the EtherEZ specific checks were added to the SMC Ultra
  2700.   driver in 1.1.84, and hence earlier kernel versions will not detect or
  2701.   handle these cards correctly.
  2702.  
  2703.   5.32.5.  SMC 8432 PCI (EtherPower)
  2704.  
  2705.   Status -- Supported
  2706.  
  2707.   These cards are a basic DEC 21040 implementation, i.e. one big chip
  2708.   and a couple of transceivers. Donald has used one of these cards for
  2709.   his development of the generic 21040 driver (aka tulip.c). Thanks to
  2710.   Duke Kamstra, once again, for supplying a card to do development on.
  2711.  
  2712.   Some of the newer revisons of this card use the newer DEC 21041 chip,
  2713.   which may cause problems with older versions of the tulip driver. Make
  2714.   sure you are using the latest driver release.
  2715.  
  2716.   See ``DEC 21040'' for more details on using one of these cards, and
  2717.   the current status of the driver.
  2718.  
  2719.   5.32.6.  SMC 3008
  2720.  
  2721.   Status -- Not Supported
  2722.  
  2723.   These 8 bit cards are based on the Fujitsu MB86950, which is an
  2724.   ancient version of the MB86965 used in the Linux at1700 driver. Russ
  2725.   says that you could probably hack up a driver by looking at the
  2726.   at1700.c code and his DOS packet driver for the Tiara card (tiara.asm)
  2727.  
  2728.   5.32.7.  SMC 3016
  2729.  
  2730.   Status -- Not Supported
  2731.  
  2732.   These are 16bit i/o mapped 8390 cards, much similar to a generic
  2733.   NE2000 card. If you can get the specifications from SMC, then porting
  2734.   the NE2000 driver would probably be quite easy.
  2735.  
  2736.   5.32.8.  SMC 9000
  2737.  
  2738.   Status -- Not Supported
  2739.  
  2740.   These cards are VLB cards based on the 91c92 chip. They are fairly
  2741.   expensive, and hence the demand for a driver is pretty low at the
  2742.   moment.
  2743.  
  2744.   5.33.  Xircom
  2745.  
  2746.   Another group that won't release documentation. No cards supported.
  2747.   Don't look for any support in the future unless they release their
  2748.   programming information. And this is highly unlikely, as they forbid
  2749.   you from even reverse- engineering their drivers. If you are already
  2750.   stuck with one, see if you can trade it off on some DOS (l)user.
  2751.  
  2752.   And if you just want to verify that this is the case, you can reach
  2753.   Xircom at 1-800-874-7875, 1-800-438-4526 or +1-818-878-7600.  They
  2754.   used to advertise that their products "work with all network operating
  2755.   systems", but have since stopped. Wonder why...
  2756.  
  2757.   5.33.1.  PE1, PE2, PE3-10B*
  2758.  
  2759.   Status -- Not Supported
  2760.  
  2761.   Not to get your hopes up, but if you have one of these parallel port
  2762.   adaptors, you may be able to use it in the DOS emulator with the
  2763.   Xircom-supplied DOS drivers. You will have to allow DOSEMU access to
  2764.   your parallel port, and will probably have to play with SIG (DOSEMU's
  2765.   Silly Interrupt Generator).
  2766.  
  2767.   5.34.  Zenith
  2768.  
  2769.   5.34.1.  Z-Note
  2770.  
  2771.   Status -- Supported
  2772.  
  2773.   The built-in Z-Note network adaptor is based on the Intel i82593 using
  2774.   two DMA channels. There is an (alpha?) driver available in the present
  2775.   kernel version. As with all notebook and pocket adaptors, it is under
  2776.   the `Pocket and portable adaptors' section when running make config.
  2777.   See ``Programming the Intel chips'' for more technical information.
  2778.   Also note that the IBM ThinkPad 300 is compatible with the Z-Note.
  2779.  
  2780.   5.35.  Znyx
  2781.  
  2782.   5.35.1.  Znyx ZX342 (DEC 21040 based)
  2783.  
  2784.   Status -- Supported
  2785.  
  2786.   You have a choice of two drivers for cards based on this chip. There
  2787.   is the DE425 driver written by David, and the generic 21040 driver
  2788.   that Donald has written.
  2789.  
  2790.   Note that as of 1.1.91, David has added a compile time option that may
  2791.   allow non-DEC cards (such as the Znyx cards) to work with this driver.
  2792.   Have a look at README.de4x5 for details.
  2793.  
  2794.   See ``DEC 21040'' for more information on these cards, and the present
  2795.   driver situation.
  2796.  
  2797.   5.36.  Drivers for Non-Ethernet Devices
  2798.  
  2799.   There are a few other drivers that are in the linux source, that
  2800.   present an ethernet-like device to network programs, while not really
  2801.   being ethernet. These are briefly listed here for completeness.
  2802.  
  2803.   dummy.c - The purpose of this driver is to provide a device to point a
  2804.   route through, but not to actually transmit packets.
  2805.  
  2806.   eql.c - Load Equalizer, enslaves multiple devices (usually modems) and
  2807.   balances the Tx load across them while presenting a single device to
  2808.   the network programs.
  2809.  
  2810.   ibmtr.c - IBM Token Ring, which is not really ethernet.  Broken-Ring
  2811.   requires source routing and other uglies.
  2812.  
  2813.   loopback.c - Loopback device, for which all packets from you machine
  2814.   and destined for your own machine go.  It essentially just moves the
  2815.   packet off the Tx queue and onto the Rx queue.
  2816.  
  2817.   pi2.c - Ottawa Amateur Radio Club PI and PI2 interface.
  2818.  
  2819.   plip.c - Parallel Line Internet Protocol, allows two computers to send
  2820.   packets to each other over two joined parallel ports in a point-to-
  2821.   point fashion.
  2822.  
  2823.   ppp.c - Point-to-Point Protocol (RFC1331), for the Transmission of
  2824.   Multi-protocol Datagrams over a Point-to-Point Link (again usually
  2825.   modems).
  2826.  
  2827.   slip.c - Serial Line Internet Protocol, allows two computers to send
  2828.   packets to each other over two joined serial ports (usually via
  2829.   modems) in a point-to-point fashion.
  2830.  
  2831.   tunnel.c - Provides an IP tunnel through which you can tunnel network
  2832.   traffic transparently across subnets
  2833.  
  2834.   wavelan.c - An Ethernet-like radio transceiver controlled by the Intel
  2835.   82586 coprocessor which is used on other ethercards such as the Intel
  2836.   EtherExpress.
  2837.  
  2838.   6.  Cables, Coax, Twisted Pair
  2839.  
  2840.   If you are starting a network from scratch, it's considerably less
  2841.   expensive to use thin ethernet, RG58 co-ax cable with BNC connectors,
  2842.   than old-fashioned thick ethernet, RG-5 cable with N connectors, or
  2843.   10baseT, twisted pair telco-style cables with RJ-45 eight wire `phone'
  2844.   connectors. See ``Type of cable...'' for an introductory look at
  2845.   cables.
  2846.  
  2847.   Also note that the FAQ from comp.dcom.lans.ethernet has a lot of
  2848.   useful information on cables and such. Look in dorm.rutgers.edu for
  2849.   the file /pub/novell/info_and_docs/Ethernet.FAQ
  2850.  
  2851.   6.1.  Thin Ethernet (thinnet)
  2852.  
  2853.   Thin ethernet is the `ether of choice'. The cable is inexpensive. If
  2854.   you are making your own cables solid-core RG58A is $0.27/m. and
  2855.   stranded RG58AU is $0.45/m. Twist-on BNC connectors are < $2 ea., and
  2856.   other misc. pieces are similarly inexpensive. It is essential that you
  2857.   properly terminate each end of the cable with 50 ohm terminators, so
  2858.   budget $2 ea. for a pair. It's also vital that your cable have no
  2859.   `stubs' -- the `T' connectors must be attached directly to the
  2860.   ethercards. The only drawback is that if you have a big loop of
  2861.   machines connected together, and some bonehead breaks the loop by
  2862.   taking one cable off the side of his tee, the whole network goes down
  2863.   because it sees an infinite impedance (open circuit) instead of the
  2864.   required 50 ohm termination. Note that you can remove the tee piece
  2865.   from the card itself without killing the whole subnet, as long as you
  2866.   don't remove the cables from the tee itself. Of course this will
  2867.   disturb the machine that you pull the actual tee off of. 8-) And if
  2868.   you are doing a small network of two machines, you still need the tees
  2869.   and the 50 ohm terminators -- you can't just cable them together!
  2870.  
  2871.   6.2.  Twisted Pair
  2872.  
  2873.   Twisted pair networks require active hubs, which start around $200,
  2874.   and the raw cable cost can actually be higher than thinnet. They are
  2875.   usually sold using the claim that you can use your existing telephone
  2876.   wiring, but it's a rare installation where that turns out to be the
  2877.   case. The claim that you can upgrade to higher speeds is also suspect,
  2878.   as most proposed schemes use higher-grade (read $$) cable and more
  2879.   sophisticated termination ($$$) than you would likely install on
  2880.   speculation. New gizmos are floating around which allow you to daisy-
  2881.   chain machines together, and the like. For example, Farallon sells
  2882.   EtherWave adaptors and transceivers. This device allows multiple
  2883.   10baseT devices to be daisy-chained. They also sell a 3c509 clone that
  2884.   includes the EtherWave transceiver.  The drawback is that it's more
  2885.   expensive and less reliable than a cheap ($100-$150) mini-hub and
  2886.   another ethercard.  You probably should either go for the hub approach
  2887.   or switch over to 10base2 thinnet.
  2888.  
  2889.   On the other hand, hubs are rapidly dropping in price, all 100Mb/sec
  2890.   ethernet proposals use twisted pair, and most new business
  2891.   installations use twisted pair. (This is probably to avoid the problem
  2892.   with idiots messing with the BNC's as described above.)
  2893.  
  2894.   Also, Russ Nelson adds that `New installations should use Category 5
  2895.   wiring. Anything else is a waste of your installer's time, as 100Base-
  2896.   whatever is going to require Cat 5.'
  2897.  
  2898.   If you are only connecting two machines, it is possible to avoid using
  2899.   a hub, by swapping the Rx and Tx pairs (1-2 and 3-6).
  2900.  
  2901.   If you hold the RJ-45 connector facing you (as if you were going to
  2902.   plug it into your mouth) with the lock tab on the top, then the pins
  2903.   are numbered 1 to 8 from left to right. The pin usage is as follows:
  2904.  
  2905.           Pin Number              Assignment
  2906.           ----------              ----------
  2907.           1                       Output Data (+)
  2908.           2                       Output Data (-)
  2909.           3                       Input Data (+)
  2910.           4                       Reserved for Telephone use
  2911.           5                       Reserved for Telephone use
  2912.           6                       Input Data (-)
  2913.           7                       Reserved for Telephone use
  2914.           8                       Reserved for Telephone use
  2915.  
  2916.   Some cards, like the wd8013 can sense reversed polarity, and will
  2917.   adjust accordingly. Also note that 3 and 6 must be a twisted pair. If
  2918.   you make 3-4 a twisted pair, and 5-6 the other twisted pair, your
  2919.   cable may work for lengths less than a metre, but will fail miserably
  2920.   for longer lengths.
  2921.  
  2922.   Note that before 10BaseT was ratified as a standard, there existed
  2923.   other network formats using RJ-45 connectors, and the same wiring
  2924.   scheme as above. Examples are SynOptics's LattisNet, and AT&T's
  2925.   StarLAN.  In some cases, (as with early 3C503 cards) you could set
  2926.   jumpers to get the card to talk to hubs of different types, but in
  2927.   most cases cards designed for these older types of networks will not
  2928.   work with standard 10BaseT networks/hubs. (Note that if the cards also
  2929.   have an AUI port, then there is no reason as to why you can't use
  2930.   that, combined with an AUI to 10BaseT transceiver.)
  2931.  
  2932.   6.3.  Thick Ethernet
  2933.  
  2934.   Thick ethernet is mostly obsolete, and is usually used only to remain
  2935.   compatible with an existing implementation. You can stretch the rules
  2936.   and connect short spans of thick and thin ethernet together with a
  2937.   passive $3 N-to-BNC connector, and that's often the best solution to
  2938.   expanding an existing thicknet. A correct (but expensive) solution is
  2939.   to use a repeater in this case.
  2940.  
  2941.   7.  Software Configuration and Card Diagnostics
  2942.  
  2943.   In most cases, if the configuration is done by software, and stored in
  2944.   an EEPROM, you will usually have to boot DOS, and use the supplied DOS
  2945.   program to set the cards IRQ, I/O, mem_addr and whatnot. Besides,
  2946.   hopefully it is something you will only be setting once. For those
  2947.   that don't have the DOS utility available, note that a fair number of
  2948.   NIC setup/driver disks (e.g. 3Com, SMC/WD and Allied Telesis NIC's)
  2949.   are available from dorm.rutgers.edu in the directory
  2950.   /pub/novell/nic_drvs/ However, there are some cards for which Linux
  2951.   versions of the config utils exist, and they are listed here.
  2952.  
  2953.   Also, Donald has written a few small card diagnostic programs that run
  2954.   under Linux. Most of these are a result of debugging tools that he has
  2955.   created while writing the various drivers. Don't expect fancy menu-
  2956.   driven interfaces. You will have to read the source code to use most
  2957.   of these. Even if your particular card doesn't have a corresponding
  2958.   diagnostic, you can still get lots of information just by typing cat
  2959.   /proc/net/dev -- assuming that your card was at least detected at
  2960.   boot.
  2961.  
  2962.   In either case, you will have to run most of these programs as root
  2963.   (to allow I/O to the ports) and you probably want to shut down the
  2964.   ethercard before doing so by typing ifconfig eth0 down (Note: replace
  2965.   eth0 with atp0 or whatever when appropriate.)
  2966.  
  2967.   7.1.  Configuration Programs for Ethernet Cards
  2968.  
  2969.   For people with wd80x3 cards, there is the program wdsetup which can
  2970.   be found in wdsetup-0.6a.tar.gz on Linux ftp sites.  I am not sure if
  2971.   it is being actively maintained or not, as it has not been updated for
  2972.   quite a while. If it works fine for you then great, if not, use the
  2973.   DOS version that you should have got with your card. If you don't have
  2974.   the DOS version, you will be glad to know that the SMC setup/driver
  2975.   disks are available at the dorm.rutgers.edu site mentioned above.  Of
  2976.   course, you have to have an EEPROM card to use this utility.  Old, old
  2977.   wd8003 cards, and some wd8013 clones use jumpers to set up the card
  2978.   instead.
  2979.  
  2980.   The Digital EtherWorks 3 card can be configured in a similar fashion
  2981.   to the DOS program NICSETUP.EXE. David C. Davies wrote this and other
  2982.   tools for the EtherWorks 3 in conjunction with the driver. Look on
  2983.   sunsite.unc.edu in the directory /pub/linux/system/Network/management
  2984.   for the file that is named ewrk3tools-X.XX.tar.gz.
  2985.  
  2986.   Some Nat Semi DP83905 implementations (such as the AT/LANTIC and the
  2987.   NE2000+) are software configurable. (Note that this card can also
  2988.   emulate a wd8013!) You can get the file /pub/linux/setup/atlantic.c
  2989.   from Donald's ftp server, cesdis.gsfc.nasa.gov to configure this card.
  2990.   Be careful when configuring NE2000+ cards, as you can give them bad
  2991.   setting values which will require you to open the case and switch a
  2992.   jumper to force it back to sane settings.
  2993.  
  2994.   The 3Com Etherlink III family of cards (i.e. 3c5x9) can be configured
  2995.   by using another config utility from Donald.  You can get the file
  2996.   /pub/linux/setup/3c5x9setup.c from Donald's ftp server,
  2997.   cesdis.gsfc.nasa.gov to configure these cards. (Note that the DOS
  2998.   3c5x9B config utility may have more options pertaining to the new
  2999.   ``B'' series of the Etherlink III family.)
  3000.  
  3001.   7.2.  Diagnostic Programs for Ethernet Cards
  3002.  
  3003.   Any of the diagnostic programs that Donald has written can be obtained
  3004.   from this URL.
  3005.  
  3006.   Ethercard Diagnostics
  3007.   <http://cesdis.gsfc.nasa.gov/pub/linux/diag/diagnostic.html>
  3008.  
  3009.   Allied Telesis AT1700 -- look for the file /pub/linux/diag/at1700.c on
  3010.   cesdis.gsfc.nasa.gov.
  3011.  
  3012.   Cabletron E21XX -- look for the file /pub/linux/diag/e21.c on
  3013.   cesdis.gsfc.nasa.gov.
  3014.  
  3015.   HP PCLAN+ -- look for the file /pub/linux/diag/hp+.c on
  3016.   cesdis.gsfc.nasa.gov.
  3017.  
  3018.   Intel EtherExpress -- look for the file /pub/linux/diag/eexpress.c on
  3019.   cesdis.gsfc.nasa.gov.
  3020.  
  3021.   NE2000 cards -- look for the file /pub/linux/diag/ne2k.c on
  3022.   cesdis.gsfc.nasa.gov.
  3023.  
  3024.   RealTek (ATP) Pocket adaptor -- look for the file /pub/linux/diag/atp-
  3025.   diag.c on cesdis.gsfc.nasa.gov.
  3026.  
  3027.   All Other Cards -- try typing cat /proc/net/dev and see what useful
  3028.   info the kernel has on the card in question.
  3029.  
  3030.   8.  Technical Information
  3031.  
  3032.   For those who want to play with the present drivers, or try to make up
  3033.   their own driver for a card that is presently unsupported, this
  3034.   information should be useful. If you do not fall into this category,
  3035.   then perhaps you will want to skip this section.
  3036.  
  3037.   8.1.  Probed Addresses
  3038.  
  3039.   While trying to determine what ethernet card is there, the following
  3040.   addresses are autoprobed, assuming the type and specs of the card have
  3041.   not been set in the kernel. The file names below are in
  3042.   /usr/src/linux/drivers/net/
  3043.  
  3044.   ______________________________________________________________________
  3045.           3c501.c         0x280, 0x300
  3046.           3c503.c:        0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2a0, 0x2e0
  3047.           3c505.c:        0x300, 0x280, 0x310
  3048.           3c507.c:        0x300, 0x320, 0x340, 0x280
  3049.           3c509.c:        Special ID Port probe
  3050.           apricot.c       0x300
  3051.           at1700.c:       0x300, 0x280, 0x380, 0x320, 0x340, 0x260, 0x2a0, 0x240
  3052.           atp.c:          0x378, 0x278, 0x3bc
  3053.           depca.c         0x300, 0x200
  3054.           de600.c:        0x378
  3055.           de620.c:        0x378
  3056.           eexpress.c:     0x300, 0x270, 0x320, 0x340
  3057.           hp.c:           0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240
  3058.           hp-plus.c       0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340
  3059.           lance.c:        0x300, 0x320, 0x340, 0x360
  3060.           ne.c:           0x300, 0x280, 0x320, 0x340, 0x360
  3061.           ni52.c          0x300, 0x280, 0x360, 0x320, 0x340
  3062.           ni65.c          0x300, 0x320, 0x340, 0x360
  3063.           smc-ultra.c:    0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380
  3064.           wd.c:           0x300, 0x280, 0x380, 0x240
  3065.   ______________________________________________________________________
  3066.  
  3067.   There are some NE2000 clone ethercards out there that are waiting
  3068.   black holes for autoprobe drivers. While many NE2000 clones are safe
  3069.   until they are enabled, some can't be reset to a safe mode.  These
  3070.   dangerous ethercards will hang any I/O access to their `dataports'.
  3071.   The typical dangerous locations are:
  3072.  
  3073.   ______________________________________________________________________
  3074.           Ethercard jumpered base     Dangerous locations (base + 0x10 - 0x1f)
  3075.                   0x300 *                         0x310-0x317
  3076.                   0x320                           0x330-0x337
  3077.                   0x340                           0x350-0x357
  3078.                   0x360                           0x370-0x377
  3079.   ______________________________________________________________________
  3080.  
  3081.   * The 0x300 location is the traditional place to put an ethercard, but
  3082.   it's also a popular place to put other devices (often SCSI
  3083.   controllers). The 0x320 location is often the next one chosen, but
  3084.   that's bad for for the AHA1542 driver probe. The 0x360 location is
  3085.   bad, because it conflicts with the parallel port at 0x378.  If you
  3086.   have two IDE controllers, or two floppy controlers, then 0x360 is also
  3087.   a bad choice, as a NE2000 card will clobber them as well.
  3088.  
  3089.   Note that kernels > 1.1.7X keep a log of who uses which i/o ports, and
  3090.   will not let a driver use i/o ports registered by an earlier driver.
  3091.   This may result in probes silently failing.  You can view who is using
  3092.   what i/o ports by typing cat /proc/ioports if you have the proc
  3093.   filesystem enabled.
  3094.  
  3095.   To avoid these lurking ethercards, here are the things you can do:
  3096.  
  3097.   ╖  Probe for the device's BIOS in memory space. This is easy and
  3098.      always safe, but it only works for cards that always have BIOSes,
  3099.      like primary SCSI controllers.
  3100.  
  3101.   ╖  Avoid probing any of the above locations until you think you've
  3102.      located your device. The NE2000 clones have a reset range from
  3103.      <base>+0x18 to <base>+0x1f that will read as 0xff, so probe there
  3104.      first if possible. It's also safe to probe in the 8390 space at
  3105.      <base>+0x00 - <base>+0x0f, but that area will return quasi-random
  3106.      values
  3107.  
  3108.   ╖  If you must probe in the dangerous range, for instance if your
  3109.      target device has only a few port locations, first check that there
  3110.      isn't an NE2000 there. You can see how to do this by looking at the
  3111.      probe code in /usr/src/linux/net/inet/ne.c
  3112.  
  3113.   ╖  Use the `reserve' boot time argument to protect volatile areas from
  3114.      being probed. See the information on using boot time arguments with
  3115.      LILO in ``The reserve command''
  3116.  
  3117.   8.2.  Writing a Driver
  3118.  
  3119.   The only thing that one needs to use an ethernet card with Linux is
  3120.   the appropriate driver. For this, it is essential that the
  3121.   manufacturer will release the technical programming information to the
  3122.   general public without you (or anyone) having to sign your life away.
  3123.   A good guide for the likelihood of getting documentation (or, if you
  3124.   aren't writing code, the likelihood that someone else will write that
  3125.   driver you really, really need) is the availability of the Crynwr (nee
  3126.   Clarkson) packet driver. Russ Nelson runs this operation, and has been
  3127.   very helpful in supporting the development of drivers for Linux. Net-
  3128.   surfers can try this URL to look up Russ' software.
  3129.  
  3130.   Russ Nelson's Packet Drivers <http://www.crynwr.com/crynwr/home.html>
  3131.  
  3132.   Given the documentation, you can write a driver for your card and use
  3133.   it for Linux (at least in theory).  Keep in mind that some old
  3134.   hardware that was designed for XT type machines will not function very
  3135.   well in a multitasking environment such as Linux. Use of these will
  3136.   lead to major problems if your network sees a reasonable amount of
  3137.   traffic.
  3138.  
  3139.   Most cards come with drivers for MS-DOS interfaces such as NDIS and
  3140.   ODI, but these are useless for Linux. Many people have suggested
  3141.   directly linking them in or automatic translation, but this is nearly
  3142.   impossible. The MS-DOS drivers expect to be in 16 bit mode and hook
  3143.   into `software interrupts', both incompatible with the Linux kernel.
  3144.   This incompatibility is actually a feature, as some Linux drivers are
  3145.   considerably better than their MS-DOS counterparts. The `8390' series
  3146.   drivers, for instance, use ping-pong transmit buffers, which are only
  3147.   now being introduced in the MS-DOS world.
  3148.  
  3149.   (Ping-pong Tx buffers means using at least 2 max-size packet buffers
  3150.   for Tx packets. One is loaded while the card is transmitting the
  3151.   other. The second is then sent as soon as the first finished, and so
  3152.   on. In this way, most cards are able to continuously send back-to-back
  3153.   packets onto the wire.)
  3154.  
  3155.   OK. So you have decided that you want to write a driver for the Foobar
  3156.   Ethernet card, as you have the programming information, and it hasn't
  3157.   been done yet. (...these are the two main requirements ;-) You should
  3158.   start with the skeleton network driver that is provided with the Linux
  3159.   kernel source tree. It can be found in the file
  3160.   /usr/src/linux/drivers/net/skeleton.c in all recent kernels.
  3161.  
  3162.   8.3.  Driver interface to the kernel
  3163.  
  3164.   Here are some notes on the functions that you would have to write if
  3165.   creating a new driver. Reading this in conjunction with the above
  3166.   skeleton driver may help clear things up.
  3167.  
  3168.   8.3.1.  Probe
  3169.  
  3170.   Called at boot to check for existence of card. Best if it can check
  3171.   un-obtrsively by reading from memory, etc. Can also read from i/o
  3172.   ports. Initial writing to i/o ports in a probe is not good as it may
  3173.   kill another device.  Some device initialization is usually done here
  3174.   (allocating i/o space, IRQs,filling in the dev->??? fields etc.)  You
  3175.   need to know what io ports/mem the card can be configured to, how to
  3176.   enable shared memory (if used) and how to select/enable interrupt
  3177.   generation, etc.
  3178.  
  3179.   8.3.2.  Interrupt handler
  3180.  
  3181.   Called by the kernel when the card posts an interrupt.  This has the
  3182.   job of determining why the card posted an interrupt, and acting
  3183.   accordingly. Usual interrupt conditions are data to be rec'd, transmit
  3184.   completed, error conditions being reported. You need to know any
  3185.   relevant interrupt status bits so that you can act accordingly.
  3186.  
  3187.   8.3.3.  Transmit function
  3188.  
  3189.   Linked to dev->hard_start_xmit() and is called by the kernel when
  3190.   there is some data that the kernel wants to put out over the device.
  3191.   This puts the data onto the card and triggers the transmit. You need
  3192.   to know how to bundle the data and how to get it onto the card (shared
  3193.   memory copy, PIO transfer, DMA?) and in the right place on the card.
  3194.   Then you need to know how to tell the card to send the data down the
  3195.   wire, and (possibly) post an interrupt when done.  When the hardware
  3196.   can't accept additional packets it should set the dev->tbusy flag.
  3197.   When additional room is available, usually during a transmit-complete
  3198.   interrupt, dev->tbusy should be cleared and the higher levels informed
  3199.   with mark_bh(INET_BH).
  3200.  
  3201.   8.3.4.  Receive function
  3202.  
  3203.   Called by the kernel interrupt handler when the card reports that
  3204.   there is data on the card. It pulls the data off the card, packages it
  3205.   into a sk_buff and lets the kernel know the data is there for it by
  3206.   doing a netif_rx(sk_buff). You need to know how to enable interrupt
  3207.   generation upon Rx of data, how to check any relevant Rx status bits,
  3208.   and how to get that data off the card (again sh mem, PIO, DMA, etc.)
  3209.  
  3210.   8.3.5.  Open function
  3211.  
  3212.   linked to dev->open and called by the networking layers when somebody
  3213.   does ifconfig eth0 up - this puts the device on line and enables it
  3214.   for Rx/Tx of data. Any special initialization incantations that were
  3215.   not done in the probe sequence (enabling IRQ generation, etc.)  would
  3216.   go in here.
  3217.  
  3218.   8.3.6.  Close function (optional)
  3219.  
  3220.   This puts the card in a sane state when someone does ifconfig eth0
  3221.   down.  It should free the IRQs and DMA channels if the hardware
  3222.   permits, and turn off anything that will save power (like the
  3223.   transceiver).
  3224.  
  3225.   8.3.7.  Miscellaneous functions
  3226.  
  3227.   Things like a reset function, so that if things go south, the driver
  3228.   can try resetting the card as a last ditch effort.  Usually done when
  3229.   a Tx times out or similar. Also a function to read the statistics
  3230.   registers of the card if so equipped.
  3231.  
  3232.   8.4.  Interrupts and Linux
  3233.  
  3234.   There are two kinds of interrupt handlers in Linux: fast ones and slow
  3235.   ones. You decide what kind you are installing by the flags you pass to
  3236.   irqaction(). The fast ones, such as the serial interrupt handler, run
  3237.   with _all_ interrupts disabled. The normal interrupt handlers, such as
  3238.   the one for ethercard drivers, runs with other interrupts enabled.
  3239.  
  3240.   There is a two-level interrupt structure. The `fast' part handles the
  3241.   device register, removes the packets, and perhaps sets a flag.  After
  3242.   it is done, and interrupts are re-enabled, the slow part is run if the
  3243.   flag is set.
  3244.  
  3245.   The flag between the two parts is set by:
  3246.  
  3247.        mark_bh(INET_BH);
  3248.  
  3249.   Usually this flag is set within dev_rint() during a received-packet
  3250.   interrupt, and set directly by the device driver during a transmit-
  3251.   complete interrupt.
  3252.  
  3253.   You might wonder why all interrupt handlers cannot run in `normal
  3254.   mode' with other interrupts enabled. Ross Biro uses this scenario to
  3255.   illustrate the problem:
  3256.  
  3257.   ╖  You get a serial interrupt, and start processing it.  The serial
  3258.      interrupt is now masked.
  3259.  
  3260.   ╖  You get a network interrupt, and you start transferring a maximum-
  3261.      sized 1500 byte packet from the card.
  3262.  
  3263.   ╖  Another character comes in, but this time the interrupts are
  3264.      masked!
  3265.  
  3266.   The `fast' interrupt structure solves this problem by allowing
  3267.   bounded-time interrupt handlers to run without the risk of leaving
  3268.   their interrupt lines masked by another interrupt request.
  3269.  
  3270.   There is an additional distinction between fast and slow interrupt
  3271.   handlers -- the arguments passed to the handler. A `slow' handler is
  3272.   defined as
  3273.  
  3274.   ______________________________________________________________________
  3275.  
  3276.                   static void
  3277.                   handle_interrupt(int reg_ptr)
  3278.                   {
  3279.                       int irq = -(((struct pt_regs *)reg_ptr)->orig_eax+2);
  3280.                       struct device *dev = irq2dev_map[irq];
  3281.                   ...
  3282.   ______________________________________________________________________
  3283.  
  3284.   While a fast handler gets the interrupt number directly
  3285.  
  3286.   ______________________________________________________________________
  3287.  
  3288.                   static void
  3289.                   handle_fast_interrupt(int irq)
  3290.                   {
  3291.                   ...
  3292.   ______________________________________________________________________
  3293.  
  3294.   A final aspect of network performance is latency. The only board that
  3295.   really addresses this is the 3c509, which allows a predictive
  3296.   interrupt to be posted. It provides an interrupt response timer so
  3297.   that the driver can fine-tune how early an interrupt is generated.
  3298.  
  3299.   8.5.  Programming the Intel chips (i82586 and i82593)
  3300.  
  3301.   These chips are used on a number of cards, namely the 3c507 ('86), the
  3302.   Intel EtherExpress 16 ('86), Microdyne's exos205t ('86), the Z-Note
  3303.   ('93), and the Racal-Interlan ni5210 ('86).
  3304.  
  3305.   Russ Nelson writes: `Most boards based on the 82586 can reuse quite a
  3306.   bit of their code.  More, in fact, than the 8390-based adapters. There
  3307.   are only three differences between them:
  3308.  
  3309.   ╖  The code to get the Ethernet address,
  3310.  
  3311.   ╖  The code to trigger CA on the 82586, and
  3312.  
  3313.   ╖  The code to reset the 82586.
  3314.  
  3315.   The Intel EtherExpress 16 is an exception, as it I/O maps the 82586.
  3316.   Yes, I/O maps it. Fairly clunky, but it works.
  3317.  
  3318.   Garrett Wollman did an AT&T driver for BSD that uses the BSD
  3319.   copyright. The latest version I have (Sep '92) only uses a single
  3320.   transmit buffer. You can and should do better than this if you've got
  3321.   the memory. The AT&T and 3c507 adapters do; the ni5210 doesn't.
  3322.  
  3323.   The people at Intel gave me a very big clue on how you queue up
  3324.   multiple transmit packets. You set up a list of NOP-> XMIT-> NOP->
  3325.   XMIT-> NOP-> XMIT-> beginning) blocks, then you set the `next' pointer
  3326.   of all the NOP blocks to themselves. Now you start the command unit on
  3327.   this chain. It continually processes the first NOP block. To transmit
  3328.   a packet, you stuff it into the next transmit block, then point the
  3329.   NOP to it. To transmit the next packet, you stuff the next transmit
  3330.   block and point the previous NOP to it. In this way, you don't have to
  3331.   wait for the previous transmit to finish, you can queue up multiple
  3332.   packets without any ambiguity as to whether it got accepted, and you
  3333.   can avoid the command unit start-up delay.'
  3334.  
  3335.   8.6.  Technical information from 3Com
  3336.  
  3337.   If you are interested in working on drivers for 3Com cards, you can
  3338.   get technical documentation from 3Com. Cameron has been kind enough to
  3339.   tell us how to go about it below:
  3340.  
  3341.   3Com's Ethernet Adapters are documented for driver writers in our
  3342.   `Technical References' (TRs). These manuals describe the programmer
  3343.   interfaces to the boards but they don't talk about the diagnostics,
  3344.   installation programs, etc that end users can see.
  3345.  
  3346.   The Network Adapter Division marketing department has the TRs to give
  3347.   away. To keep this program efficient, we centralized it in a thing
  3348.   called `CardFacts.' CardFacts is an automated phone system. You call
  3349.   it with a touch-tone phone and it faxes you stuff. To get a TR, call
  3350.   CardFacts at 408-727-7021. Ask it for Developer's Order Form, document
  3351.   number 9070. Have your fax number ready when you call. Fill out the
  3352.   order form and fax it to 408-764-5004.  Manuals are shipped by Federal
  3353.   Express 2nd Day Service.
  3354.  
  3355.   After you get a manual, if you still can't figure out how to program
  3356.   the board, try our `CardBoard' BBS at 1-800-876-3266, and if you can't
  3357.   do that, write Andy_Chan@3Mail.3com.com and ask him for alternatives.
  3358.   If you have a real stumper that nobody has figured out yet, the fellow
  3359.   who needs to know about it is Steve_Lebus@3Mail.3com.com.
  3360.  
  3361.   There are people here who think we are too free with the manuals, and
  3362.   they are looking for evidence that the system is too expensive, or
  3363.   takes too much time and effort. That's why it's important to try to
  3364.   use CardFacts before you start calling and mailing the people I named
  3365.   here.
  3366.  
  3367.   There are even people who think we should be like Diamond and Xircom,
  3368.   requiring tight `partnership' with driver writers to prevent poorly
  3369.   performing drivers from getting written. So far, 3Com customers have
  3370.   been really good about this, and there's no problem with the level of
  3371.   requests we've been getting. We need your continued cooperation and
  3372.   restraint to keep it that way.
  3373.  
  3374.           Cameron Spitzer, 408-764-6339
  3375.           3Com NAD
  3376.           Santa Clara
  3377.           work: camerons@nad.3com.com
  3378.           home: cls@truffula.sj.ca.us
  3379.  
  3380.   8.7.  Notes on AMD PCnet / LANCE Based cards
  3381.  
  3382.   The AMD LANCE (Local Area Network Controller for Ethernet) was the
  3383.   original offering, and has since been replaced by the `PCnet-ISA'
  3384.   chip, otherwise known as the 79C960.  A relatively new chip from AMD,
  3385.   the 79C960, is the heart of many new cards being released at present.
  3386.   Note that the name `LANCE' has stuck, and some people will refer to
  3387.   the new chip by the old name. Dave Roberts of the Network Products
  3388.   Division of AMD was kind enough to contribute the following
  3389.   information regarding this chip:
  3390.   `As for the architecture itself, AMD developed it originally and
  3391.   reduced it to a single chip -- the PCnet(tm)-ISA -- over a year ago.
  3392.   It's been selling like hotcakes ever since.
  3393.  
  3394.   Functionally, it is equivalent to a NE1500. The register set is
  3395.   identical to the old LANCE with the 1500/2100 architecture additions.
  3396.   Older 1500/2100 drivers will work on the PCnet-ISA.  The NE1500 and
  3397.   NE2100 architecture is basically the same.  Initially Novell called it
  3398.   the 2100, but then tried to distinguish between coax and 10BASE-T
  3399.   cards. Anything that was 10BASE-T only was to be numbered in the 1500
  3400.   range. That's the only difference.
  3401.  
  3402.   Many companies offer PCnet-ISA based products, including HP, Racal-
  3403.   Datacom, Allied Telesis, Boca Research, Kingston Technology, etc.  The
  3404.   cards are basically the same except that some manufacturers have added
  3405.   `jumperless' features that allow the card to be configured in
  3406.   software. Most have not. AMD offers a standard design package for a
  3407.   card that uses the PCnet-ISA and many manufacturers use our design
  3408.   without change.  What this means is that anybody who wants to write
  3409.   drivers for most PCnet-ISA based cards can just get the data-sheet
  3410.   from AMD. Call our literature distribution center at (800)222-9323 and
  3411.   ask for the Am79C960, PCnet-ISA data sheet. It's free.
  3412.  
  3413.   A quick way to understand whether the card is a `stock' card is to
  3414.   just look at it. If it's stock, it should just have one large chip on
  3415.   it, a crystal, a small IEEE address PROM, possibly a socket for a boot
  3416.   ROM, and a connector (1, 2, or 3, depending on the media options
  3417.   offered). Note that if it's a coax card, it will have some transceiver
  3418.   stuff built onto it as well, but that should be near the connector and
  3419.   away from the PCnet-ISA.'
  3420.  
  3421.   There is also some info regarding the LANCE chip in the file lance.c
  3422.   which is included in the standard kernel.
  3423.  
  3424.   A note to would-be card hackers is that different LANCE
  3425.   implementations do `restart' in different ways. Some pick up where
  3426.   they left off in the ring, and others start right from the beginning
  3427.   of the ring, as if just initialised. This is a concern when setting
  3428.   the multicast list.
  3429.  
  3430.   8.8.  Multicast and Promiscuous Mode
  3431.  
  3432.   Another one of the things Donald has worked on is implementing
  3433.   multicast and promiscuous mode hooks.  All of the released (i.e. not
  3434.   ALPHA) ISA drivers now support promiscuous mode.
  3435.  
  3436.   Donald writes: `At first I was planning to do it while implementing
  3437.   either the /dev/* or DDI interface, but that's not really the correct
  3438.   way to do it. We should only enable multicast or promiscuous modes
  3439.   when something wants to look at the packets, and shut it down when
  3440.   that application is finished, neither of which is strongly related to
  3441.   when the hardware is opened or released.
  3442.  
  3443.   I'll start by discussing promiscuous mode, which is conceptually easy
  3444.   to implement. For most hardware you only have to set a register bit,
  3445.   and from then on you get every packet on the wire. Well, it's almost
  3446.   that easy; for some hardware you have to shut the board (potentially
  3447.   dropping a few packet), reconfigure it, and then re-enable the
  3448.   ethercard. This is grungy and risky, but the alternative seems to be
  3449.   to have every application register before you open the ethercard at
  3450.   boot-time.
  3451.  
  3452.   OK, so that's easy, so I'll move on something that's not quite so
  3453.   obvious: Multicast. It can be done two ways:
  3454.   1. Use promiscuous mode, and a packet filter like the Berkeley packet
  3455.      filter (BPF). The BPF is a pattern matching stack language, where
  3456.      you write a program that picks out the addresses you are interested
  3457.      in. Its advantage is that it's very general and programmable. Its
  3458.      disadvantage is that there is no general way for the kernel to
  3459.      avoid turning on promiscuous mode and running every packet on the
  3460.      wire through every registered packet filter. See ``The Berkeley
  3461.      Packet Filter'' for more info.
  3462.  
  3463.   2. Using the built-in multicast filter that most etherchips have.
  3464.  
  3465.   I guess I should list what a few ethercards/chips provide:
  3466.  
  3467.           Chip/card  Promiscuous  Multicast filter
  3468.           ----------------------------------------
  3469.           Seeq8001/3c501  Yes     Binary filter (1)
  3470.           3Com/3c509      Yes     Binary filter (1)
  3471.           8390            Yes     Autodin II six bit hash (2) (3)
  3472.           LANCE           Yes     Autodin II six bit hash (2) (3)
  3473.           i82586          Yes     Hidden Autodin II six bit hash (2) (4)
  3474.  
  3475.   1. These cards claim to have a filter, but it's a simple yes/no
  3476.      `accept all multicast packets', or `accept no multicast packets'.
  3477.  
  3478.   2. AUTODIN II is the standard ethernet CRC (checksum) polynomial. In
  3479.      this scheme multicast addresses are hashed and looked up in a hash
  3480.      table. If the corresponding bit is enabled, this packet is
  3481.      accepted. Ethernet packets are laid out so that the hardware to do
  3482.      this is trivial -- you just latch six (usually) bits from the CRC
  3483.      circuit (needed anyway for error checking) after the first six
  3484.      octets (the destination address), and use them as an index into the
  3485.      hash table (six bits -- a 64-bit table).
  3486.  
  3487.   3. These chips use the six bit hash, and must have the table computed
  3488.      and loaded by the host. This means the kernel must include the CRC
  3489.      code.
  3490.  
  3491.   4. The 82586 uses the six bit hash internally, but it computes the
  3492.      hash table itself from a list of multicast addresses to accept.
  3493.  
  3494.   Note that none of these chips do perfect filtering, and we still need
  3495.   a middle-level module to do the final filtering. Also note that in
  3496.   every case we must keep a complete list of accepted multicast
  3497.   addresses to recompute the hash table when it changes.
  3498.  
  3499.   My first pass at device-level support is detailed in the outline
  3500.   driver skeleton.c
  3501.  
  3502.   It looks like the following:
  3503.  
  3504.   ______________________________________________________________________
  3505.           #ifdef HAVE_MULTICAST
  3506.           static void set_multicast_list(struct device *dev, int num_addrs,
  3507.                            void *addrs);
  3508.           #endif
  3509.           .
  3510.           .
  3511.  
  3512.           ethercard_open() {
  3513.           ...
  3514.           #ifdef HAVE_MULTICAST
  3515.                   dev->set_multicast_list = &set_multicast_list;
  3516.           #endif
  3517.           ...
  3518.  
  3519.           #ifdef HAVE_MULTICAST
  3520.           /* Set or clear the multicast filter for this adaptor.
  3521.              num_addrs -- -1      Promiscuous mode, receive all packets
  3522.              num_addrs -- 0       Normal mode, clear multicast list
  3523.              num_addrs > 0        Multicast mode, receive normal and
  3524.                   MC packets, and do best-effort filtering.
  3525.            */
  3526.           static void
  3527.           set_multicast_list(struct device *dev, int num_addrs, void *addrs)
  3528.           {
  3529.           ...
  3530.   ______________________________________________________________________
  3531.  
  3532.   Any comments, criticism, etc. are welcome.'
  3533.  
  3534.   8.9.  The Berkeley Packet Filter (BPF)
  3535.  
  3536.   The general idea of the developers is that the BPF functionality
  3537.   should not be provided by the kernel, but should be in a (hopefully
  3538.   little-used) compatibility library.
  3539.  
  3540.   For those not in the know: BPF (the Berkeley Packet Filter) is an
  3541.   mechanism for specifying to the kernel networking layers what packets
  3542.   you are interested in. It's implemented as a specialized stack
  3543.   language interpreter built into a low level of the networking code. An
  3544.   application passes a program written in this language to the kernel,
  3545.   and the kernel runs the program on each incoming packet. If the kernel
  3546.   has multiple BPF applications, each program is run on each packet.
  3547.  
  3548.   The problem is that it's difficult to deduce what kind of packets the
  3549.   application is really interested in from the packet filter program, so
  3550.   the general solution is to always run the filter. Imagine a program
  3551.   that registers a BPF program to pick up a low data-rate stream sent to
  3552.   a multicast address.  Most ethernet cards have a hardware multicast
  3553.   address filter implemented as a 64 entry hash table that ignores most
  3554.   unwanted multicast packets, so the capability exists to make this a
  3555.   very inexpensive operation. But with the BFP the kernel must switch
  3556.   the interface to promiscuous mode, receive _all_ packets, and run them
  3557.   through this filter. This is work, BTW, that's very difficult to
  3558.   account back to the process requesting the packets.
  3559.  
  3560.   9.  Networking with a Laptop/Notebook Computer
  3561.  
  3562.   There are currently only a few ways to put your laptop on a network.
  3563.   You can use the SLIP code (and run at serial line speeds); you can buy
  3564.   one of the few laptops that come with a NE2000-compatible ethercard;
  3565.   you can get a notebook with a supported PCMCIA slot built-in; you can
  3566.   get a laptop with a docking station and plug in an ISA ethercard; or
  3567.   you can use a parallel port Ethernet adapter such as the D-Link
  3568.   DE-600.
  3569.  
  3570.   9.1.  Using SLIP
  3571.  
  3572.   This is the cheapest solution, but by far the most difficult. Also,
  3573.   you will not get very high transmission rates. Since SLIP is not
  3574.   really related to ethernet cards, it will not be discussed further
  3575.   here. See the NET-2 Howto.
  3576.  
  3577.   9.2.  Built in NE2000
  3578.  
  3579.   This solution severely limits your laptop choices and is fairly
  3580.   expensive. Be sure to read the specifications carefully, as you may
  3581.   find that you will have to buy an additional non-standard transceiver
  3582.   to actually put the machine on a network. A good idea might be to boot
  3583.   the notebook with a kernel that has ne2000 support, and make sure it
  3584.   gets detected and works before you lay down your cash.
  3585.  
  3586.   9.3.  PCMCIA Support
  3587.  
  3588.   As this area of Linux development is fairly young, I'd suggest that
  3589.   you join the LAPTOPS mailing channel. See ``Mailing lists...''  which
  3590.   describes how to join a mailing list channel.
  3591.  
  3592.   Try and determine exactly what hardware you have (ie. card
  3593.   manufacturer, PCMCIA chip controller manufacturer) and then ask on the
  3594.   LAPTOPS channel. Regardless, don't expect things to be all that
  3595.   simple.  Expect to have to fiddle around a bit, and patch kernels,
  3596.   etc.  Maybe someday you will be able to type `make config' 8-)
  3597.  
  3598.   At present, the two PCMCIA chipsets that are supported are the
  3599.   Databook TCIC/2 and the intel i82365.
  3600.  
  3601.   There is a number of programs on tsx-11.mit.edu in
  3602.   /pub/linux/packages/laptops/ that you may find useful. These range
  3603.   from PCMCIA Ethercard drivers to programs that communicate with the
  3604.   PCMCIA controller chip. Note that these drivers are usually tied to a
  3605.   specific PCMCIA chip (ie. the intel 82365 or the TCIC/2)
  3606.  
  3607.   For NE2000 compatible cards, some people have had success with just
  3608.   configuring the card under DOS, and then booting linux from the DOS
  3609.   command prompt via loadlin.
  3610.  
  3611.   For those that are net-surfing you can try:
  3612.  
  3613.   Don's PCMCIA Stuff <http://cesdis.gsfc.nasa.gov/linux/pcmcia.html>
  3614.  
  3615.   Anyway, the PCMCIA driver problem isn't specific to the Linux world.
  3616.   It's been a real disaster in the MS-DOS world. In that world people
  3617.   expect the hardware to work if they just follow the manual.  They
  3618.   might not expect it to interoperate with any other hardware or
  3619.   software, or operate optimally, but they do expect that the software
  3620.   shipped with the product will function. Many PCMCIA adaptors don't
  3621.   even pass this test.
  3622.  
  3623.   Things are looking up for Linux users that want PCMCIA support, as
  3624.   substantial progress is being made. Pioneering this effort is David
  3625.   Hinds. His latest PCMCIA support package can be obtained from cb-
  3626.   iris.stanford.edu in the directory /pub/pcmcia/. Look for a file like
  3627.   pcmcia-cs-X.Y.Z.tgz where X.Y.Z will be the latest version number.
  3628.   This is most likely uploaded to tsx-11.mit.edu as well.
  3629.  
  3630.   Note that Donald's PCMCIA enabler works as a user-level process, and
  3631.   David Hinds' is a kernel-level solution.  You may be best served by
  3632.   David's package as it is much more widely used.
  3633.  
  3634.   9.4.  ISA Ethercard in the Docking Station.
  3635.  
  3636.   Docking stations for laptops typically cost about $250 and provide two
  3637.   full-size ISA slots, two serial and one parallel port. Most docking
  3638.   stations are powered off of the laptop's batteries, and a few allow
  3639.   adding extra batteries in the docking station if you use short ISA
  3640.   cards. You can add an inexpensive ethercard and enjoy full-speed
  3641.   ethernet performance.
  3642.  
  3643.   9.5.  Pocket / parallel port adaptors.
  3644.  
  3645.   The `pocket' ethernet adaptors may also fit your need.  Until recently
  3646.   they actually costed more than a docking station and cheap ethercard,
  3647.   and most tie you down with a wall-brick power supply.  At present, you
  3648.   can choose from the D-Link, or the RealTek adaptor.  Most other
  3649.   companies, especially Xircom, (see ``Xircom'') treat the programming
  3650.   information as a trade secret, so support will likely be slow in
  3651.   coming. (if ever!)
  3652.  
  3653.   Note that the transfer speed will not be all that great (perhaps
  3654.   100kB/s tops?) due to the limitations of the parallel port interface.
  3655.  
  3656.   See ``DE-600 / DE-620'' and ``RealTek'' for supported pocket adaptors.
  3657.  
  3658.   You can sometimes avoid the wall-brick with the adaptors by buying or
  3659.   making a cable that draws power from the laptop's keyboard port. (See
  3660.   ``keyboard power'')
  3661.  
  3662.   10.  Miscellaneous.
  3663.  
  3664.   Any other associated stuff that didn't fit in anywhere else gets
  3665.   dumped here. It may not be relevant, and it may not be of general
  3666.   interest but it is here anyway.
  3667.  
  3668.   10.1.  Passing Ethernet Arguments to the Kernel
  3669.  
  3670.   Here are two generic kernel commands  that can be passed to the kernel
  3671.   at boot time. This can be done with LILO, loadlin, or any other
  3672.   booting utility that accepts optional arguments.
  3673.  
  3674.   For example, if the command was `blah' and it expected 3 arguments
  3675.   (say 123, 456, and 789) then, with LILO, you would use:
  3676.  
  3677.   LILO: linux blah=123,456,789
  3678.  
  3679.   Note: PCI cards have their i/o and IRQ assigned by the BIOS at boot.
  3680.   This means that any boot time arguments for a PCI card's IRQ or i/o
  3681.   ports are usually ignored.
  3682.  
  3683.   For more information on (and a complete list of) boot time arguments,
  3684.   please see the BootPrompt-HOWTO
  3685.   <http://sunsite.unc.edu/mdw/HOWTO/BootPrompt-HOWTO.html>
  3686.  
  3687.   10.1.1.  The ether command
  3688.  
  3689.   In its most generic form, it looks something like this:
  3690.  
  3691.        ether=IRQ,BASE_ADDR,PARAM_1,PARAM_2,NAME
  3692.  
  3693.   All arguments are optional.  The first non-numeric argument is taken
  3694.   as the NAME.
  3695.  
  3696.   IRQ: Obvious.  An IRQ value of `0' (usually the default) means to
  3697.   autoIRQ.  It's a historical accident that the IRQ setting is first
  3698.   rather than the base_addr -- this will be fixed whenever something
  3699.   else changes.
  3700.  
  3701.   BASE_ADDR: Also obvious.  A value of `0' (usually the default) means
  3702.   to probe a card-type-specific address list for an ethercard.
  3703.  
  3704.   PARAM_1: It was orginally used as an override value for the memory
  3705.   start for a shared-memory ethercard, like the WD80*3.  Some drivers
  3706.   use the low four bits of this value to set the debug message level.  0
  3707.   -- default, 1-7 -- level 1..7, (7 is maximum verbosity)  8 -- level 0
  3708.   (no messages). Also, the LANCE driver uses the low four bits of this
  3709.   value to select the DMA channel.  Otherwise it uses auto-DMA.
  3710.  
  3711.   PARAM_2: The 3c503 driver uses this to select between the internal and
  3712.   external transceivers.  0 -- default/internal, 1 -- AUI external.  The
  3713.   Cabletron E21XX card also uses the low 4 bits of PARAM_2 to select the
  3714.   output media. Otherwise it detects automatically.
  3715.  
  3716.   NAME: Selects the network device the values refer to.  The standard
  3717.   kernel uses the names `eth0', `eth1', `eth2' and `eth3' for bus-
  3718.   attached ethercards, and `atp0' for the parallel port `pocket'
  3719.   ethernet adaptor. The arcnet driver uses `arc0' as its name.  The
  3720.   default setting is for a single ethercard to be probed for as `eth0'.
  3721.   Multiple cards can only be enabled by explicitly setting up their base
  3722.   address using these LILO parameters.  The 1.0 kernel has LANCE-based
  3723.   ethercards as a special case.  LILO arguments are ignored, and LANCE
  3724.   cards are always assigned `eth<n>' names starting at `eth0'.
  3725.   Additional non-LANCE ethercards must be explicitly assigned to
  3726.   `eth<n+1>', and the usual `eth0' probe disabled with something like
  3727.   `ether=0,-1,eth0'.  ( Yes, this is bug. )
  3728.  
  3729.   10.1.2.  The reserve command
  3730.  
  3731.   This next lilo command is used just like `ether=' above, ie. it is
  3732.   appended to the name of the boot select specified in lilo.conf
  3733.  
  3734.        reserve=IO-base,extent{,IO-base,extent...}
  3735.  
  3736.   In some machines it may be necessary to prevent device drivers from
  3737.   checking for devices (auto-probing) in a specific region. This may be
  3738.   because of poorly designed hardware that causes the boot to freeze
  3739.   (such as some ethercards), hardware that is mistakenly identified,
  3740.   hardware whose state is changed by an earlier probe, or merely
  3741.   hardware you don't want the kernel to initialize.
  3742.  
  3743.   The reserve boot-time argument addresses this problem by specifying an
  3744.   I/O port region that shouldn't be probed. That region is reserved in
  3745.   the kernel's port registration table as if a device has already been
  3746.   found in that region. Note that this mechanism shouldn't be necessary
  3747.   on most machines. Only when there is a problem or special case would
  3748.   it be necessary to use this.
  3749.  
  3750.   The I/O ports in the specified region are protected against device
  3751.   probes. This was put in to be used when some driver was hanging on a
  3752.   NE2000, or misidentifying some other device as its own.  A correct
  3753.   device driver shouldn't probe a reserved region, unless another boot
  3754.   argument explicitly specifies that it do so.  This implies that
  3755.   reserve will most often be used with some other boot argument. Hence
  3756.   if you specify a reserve region to protect a specific device, you must
  3757.   generally specify an explicit probe for that device. Most drivers
  3758.   ignore the port registration table if they are given an explicit
  3759.   address.
  3760.  
  3761.   For example, the boot line
  3762.  
  3763.        LILO: linux  reserve=0x300,32  ether=0,0x300,eth0
  3764.  
  3765.   keeps all device drivers except the ethercard drivers from probing
  3766.   0x300-0x31f.
  3767.  
  3768.   As usual with boot-time specifiers there is an 11 parameter limit,
  3769.   thus you can only specify 5 reserved regions per reserve keyword.
  3770.   Multiple reserve specifiers will work if you have an unusually
  3771.   complicated request.
  3772.  
  3773.   10.2.  Using the Ethernet Drivers as Modules
  3774.  
  3775.   At present, all the modules are put in the subdirectory modules in
  3776.   your Linux kernel source tree (usually in the form of symbolic links).
  3777.   To actually generate the modules, you have to type make modules after
  3778.   you have finished building the kernel proper. Earlier kernels built
  3779.   them automatically, which wasn't fair to those compiling on 4MB
  3780.   386sx-16 machines.
  3781.  
  3782.   Most modules accept parameters like io=0x340 and irq=12 on the insmod
  3783.   command line. It is STRONGLY ADVISED that you supply these parameters
  3784.   to avoid probing for the card. Unlike PCI and EISA devices, there is
  3785.   no real safe way to do auto-probing for ISA devices, and so it should
  3786.   be avoided when using drivers as modules.
  3787.  
  3788.   A list of all the parameters that each module accepts can be found in
  3789.   the file:
  3790.  
  3791.   /usr/src/linux/Documentation/networking/net-modules.txt
  3792.  
  3793.   It is recommended that you read that to find out what options you can
  3794.   use for your particular card.
  3795.  
  3796.   Once you have figured out the arguments/options you are going to use,
  3797.   you can insert the module by typing as root:
  3798.  
  3799.   ______________________________________________________________________
  3800.           insmod mod_name.o [io=val1[,val2,...]] [irq=val7[,val8,...]]
  3801.   ______________________________________________________________________
  3802.  
  3803.   The comma separated value lists are used for modules that have the
  3804.   capability to handle multiple devices from a single module, such as
  3805.   all the 8390 drivers, and the PLIP driver.
  3806.  
  3807.   See the insmod(8) manual page for information on passing arguments to
  3808.   the module as it is being loaded.  The command lsmod will show you
  3809.   what modules are loaded, and rmmod will remove them.
  3810.  
  3811.   Once a module is inserted, then you can use it just like normal, and
  3812.   give ifconfig commands. If you set up your networking at boot, then
  3813.   make sure your /etc/rc* files run the insmod command(s) before getting
  3814.   to the ifconfig command.
  3815.  
  3816.   Also note that a busy module can't be removed. That means that you
  3817.   will have to ifconfig eth0 down  (shut down the ethernet card) before
  3818.   you can remove the module(s).
  3819.  
  3820.   10.2.1.  8390 Based Cards as Modules
  3821.  
  3822.   The present list of 8390 based drivers is: 3c503, ac3200, e2100, hp,
  3823.   hp-plus, ne, smc-ultra and wd. These cards were not supported as
  3824.   modules for kernel versions prior to 1.3.42.  (This does not include
  3825.   some of the separately distributed PCMCIA drivers (e.g. de-650) that
  3826.   are also 8390 based, that have had module support for quite some time
  3827.   now.)
  3828.  
  3829.   If you have an 8390 based card, you may have to insert two modules,
  3830.   8390.o and then the module for your card.  If 8390 support has been
  3831.   built into your kernel, then you will not need to insert the 8390
  3832.   module. (8390 support is built in whenever an 8390 based card is
  3833.   selected to be built into the kernel.) Doing a cat /proc/ksyms | grep
  3834.   8390 will tell you if 8390 support is in your kernel.
  3835.  
  3836.   For an 8390 based card, you will have to remove the card module before
  3837.   removing the 8390 module, as the 8390 module is used by the card
  3838.   module, and thus marked as busy.
  3839.  
  3840.   The 8390 series of network drivers now support multiple card systems
  3841.   without reloading the same module multiple times (memory efficient!)
  3842.   This is done by specifying multiple comma separated values, such as:
  3843.  
  3844.   ______________________________________________________________________
  3845.           insmod 3c503.o io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1
  3846.   ______________________________________________________________________
  3847.  
  3848.   The above would have the one module controlling four 3c503 cards, with
  3849.   card 2 and 4 using external transcievers.
  3850.  
  3851.   It is *STRONGLY RECOMMENDED* that you supply "io=" instead of
  3852.   autoprobing.  If an "io=" argument is not supplied, then the ISA 8390
  3853.   drivers will complain about autoprobing being not recommended, and
  3854.   begrudgingly autoprobe for a *SINGLE CARD ONLY* -- if you want to use
  3855.   multiple cards you *have* to supply an "io=0xNNN,0xQQQ,..." argument.
  3856.  
  3857.   The ne module is an exception to the above. A NE2000 is essentially an
  3858.   8390 chip, some bus glue and some RAM.  Because of this, the ne probe
  3859.   is more invasive than the rest, and so at boot we make sure the ne
  3860.   probe is done last of all the 8390 cards (so that it won't trip over
  3861.   other 8390 based cards) With modules we can't ensure that all other
  3862.   non-ne 8390 cards have already been found. Because of this, the ne
  3863.   module REQUIRES an io=0xNNN argument passed in via insmod. It will
  3864.   refuse to autoprobe.
  3865.  
  3866.   It is also worth noting that auto-IRQ probably isn't as reliable
  3867.   during the flurry of interrupt activity on a running machine. Cards
  3868.   such as the ne2000 that can't get the IRQ setting from an EEPROM or
  3869.   configuration register are probably best supplied with an irq=M
  3870.   argument as well. The file
  3871.  
  3872.   /usr/src/linux/Documentation/networking/net-modules.txt
  3873.  
  3874.   also lists how the interrupt settings are determined for the various
  3875.   cards if an irq=N value is not given.
  3876.  
  3877.   10.3.  Mailing Lists and the Linux Newsgroups
  3878.  
  3879.   If you have questions about your ethernet card, please READ this
  3880.   document first. You may also want to join the NET channel of the Linux
  3881.   mailing lists by sending mail to majordomo@vger.rutgers.edu to get
  3882.   help with what lists are available, and how to join them.
  3883.  
  3884.   Furthermore keep in mind that the NET channel is for development
  3885.   discussions only. General questions on how to configure your system
  3886.   should be directed to comp.os.linux.setup unless you are actively
  3887.   involved in the development of part of the networking for Linux.  We
  3888.   ask that you please respect this general guideline for content.
  3889.  
  3890.   Also, the news groups comp.sys.ibm.pc.hardware.networking and
  3891.   comp.dcom.lans.ethernet should be used for questions that are not
  3892.   Linux specific.
  3893.  
  3894.   10.4.  Related Documentation
  3895.  
  3896.   Much of this info came from saved postings from the comp.os.linux
  3897.   groups, which shows that it is a valuable resource of information.
  3898.   Other useful information came from a bunch of small files by Donald
  3899.   himself. Of course, if you are setting up an Ethernet card, then you
  3900.   will want to read the NET-2 Howto so that you can actually configure
  3901.   the software you will use.  Also, if you fancy yourself as a bit of a
  3902.   hacker, you can always scrounge some additional info from the driver
  3903.   source files as well. There is usually a paragraph or two in there
  3904.   describing any important points before any actual code starts..
  3905.  
  3906.   For those looking for information that is not specific in any way to
  3907.   Linux (i.e. what is 10BaseT, what is AUI, what does a hub do, etc.)  I
  3908.   strongly recommend the Ethernet-FAQ  that is posted regularly to the
  3909.   newsgroup comp.dcom.lans.ethernet.  You can grab it from the following
  3910.   URL:
  3911.  
  3912.   Ethernet FAQ
  3913.   <ftp://dorm.rutgers.edu/pub/novell/info_and_docs/Ethernet.FAQ>
  3914.  
  3915.   You can also have a look at the `Ethernet-HomePage' so to speak, which
  3916.   is at the following URL:
  3917.  
  3918.   Ethernet-HomePage <http://wwwhost.ots.utexas.edu/ethernet/ethernet-
  3919.   home.html>
  3920.  
  3921.   10.5.  Contributors
  3922.  
  3923.   Other people who have contributed (directly or indirectly) to the
  3924.   Ethernet-Howto are, in alphabetical order:
  3925.  
  3926.           Ross Biro               <bir7@leland.stanford.edu>
  3927.           Alan Cox                <iialan@www.linux.org.uk>
  3928.           David C. Davies         <davies@wanton.enet.dec.com>
  3929.           Bjorn Ekwall            <bj0rn@blox.se>
  3930.           David Hinds             <dhinds@allegro.stanford.edu>
  3931.           Michael Hipp            <mhipp@student.uni-tuebingen.de>
  3932.           Mike Jagdis             <jaggy@purplet.demon.co.uk>
  3933.           Duke Kamstra            <kamstra@ccmail.west.smc.com>
  3934.           Russell Nelson          <nelson@crynwr.com>
  3935.           Cameron Spitzer         <camerons@NAD.3Com.com>
  3936.           Dave Roberts            <david.roberts@amd.com>
  3937.           Glenn Talbott           <gt@hprnd.rose.hp.com>
  3938.  
  3939.   Many thanks to the above people, and all the other unmentioned testers
  3940.   out there.
  3941.  
  3942.   10.6.  Closing
  3943.  
  3944.   If you have found any glaring typos, or outdated info in this
  3945.   document, please let one of us know. It's getting big, and it is easy
  3946.   to overlook stuff.
  3947.  
  3948.   Thanks,
  3949.  
  3950.   Paul Gortmaker, Paul.Gortmaker@anu.edu.au
  3951.  
  3952.   Donald J. Becker, becker@cesdis.gsfc.nasa.gov
  3953.  
  3954.