[eepro100-bug] options bug

Jeff Bastian jmbastia@mtu.edu
Thu Aug 22 16:05:01 2002


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:
---------------------------------------------------------------------------
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? */
        }
---------------------------------------------------------------------------


Based on the above, the options should be

   Option value  Transceiver setting   
   0x40          Forced 10baseT half duplex.   
   0x10          Forced 10baseT full duplex.
   0x20          Forced 100baseTx half duplex.   
   0x30          Forced 100baseTx full duplex.

which I verified on a test machine.

The oddball is the first option.  I can't pass 'options=0x0' since that 
gets ignored and tries to autonegotiate, so I just turned on bit 6 (0x40) 
and that forced 10-half, which is what I wanted.

Jeff Bastian