[realtek] rtl8139c and flow control

Donald Becker becker@scyld.com
Tue Jun 4 13:03:04 2002


On Tue, 4 Jun 2002, Jose Delgado wrote:

> I want to enable the flow control for a rtl8139 card ("C" chip)
> under Linux, and using the "options eth0" line from modules.conf.

Ethernet Flow Control ("FC") is normally enabled by default.
The RxFC setting is stored in the EEPROM and loaded at power-up time, so it
might not be enabled on your specific board.
You can check the hardware setting by checking register 0x58 in the
output of 'rtl8139-diag -af'.

The TxFC setting is usually autonegotiated.
You can see if TxFC has been autonegotiated by running 'mii-diag'.

Register 0x58 is the Media Status Register.
   Bit  Mask Meaning
    7   0x80 Tx flow control (from EEPROM, setting locked when autonegotiated)
    6   0x40 Rx flow control enable (from EEPROM)
    1   0x02 TxPF  Our receiver told link partner to pause
    0   0x01 RxPF  Link partner told us to pause transmitting

Other interesting bits in this register
    4   0x10 AUX/Standby power for WOL is present.
    3   0x08 10/100 speed indication, 1=10Mbps, 0=100Mbps
    2   0x04 Link status, 0==Link OK   1==Link fail

You likely don't notice Flow Control because it is a link level
function, not a protocol level function.  FC has no effect until the
host runs short of memory or CPU time.  It is triggered by the driver
not removing packets from the Rx ring.  FC is _not_ triggered when the
software packet queue layer overflows.  This is, IMHO, the correct
behavior.  Protocol flow control can only be communicated to the layers
above IP (TCP, UDP applications) by packet loss.

> Anyone knows if posible and the parameter?
>
> By the way.. is there out some full listing for the rtl8139.o
> driver options? Actually using latest 2.2.x kernel series.

Read
 http://www.scyld.com/network/rtl8139.html
to learn about the module options.

All options (both dynamic and compile-time) are also documented at the
top of the source code.


-- 
Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993