This (or very similar) problem has been mentioned before by Greg here:
http://forum.m0n0.ch/index.php/topic,886.0.html and then moved to "Bogus" WITHOUT any explanation.
Since I cannot find any relevant documentation/thread, I am resurrecting the issue.
I have done some poking and here is the extra data that should be helpful:
Configuration: Soekris net4521, bios b4501_133.bin, m0n0wall 1.3b18
Stating:
<wan>
<if>sis1</if>
<media>10baseT/UTP</media>
<mediaopt>full-duplex</mediaopt>
<ipaddr>192.168.1.8</ipaddr>
<subnet>24</subnet>
<gateway>192.168.1.1</gateway>
<spoofmac/>
</wan>
in the <interfaces> section of the configuration file has no affect. The system defaults to 100baseTX.
The capabilities of the interface are:
$ ifconfig -m sis1
sis1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
capabilities=48<VLAN_MTU,POLLING>
inet 192.168.1.8 netmask 0xffffff00 broadcast 192.168.1.255
inet6 fe80::200:24ff:fec5:27e9%sis1 prefixlen 64 scopeid 0x3
ether 00:00:24:c5:27:e9
media: Ethernet 100baseTX
status: active
supported media:
media autoselect
media 100baseTX mediaopt full-duplex
media 100baseTX
media 10baseT/UTP mediaopt full-duplex
media 10baseT/UTP
media none
media 100baseTX mediaopt hw-loopback
Observations:
1) Running
ifconfig sis1 media autoselect puts the interface into 100baseTX full-duplex mode.
2) BUT running
ifconfig sis1 media 100baseTX mediaopt full-duplex has the same effect as
ifconfig sis1 media 100baseTX : 100baseTX half-duplex.
3) Running
$ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
has the same effect as
$ ifconfig sis1 media 10baseT/UTP
: puts the interface into 10baseT half-duplex mode.
4) If I reboot the system and issue
$ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
or
$ ifconfig sis1 media 10baseT/UTP
it is accepted as a valid command but produces NO EFFECT WHATSOEVER.
5) If I reboot the system, once I issue
ifconfig sis1 media autoselect from then on
$ ifconfig sis1 media 10baseT/UTP mediaopt full-duplex
or
$ ifconfig sis1 media 10baseT/UTP
works (mediaopt is simply quietly ignored).
6) putting
<earlyshellcmd>ifconfig sis1 media autoselect</earlyshellcmd> into the <system> section of the configuration file does NOT produce the desired result of "shaking up" the interface into the proper behavior. Too early in the process?
7) putting
<shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd> into the <system> section of the configuration file does NOT force the desired result either...
Finally, the workaround that actually kinda worked was:
<shellcmd>ifconfig sis1 media autoselect</shellcmd>
<shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd>
This brings sis1 in 10baseT, although it still sticks to half-duplex.
Conclusion: most likely there is something funky going on with the sis(4) driver...
<shellcmd>ifconfig sis1 media 10baseT/UTP mediaopt full-duplex</shellcmd> command called for by
<media>10baseT/UTP</media>
<mediaopt>full-duplex</mediaopt>
is ignored until the first
<shellcmd>ifconfig sis1 media autoselect</shellcmd> is issued.
mediaopt is ignored altogether
Ouch!