Amiga.org

Operating System Specific Discussions => AROS Research Operating System => Topic started by: dammy on January 01, 2004, 06:51:27 PM

Title: NIC chipsets
Post by: dammy on January 01, 2004, 06:51:27 PM
What would be the most easiest NIC chipset to do a AROS driver for?

Dammy
Title: Re: NIC chipsets
Post by: fx on January 01, 2004, 07:26:27 PM
the realtek chipsets seems to be popular, most of my cards have a rtl8139 chip, I have no idea if it's hard or easy to do a driver for them tough :/
Title: Re: NIC chipsets
Post by: Ilwrath on January 01, 2004, 07:43:23 PM
I haven't actually written a device driver, myself, but I would suspect that you want to target a common chipset, such as the realtek 8139 or the venerable old NE1000.  There's lots of information and source code (from other platforms) out there for the common chipsets, so that should help make the job easier.
Title: Re: NIC chipsets
Post by: Stedy on January 01, 2004, 08:51:10 PM
Hi,

The Realtek 8139 (already mentioned) a the family are popular. If you port an NE2000 driver you will get support for many cards as well as some older Realtek 10 mbit cards.

SMSC chips are used by some Zorro cards and you can get Linux source code from www.smsc.com. If you can add support for 3COM 3C509 series (10 mbit) and 3C905 (100mbit series) it would be nice. 3COM have driver documents and source code from their website.
Title: Re: NIC chipsets
Post by: bloodline on January 01, 2004, 08:58:45 PM
Quote

fx wrote:
the realtek chipsets seems to be popular, most of my cards have a rtl8139 chip, I have no idea if it's hard or easy to do a driver for them tough :/


Almost everything uses Realtek... I also have a 3Com and a SIS NIC here :-)
Title: Re: NIC chipsets
Post by: downix on January 01, 2004, 10:37:21 PM
Tulip, easily.

I have a pile of these cards if you need one.
Title: Re: NIC chipsets
Post by: shIva on January 01, 2004, 10:53:49 PM
Quote
Tulip, easily.

please not such special ones, or do they use common chipsets (like the mentioned rtl) ?

in our region the most popular chipsets are 3com and realtek.
would be nice to see a device driver for a 10/100 mbit rtl chip - this one could directly be handed over to oli_hd for his coldfire ;-)
Title: Re: NIC chipsets
Post by: Stedy on January 01, 2004, 11:53:56 PM
Quote
Tulip, easily.

Forget this, it's obsolete. When Intel bought DEC semiconductor rights they copied the design to make the 82559.

I remembered 2 links:
Realtek 8139 driver source for linux (http://www.scyld.com/network/rtl8139.html) &
NE2000 card driver source (http://www.scyld.com/network/ne2k-pci.html)

The most popular chipsets, in no particular order are, AMD, Intel, Realtek, National Semiconductor, 3COM & SMSC. In the UK I have come across the Intel, 3COM and Realtek parts the most.

Develop the Realtek 8139 and NE2000 drivers and you will satisfy most users, myself included.

If you want help/advice on ethernet drivers and IP stacks, contact me privately. I've ported Linux ethernet drivers, written them from scratch and wrote my own IP stack.
Title: Re: NIC chipsets
Post by: downix on January 01, 2004, 11:56:22 PM
@Stedy

he asked for easiest tho, and from my perspective Tulip is quite easy to code for.  

The NS2000 is a fine choice as well.
Title: Re: NIC chipsets
Post by: itix on January 02, 2004, 12:05:13 AM
Could it be possible adapt cnet.device source code into AROS? It is
written for Amiga PCMCIA hardware but there is also C
reimplementation.
Title: Re: NIC chipsets
Post by: dammy on January 02, 2004, 06:26:12 PM
by Stedy on 2004/1/1 18:53:56

Quote
If you want help/advice on ethernet drivers and IP stacks, contact me privately. I've ported Linux ethernet drivers, written them from scratch and wrote my own IP stack.


Well there is a small bounty for tcp/ip at TeamAROS (http://www.thenostromo.com/teamaros/).

Dammy
Title: Re: NIC chipsets
Post by: downix on January 02, 2004, 06:34:24 PM
Always looking for help, sure.
Title: Re: NIC chipsets
Post by: Methuselas on January 02, 2004, 06:36:23 PM
Dammy, do 3Com or N1000. ;^) I have those. I'll test for bugs for ya. (hint, hint.)  :-D
Title: Re: NIC chipsets
Post by: iamaboringperson on January 02, 2004, 09:50:41 PM
I agree with NE2000, and I could also add some SiS chipset (I think)

Then I can be rather selfish and name my unpopular brand of NIC, however I've currently forgotten its name :(
Title: Re: NIC chipsets
Post by: Razor on January 02, 2004, 10:07:07 PM
Regarding the RL8139:

Here are some comments from the FreeBSD driver:

Quote

 * The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
 * probably the worst PCI ethernet controller ever made, with the possible
 * exception of the FEAST chip made by SMC. The 8139 supports bus-master
 * DMA, but it has a terrible interface that nullifies any performance
 * gains that bus-master DMA usually offers.
 *
 * For transmission, the chip offers a series of four TX descriptor
 * registers. Each transmit frame must be in a contiguous buffer, aligned
 * on a longword (32-bit) boundary. This means we almost always have to
 * do mbuf copies in order to transmit a frame, except in the unlikely
 * case where a) the packet fits into a single mbuf, and b) the packet
 * is 32-bit aligned within the mbuf's data area. The presence of only
 * four descriptor registers means that we can never have more than four
 * packets queued for transmission at any one time.
 *
 * Reception is not much better. The driver has to allocate a single large
 * buffer area (up to 64K in size) into which the chip will DMA received
 * frames. Because we don't know where within this region received packets
 * will begin or end, we have no choice but to copy data from the buffer
 * area into mbufs in order to pass the packets up to the higher protocol
 * levels.


and further down:

Quote

/*
* Here's a totally undocumented fact for you. When the
* RealTek chip is in the process of copying a packet into
* RAM for you, the length will be 0xfff0. If you spot a
* packet header with this value, you need to stop. The
* datasheet makes absolutely no mention of this and
* RealTek should be shot for this.
*/


You can check the driver here. (http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sys/pci/if_rl.c?rev=1.129&content-type=text/plain)
Title: Re: NIC chipsets
Post by: N7VQM on January 03, 2004, 04:19:57 AM
Quote

Razor wrote:
Regarding the RL8139:

Quote

/* The
* datasheet makes absolutely no mention of this and
* RealTek should be shot for this.
*/


Comments like these can make code reading a joy.   :-)
Title: Re: NIC chipsets
Post by: Stedy on January 03, 2004, 12:58:30 PM
Quote

dammy wrote:
by Stedy on 2004/1/1 18:53:56

Quote
If you want help/advice on ethernet drivers and IP stacks, contact me privately. I've ported Linux ethernet drivers, written them from scratch and wrote my own IP stack.


Well there is a small bounty for tcp/ip at TeamAROS (http://www.thenostromo.com/teamaros/).

Dammy


I would like to help but unfortunately I just do not have the time at the moment.

Take a look at this project Lightweight IP (http://www.sics.se/~adam/lwip/) something I found after I wrote my stack ,which is owned by my company :(