Gentoo Archives: gentoo-dev

From: Andreas Waschbuesch <awaschb@××××.de>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Request for enhancement
Date: Mon, 07 Oct 2002 17:14:58
Message-Id: ant0vo$kpa$1@main.gmane.org
In Reply to: [gentoo-dev] Request for enhancement by Bo Majewski
1 Bo Majewski wrote:
2
3 > [...]
4 > # If you compiled RealTek 8139 Ethernet card as a module uncomment the
5 > # following
6 > # 8139too
7
8 Let me correct this:
9
10 # If you got a RealTek 8129/8139 chip based ethernet card throw it away
11 # and buy a decent nic such as Intel, 3Com, DEC etc. etc.
12
13 cf. FreeBSD source: /src/sys/pci/if_rl.c
14
15 ,----[ FreeBSD source: /src/sys/pci/if_rl.c ]
16 | $FreeBSD: src/sys/pci/if_rl.c,v 1.47 2000/10/15 14:18:59 phk Exp $
17 |
18 |
19 | RealTek 8129/8139 PCI NIC driver
20 |
21 | Supports several extremely cheap PCI 10/100 adapters based on
22 | the RealTek chipset. Datasheets can be obtained from
23 | www.realtek.com.tw.
24 |
25 | Written by Bill Paul <wpaul@××××××××××××.edu>
26 | Electrical Engineering Department
27 | Columbia University, New York City
28 |
29 |
30 |
31 | The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
32 | probably the worst PCI ethernet controller ever made, with the
33 | possible exception of the FEAST chip made by SMC. The 8139 supports
34 | bus-master DMA, but it has a terrible interface that nullifies any
35 | performance gains that bus-master DMA usually offers.
36 |
37 | For transmission, the chip offers a series of four TX descriptor
38 | registers. Each transmit frame must be in a contiguous buffer, aligned
39 | on a longword (32-bit) boundary. This means we almost always have to
40 | do mbuf copies in order to transmit a frame, except in the unlikely
41 | case where a) the packet fits into a single mbuf, and b) the packet
42 | is 32-bit aligned within the mbuf's data area. The presence of only
43 | four descriptor registers means that we can never have more than four
44 | packets queued for transmission at any one time.
45 |
46 | Reception is not much better. The driver has to allocate a single
47 | large buffer area (up to 64K in size) into which the chip will DMA
48 | received frames. Because we don't know where within this region
49 | received packets will begin or end, we have no choice but to copy data
50 | from the buffer area into mbufs in order to pass the packets up to the
51 | higher protocol levels.
52 |
53 | It's impossible given this rotten design to really achieve decent
54 | performance at 100Mbps, unless you happen to have a 400Mhz PII or
55 | some equally overmuscled CPU to drive it.
56 |
57 | On the bright side, the 8139 does have a built-in PHY, although
58 | rather than using an MDIO serial interface like most other NICs, the
59 | PHY registers are directly accessible through the 8139's register
60 | space. The 8139 supports autonegotiation, as well as a 64-bit
61 | multicast filter.
62 |
63 | The 8129 chip is an older version of the 8139 that uses an external
64 | PHY chip.
65 | The 8129 has a serial MDIO interface for accessing the MII where
66 | the 8139 lets you directly access the on-board PHY registers. We need
67 | to select which interface to use depending on the chip type.
68 |
69 `----

Replies

Subject Author
Re: [gentoo-dev] Re: Request for enhancement Matthew Walker <mwalker@×××××××.net>
Re: [gentoo-dev] Re: Request for enhancement Jon Nelson <jnelson@×××××××.net>