[eepro100-bug] options bug

Donald Becker becker@scyld.com
Fri Aug 23 22:33:01 2002


On Thu, 22 Aug 2002, Jeff Bastian wrote:

> The documentation for the options is incorrect:
>   http://www.scyld.com/network/eepro100.html
> 
> It states:
>    Option value  Transceiver setting   
>    0x10          Forced 10baseT half duplex.   
>    0x20          Forced 10baseT full duplex.
>    0x100         Forced 100baseTx half duplex.   
>    0x200         Forced 100baseTx full duplex.
> 
> These values were not giving the expected results, so I started browsing 
> through the source code and found these lines:

Errrmmm, what driver version are you running?


> ---------------------------------------------------------------------------
> MODULE_PARM_DESC(options, "Bits 0-3: tranceiver type, bit 4: full duplex, bit 5: 100Mbps");
> .....
>         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? */
>         }
> ---------------------------------------------------------------------------

My v1.24 release has the following code:
	if ((option >= 0) && (option & 0x330)) {
		printk(KERN_INFO "  Forcing %dMbs %s-duplex operation.\n",
			   (option & 0x300 ? 100 : 10),
			   (option & 0x220 ? "full" : "half"));
		mdio_write(ioaddr, eeprom[6] & 0x1f, 0,
			   ((option & 0x300) ? 0x2000 : 0) | 	/* 100mbps? */
			   ((option & 0x220) ? 0x0100 : 0)); /* Full duplex? */
	} else {

-- 
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