[realtek] setting autoconf speed to 10 even with reboot?
Donald Becker
becker@scyld.com
Thu, 8 Feb 2001 09:16:26 -0500 (EST)
On Tue, 6 Feb 2001, Daniel Harker wrote:
> I am using the Dlink-538DFE ethernet card and using the rtl8139 kernel
> driver.
Which driver version?
> When it loads on my computer it autonegotiates to 100base. My network only
> works on 10base, or else I get errors.
>
> How do I set it permenantly to 10baseT? I got the mii-diag program and
> types mii-diag -A 10baseT, but it only went down to 10baseT until I
> rebooted... then it went right back to 100base.
That's the defined semantics of setting the media with "mii-diag". It
only retains the setting until the transceiver is reset.
I _recommend_ using 'mii-diag' to set the advertised values.
The methods below will disable autonegotiation when forcing the speed
and duplex, which . Disabling autonegotation leads to future
configuration problems, and disables features such as flow control.
> IS there some command with mii-diag that can write the eeprom permenently?
No, not with 'mii-diag'.
The 'rtl8139-diag' program is used to write the EEPROM.
The transceiver configuration by is at byte offset 0x0c (the lower byte
at word offset 6). Bits 5, 4 and 0 (0x31) are mapped to bits 13, 12 and
8 (0x3100) of the transceiver control register. The current code in
rtl8139-diag.c will not write this register, but it would be trivial to
add around line 594. Note: I do not recommend this!
____
if (new_default_media) {
int new_media = eeprom_contents[6] & ~0x0031;
switch (new_default_media) {
case 0x0000: new_media |= 0x0000; break; /* 10baseT */
case 0x0204: new_media |= 0x0001; break; /* 10baseT-FDX */
case 0x0003: new_media |= 0x0020; break; /* 100baseTx */
case 0x0205: new_media |= 0x0021; break; /* 100baseTx-FDX */
case 0x0800: new_media |= 0x0011; break; /* Autosense */
default: new_media = eeprom_contents[6]; /* Unchanged */
}
do_update(ioaddr, eeprom_contents, 6, "Default Media",
(new_hwaddr[i*2]<<8) + new_hwaddr[i*2+1]);
}
____
> Is there some other way to set the autonegotiation abilities down? Can I
> use a kernel option? If so, what is it?
Yes. You may use driver v1.13 and force the transceiver speed with a
module option. Bit 0x20 sets the speed, and bit 0x10 set the duplex.
10baseT options=0x01
10baseT-FDX options=0x10
The driver will emit a "Forcing speed to ...." when you set this.
I'll likely change these options to more logical values. Perhaps
0x10 10baseT
0x20 10baseTx-FDX
0x100 100baseTx
0x200 100baseTx-FDX
Any suggestions on indicating autonegotiation-advertising vs. forcing?
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