[eepro100] Auto-negotiation: can set by mii-diag but not by boot

Kallol Biswas kallol@bugula.fpk.hp.com
Wed, 27 Jun 2001 8:58:42 EDT


Hi,
  My mail may not be directly related to your problem but I thought it might be
of help to some body.

 You may be aware of the problems with auto negotiation and 
manual speed setting with the 82559 card and probably these problems already
have been discussed on this board. Here is intel's explanation:


 The problem is, if the unit is at 10Mbps and it is tried to programm to
                             100Mbps, link does not come up. Bit #2 of
MDI register 1 does
                             not become one(link up).

If the adapter is in forced speed mode
(10Mb/s or 100Mb/s) it does not perform autonegotiation, so even if
                             the switch on the other end 
                             is capable of autonegotiation, it cannot
run it to completion (you need 2 for tango...). However, the switch
                             still tries to send NWAY symbols 
                             and these are transmitted as in the 10Mb/s
media (even if the last good link was 100Mb/s). 

 If the current (good) link is 100Mb/s and
the adapter is forced to 10 Mb/s, the switch will attempt
                             NWAY.The NWAY symbols will be interpreted
by the adapter 
                             (which is in force 10 mode) as good link
signals, so it will indicate link. The switch however, will not detect
                             link (NWAY fails).



                             On the other way round, if the current link
is 10Mb/s and the adapter is forced to 100Mb/s, the adapter will
                             not detect the switch's attempts
                             for NWAY (which are run in 10Mb/s), so it
will indicate no link. The switch will also indicate no link.



  Another interesting point (not directly
related, but interesting): the 8255x adapter does have the ability to
                             sense and indicate the link speed without
autonegotiation


(i.e., even if the link partner is not NWAY
capable). The adapter indicates the link speed through a status
                             bit, but cannot switch link speed by
                             itself (the driver must do the work).
Therefore, when working with our driver, if you configure the adapter to
                             non-forced mode, it may find a link even
                             if the partner is not capable of
autonegotiation. However, since the adapter can detect only speed and

not
                             duplex mode, the driver must guess
                             the duplex mode, and the default guess is
half-duplex. So, if the the partner is forced to full duplex, you'd
                             have a link with bad performance (both
partners
                             are at the right speed, but one is in full
duplex and the other is in half duplex).



> 
> We recently replaced our no-auto-negotiation switches with Cisco Catalyst
> 3548's.
> 
> We have a bunch of servers using Intel L440GX motherboards, which have
> integrated 8255x controllers. We are running a Linux kernel 2.2.18
> with smp enabled, though the boards have only one CPU. The eepro100
> driver is included in the kernel. (Detailed version info about the
> eepro100 version and status is at the end.)
> 
> Originally, /etc/lilo.conf said:
> 
>  append="ether=0,0,0x30,eth0"    # set 100Full no autonegotiate
> 
> I removed this line to enable autonegotiation, since I understand that
> "options=0" should mean auto-negotiation is turned on (right?). I then
> re-ran lilo.
> 
> However, after rebooting, and even after a power-cycle, mii-diag
> reported that auto-negotiation was still disabled. I even restored the
> lilo "ether" line and changed the 0x30 to 0 to explicitly set the
> options, and that didn't work either.
> 
> I then ran "mii-diag -A 100BaseTx", which -did- restore auto-negotiation.
> This also seems to survive resets and power-cycles.
> 
> I didn't think that mii-diag was writing some non-volatile memory. And
> why doesn't my lilo.conf set auto-negotiation properly? I'm really
> puzzled.
> 
> Thanks,
> Dan Halbert
> [apologies if this seems like a novice question; I searched the archives
> but came up with nothing]
> 
> eepro100 version information:
> On boot, I see:
> ==============================================================================
> eepro100.c:v1.09j-t 9/29/99 Donald Becker http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.html
> eepro100.c: $Revision: 1.20.2.10 $ 2000/05/31 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others
> eepro100.c: VA Linux custom, Dragan Stancevic <visitor@valinux.com> 2000/11/15
> eth0: Intel PCI EtherExpress Pro100 82557, 00:D0:B7:89:84:EE, IRQ 21.
>   Receiver lock-up bug exists -- enabling work-around.
>   Board assembly 000000-000, Physical connectors present: RJ45
>   Primary interface chip i82555 PHY #1.
>   General self-test: passed.
>   Serial sub-system self-test: passed.
>   Internal registers self-test: passed.
>   ROM checksum self-test: passed (0x04f4518b).
> ==============================================================================
> 
> "./mii-diag -v -v" reports:
> ==============================================================================
> mii-diag.c:v2.02 5/21/2001 Donald Becker (becker@scyld.com)
>  http://www.scyld.com/diag/index.html
> Using the default interface 'eth0'.
>  The autonegotiated capability is 01e0.
> The autonegotiated media type is 100baseTx-FD.
>  Basic mode control register 0x3000: Auto-negotiation enabled.
>  You have link beat, and everything is working OK.
>    This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.
>  Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    End of basic transceiver informaion.
>  
>  MII PHY #1 transceiver registers:
>    3000 782d 02a8 0154 05e1 41e1 0001 0000
>    0000 0000 0000 0000 0000 0000 0000 0000
>    0a03 0000 0001 0000 0000 0000 0000 0000
>    0000 0000 0b10 0000 0000 0000 0000 0000.
>  Basic mode control register 0x3000: Auto-negotiation enabled.
>  Basic mode status register 0x782d ... 782d.
>    Link status: established.
>    Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Able to perform Auto-negotiation, negotiation complete.
>  Vendor ID is 00:aa:00:--:--:--, model 21 rev. 4.
>    No specific information is known about this transceiver type.
>  I'm advertising 05e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT
>    Advertising no additional info pages.
>    IEEE 802.3 CSMA/CD protocol.
>  Link partner capability is 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
>    Negotiation completed.
> 
> _______________________________________________
> eepro100 mailing list
> eepro100@scyld.com
> http://www.scyld.com/mailman/listinfo/eepro100
> 


--
Phone: 973-443-7469         |  Design Engineer
Telnet: 1-443-7469          |  EIAL UNIX OS LAB
www.kallolbiswas.com        |  Hewlett Packard Company
kallol_biswas@hp.com        |  Florham Park, NJ