Subject: Solved: networking fails to activate - even more info

From: Pieter <[email-masked]>
Date: Mon, 27 Oct 2008 08:47:43 +0200

>>>> Hi
>>>>
>>>> We have a powerpc (8548) based board. running eldk4.1. the board has
>>>> three ethernet ports using Gainfair ethernet controller v1.2.
>>>>
>>>> If the board powers up with any network cable plugged in, that specific
>>>> network is accessible.
>>>> if the board powers up without network cables connected and a cable is
>>>> plugged in, the network does not become active.
>>>> The kernal makes a log entry stating that the phy is up when the cable
>>>> is plugged in - but the interface is not pingable
>>>> Running ifdown and ifup manually does not result in a pingable interface.
>>>> Neither does running /etc/init.d/network restart
>>>>
>>>> can anyone help me pls.
>>>>     
>>>>       
>>>>         
>>> Check the statistics counters to see if you are getting any bad
>>> packets, or to see if you are getting interrupts.  Several people have
>>> reported that their PHYs have powerdown issues, though I wouldn't
>>> expect the PHY to report the link as up, then.  Make sure that your
>>> dts specifies the correct PHY address for the connected PHY.
>>>
>>> What happens if you start up with the PHY connected, bring up the
>>> interface, and *then* disconnect and reconnect the cable (after a
>>> delay)?
>>>     
>>>       
>> Hi
>>
>> I have checked the counters in both ifconfig and with ethtool. both show
>> TX counts but no RX count and no errors
>> ethtool reports that the link is detected.
>> The phy addresses are correct (ethtool and kernel log shows the
>> exspected addresses)
>> I have found that the networking scripts are not called (ifup or down)
>> when a cable is pluged or unplugged. 
>> I also found that udev is not in my current linux platform - can this
>> contribute to the problem?
>>
>> To rule out the phys. I powered on the system with all network cables
>> plugged in. ping all three to confirm that they work. i then issue a
>> reset signal (hardware routed) to the phys. when the phys reappear im
>> still able to ping all three interfaces.
>>
>> The log file entries for unplugging and connecting the cable are :
>> (logged by /driver/phy/phy.c )
>> Oct 15 14:36:56 equus user.info kernel: PHY: 0:00 - Link is
>> Down                                                       
>> Oct 15 14:36:59 equus user.info kernel: PHY: 0:00 - Link is Up - 100/Full
>> what is the sequence of events that should follow?
>>
>> Another test i tried, powered the system up with no cables plugged in
>> and  "ONBOOT=no" in ifcgf-eth sctipts. I then manually run the ifup
>> scripts one by one. then plug in the three network cables. when i ping
>> the three interfaces and ping targets on the three networks i find that
>> one interface is pingable, one is not and one returns "ping: sendto:
>> Network is unreachable"  - these results were reproducible about 25% of
>> attempts but varied according to order in with cables were plugged in.
>>
>> I would appreciate any help.
>> thanks pieter
>>   
>>     
> hi
>
> I did some more digging and testing today.  To recap the problem: When i
> power on the system with network cables plugged in, the interface is
> pingable. If the system powers up without network cables plugged in,
> ifconfig reports tat all interfaces are up and running. but when
> connecting the network cables none of the interfaces are pingable (even
> after running ifdown and ifup scripts for the interfaces. )
>
> I think the problem lies some ware in that both ifconfig and ethtool
> reports the link as being up even though the system was powered up
> without network cables plugged in.
>
> Ifconfigs output:
> SDH-25108>
> ifconfig                                                                                                    
>
> eth0      Link encap:Ethernet  HWaddr
> 00:50:C2:52:51:08                                                                
>
>           inet addr:10.0.0.200  Bcast:10.0.0.255 
> Mask:255.255.255.0                                                   
>           UP BROADCAST RUNNING MULTICAST  MTU:1500 
> Metric:1                                                           
>           RX packets:0 errors:0 dropped:0 overruns:0
> frame:0                                                           
>           TX packets:394 errors:0 dropped:0 overruns:0
> carrier:0                                                       
>           collisions:0
> txqueuelen:1000                                                                                 
>
>           RX bytes:0 (0.0 b)  TX bytes:16548 (16.1
> KiB)                                                                
>           Base
> address:0xe000                                                                                          
>
>                                                                                                                        
>
> eth1      Link encap:Ethernet  HWaddr
> 00:50:C2:52:51:09                                                                
>
>           inet addr:172.16.63.237  Bcast:172.16.63.255 
> Mask:255.255.255.0                                             
>           UP BROADCAST RUNNING MULTICAST  MTU:1500 
> Metric:1                                                           
>           RX packets:8676 errors:0 dropped:0 overruns:0
> frame:0                                                        
>           TX packets:149 errors:0 dropped:0 overruns:0
> carrier:0                                                       
>           collisions:0
> txqueuelen:1000                                                                                 
>
>           RX bytes:942270 (920.1 KiB)  TX bytes:10268 (10.0
> KiB)                                                       
>                                                                                                                        
>
> eth2      Link encap:Ethernet  HWaddr
> 00:50:C2:52:51:0A                                                                
>
>           inet addr:20.0.0.200  Bcast:20.0.0.255 
> Mask:255.255.255.0                                                   
>           UP BROADCAST RUNNING MULTICAST  MTU:1500 
> Metric:1                                                           
>           RX packets:0 errors:0 dropped:0 overruns:0
> frame:0                                                           
>           TX packets:4 errors:0 dropped:0 overruns:0
> carrier:0                                                         
>           collisions:0
> txqueuelen:1000                                                                                 
>
>           RX bytes:0 (0.0 b)  TX bytes:168 (168.0
> b)                                                                   
>           Base
> address:0x2000                                                                                          
>
>                                                                                                                        
>
> lo        Link encap:Local
> Loopback                                                                                    
>
>           inet addr:127.0.0.1 
> Mask:255.0.0.0                                                                          
>
>           UP LOOPBACK RUNNING  MTU:16436 
> Metric:1                                                                     
>
>           RX packets:3733 errors:0 dropped:0 overruns:0
> frame:0                                                        
>           TX packets:3733 errors:0 dropped:0 overruns:0
> carrier:0                                                      
>           collisions:0
> txqueuelen:0                                                                                    
>
>           RX bytes:674220 (658.4 KiB)  TX bytes:674220 (658.4 KiB)         
>
> ethtools output:                                          
> SDH-25108> ethtool
> eth0                                                                                                
>
> Settings for
> eth0:                                                                                                     
>
>         Supported ports: [ TP AUI BNC MII FIBRE
> ]                                                                      
>         Supported link modes:   10baseT/Half
> 10baseT/Full                                                              
>                                 100baseT/Half
> 100baseT/Full                                                            
>                                 1000baseT/Half
> 1000baseT/Full                                                          
>         Supports auto-negotiation:
> Yes                                                                                 
>
>         Advertised link modes:  10baseT/Half
> 10baseT/Full                                                              
>                                 100baseT/Half
> 100baseT/Full                                                            
>                                 1000baseT/Half
> 1000baseT/Full                                                          
>         Advertised auto-negotiation:
> Yes                                                                               
>
>         Speed:
> 1000Mb/s                                                                                                
>
>         Duplex:
> Half                                                                                                   
>
>         Port:
> MII                                                                                                      
>
>         PHYAD:
> 0                                                                                                       
>
>         Transceiver:
> external                                                                                          
>
>         Auto-negotiation:
> off                                                                                          
>
>         Current message level: 0x0000003f
> (63)                                                                         
>
>         Link detected: yes       
>
> If I then plug in the cables and unplug them again  the link status goes
> down. When plugging in the cables again link status is detected again,
> but none of teh interfaces are pingable - even after  trying ifdown and up.
>   
Hi,
I just wanted to report that the networking problem has been solved by
moving to linux 2.6.24.

pieter