if ((option >= 0) && (option & 0x70)) { printk(KERN_INFO " Forcing %dMbs %s-duplex operation.\n", (option & 0x20 ? 100 : 10), (option & 0x10 ? "full" : "half")); mdio_write(ioaddr, eeprom[6] & 0x1f, 0, ((option & 0x20) ? 0x2000 : 0) | /* 100mbps? */ ((option & 0x10) ? 0x0100 : 0)); /* Full duplex? */ }オプションは次のようなフラグになっているようです。
0100000 0x20 32 100/10 Mbps 0010000 0x10 16 Full/Half duplexつまり、「modules.conf」にてオプションを指定します。
options eepro100 options=48
> gcc -o mii-diag mii-diag.c > ./mii-diag eth0 Basic registers of MII PHY #1: 2100 780d 02a8 0154 05e1 41e1 0001 0000. The autonegotiated capability is 01e0. The autonegotiated media type is 100baseTx-FD. Basic mode control register 0x2100: Auto-negotiation disabled, with Speed fixed at 100 mbps, full-duplex. You have link beat, and everything is working OK. Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT. End of basic transceiver information.