
Conceptronic 10/100 Driver for Linux
------------------------------------

 The Conceptronic 10/100 TCL is an Ethernet Type II 32-bit PC-Card
based on the Realtek 8139C chip. The RTL 8139 is a well-known chip
used in a lot of network cards because of its low price and 'good'
performance. The existence of a good support for this chipset and
the really low price of the Conceptronic 10/100 TCL makes it an
affordable pcmcia for everyone.

 This PC-Card comes with drivers for almost all operating systems
but the drivers for Linux are not suitable for 2.4 kernels and 
work only for 2.2 kernels.

 The following installation procedure is based on SuSE 7.3 Linux
distribution, but it's applicable to every Linux distribution using
a new 2.4 kernel.

 This driver is supposed to work for the Conceptronic CON100TCL
(external cable) and SP100TCL (attached RJ45 also called SnapPort).


 Compiling the driver
 --------------------

 To compile the driver, you need the following files included in
the package:

 - pci-scan.c
 - pci-scan.h
 - cb_shim.c
 - kern_compat.h
 - rtl8139.c (*)

 1. Edit the 'Makefile' file and make the needed changes.

 2. Type 'make'. The modules and executables will be created.


 (*) You can get the latest version of the RTL 8139 driver (among other
 drivers) for Linux from http://www.scyld.com/network/rtl8139.html.
 This driver is written by Donald Becker.


 Installing the driver
 ---------------------

  Copying files
  -------------

  After compiling, you must install the modules. Depending on your
 Linux distribution, you will have to select the directory where
 to copy the modules.

  - If you are using SuSE with kernel pcmcia or the modules are
  stored into the directory /lib/modules/2.4.x/pcmcia, you can
  type 'make install-kernel' and the files will be copied
  automatically.

  - If you are using SuSE and the external pcmcia modules, you can
 type 'make install-external' and the files will be copied to the
 /lib/modules/2.4.x/pcmcia-external directory.

  - If none of the above applies to you, copy the modules manually.

  Configuring pcmcia
  ------------------

  Now that files are succefully copied, you must configure pcmcia
 to detect the Conceptronic 100TCL card.

  1. Edit /etc/pcmcia/config
  
     - Add the following lines to the device drivers definitions:

     #
     # Device driver definitions
     # 
     device "realtek_cb" 
       class "network" module "cb_enabler", "pci-scan", "cb_shim",  "realtek_cb"

     - Add the following lines to the ethernet adapter definitions:

     #
     # Ethernet adapter definitions
     #
     card "Conceptronic 100TCL CardBus 10/100 Ethernet"
       manfid 0x0000, 0x021b
       bind "realtek_cb"

     The value 0x000, 0x021b is obtained by typing 'cardctl ident' with the
     pcmcia card on socket.

  2. Restart the pcmcia service by typing '/etc/rc.d/init.d/pcmcia
     restart'. If that does not work for you, try 'killall -1 cardmgr'.


 Testing the driver
 ------------------

 Once you have installed the driver and configured the pcmcia manager, you
can check if all is going well. 

 When you insert the PC-Card into the socket, you should see something
like this (from SuSE 7.3):

 Oct 11 21:44:49 linux cardmgr[362]: initializing socket 0
 Oct 11 21:44:49 linux cardmgr[362]: socket 0: Conceptronic 100TCL CardBus 10/100 Ethernet
 Oct 11 21:44:49 linux cardmgr[362]: executing: 'insmod -v /lib/modules/2.4.10-4GB//pcmcia/cb_enabler.o'
 Oct 11 21:44:49 linux cardmgr[362]: + Using /lib/modules/2.4.10-4GB//pcmcia/cb_enabler.o
 Oct 11 21:44:49 linux cardmgr[362]: + Symbol version prefix ''
 Oct 11 21:44:49 linux cardmgr[362]: executing: 'insmod -v /lib/modules/2.4.10-4GB//pcmcia/pci-scan.o'
 Oct 11 21:44:49 linux cardmgr[362]: + Using /lib/modules/2.4.10-4GB//pcmcia/pci-scan.o
 Oct 11 21:44:49 linux cardmgr[362]: + Symbol version prefix ''
 Oct 11 21:44:49 linux cardmgr[362]: executing: 'insmod -v /lib/modules/2.4.10-4GB//pcmcia/cb_shim.o'
 Oct 11 21:44:49 linux kernel: cb_shim.c:v1.00 4/15/2000  Donald Becker <becker@scyld.com>
 Oct 11 21:44:49 linux kernel:  http://www.scyld.com/linux/drivers.html
 Oct 11 21:44:49 linux cardmgr[362]: + Using /lib/modules/2.4.10-4GB//pcmcia/cb_shim.o
 Oct 11 21:44:49 linux cardmgr[362]: + Symbol version prefix ''
 Oct 11 21:44:49 linux cardmgr[362]: executing: 'insmod -v /lib/modules/2.4.10-4GB//pcmcia/realtek_cb.o'
 Oct 11 21:44:49 linux kernel: rtl8139.c:v1.20 6/21/2002 Donald Becker, becker@scyld.com.
 Oct 11 21:44:49 linux kernel:  http://www.scyld.com/network/rtl8139.html
 Oct 11 21:44:49 linux cardmgr[362]: + Using /lib/modules/2.4.10-4GB//pcmcia/realtek_cb.o
 Oct 11 21:44:49 linux cardmgr[362]: + Symbol version prefix ''
 Oct 11 21:44:49 linux kernel: rtl8139_attach(bus 2, function 0)
 Oct 11 21:44:49 linux kernel: eth0: RealTek RTL8129 Fast Ethernet at 0x4000, IRQ 5, 00:10:60:58:6b:2f.
 Oct 11 21:44:49 linux kernel: eth0: No MII transceivers found!  Assuming SYM transceiver.
 Oct 11 21:44:49 linux cardmgr[362]: executing: './network start eth0'
 Oct 11 21:44:50 linux modify_resolvconf: Service pcmcia modified /etc/resolv.conf. See info block in this file


 RTL 8139 Diagnostics
 --------------------

 After compiling, you will get the file 'rtl8139-diag' which can be
used to diagnose your Conceptronic 100TCL card. Note that this
should be used only for advanced users.

 With rtl8139-diag you can change the network settings. For example
if you are in a full duplex network and want to force it, you can 
type:

 $ rtl8139-diag -F 100baseTx-FDX

 If you want to force 10BaseT you can type:

 $ rtl8139-diag -F 10baseT

 In the case you want to store these options to the card EEPROM,
add the -w parameter to rtl8139-diag.

 You can also change the settings at the time of loading the
module instead of storing the settings to the card EEPROM. 
To do this, edit the file /etc/modules.conf and add the
following line:

options rtl8139 options=0x??

 Where ?? should be an hexadecimal number indicating the speed
of the network:

	0x10 - Force Full-Duplex (add to 0x20 or 0x40)
	0x20 - Force 100mbps
	0x40 - Force 10mbps

 Example:

 options rtl8139 options=0x50 (force 10mbps full duplex)


 Known bugs
 ----------

 This module detects the Conceptronic 100 TCL as a RTL8129-based card.
 I'm not sure if this is a bug but the driver works correctly.
 

 Other Information
 -----------------

 As said before, you can get the original files from:

 - http://www.scyld.com/network/rtl8139.html

 Donald Becker's drivers and Scyld webpage have a lot of valuable
information that can be used to learn and write your own network
drivers.


 Author
 ------

 You can contact me at:

 Joffre Heredia
 Computational Medicine Laboratory
 Biostatistics Dept.
 UAB School of Medicine, Bellaterra
 08193-Barcelona (SPAIN)

 e-Mail: joffre@yogi.uab.es
 webpage: http://caos.uab.es/~joffre


