cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
154 Views
Registered: ‎04-22-2019

How to change link status of ethernet interface (USXGMII) without PHY?

Hi,

I'm using Linux AXI ethernet (USXGMII) interface. (This URL)

I had tested insertion or desertion SFP on a custom board.

But, RUNNING status of the ethernet interface did not change.

For example,


root@board:~# ifconfig eth1 #SFP is inserted
eth1 Link encap:Ethernet HWaddr 00:0A:35:00:00:01
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20a:35ff:fe00:1/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:285 errors:0 dropped:4 overruns:0 frame:0
TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27765 (27.1 KiB) TX bytes:7500 (7.3 KiB)

root@board:~# [ 214.134484] sfp sfp-eth0: module removed
root@board:~# ifconfig eth1 #SFP is deserted
eth1 Link encap:Ethernet HWaddr 00:0A:35:00:00:01
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20a:35ff:fe00:1/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1  <-- I think that RUNNING status can be changed. But it can't.
RX packets:292 errors:0 dropped:4 overruns:0 frame:0
TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:28303 (27.6 KiB) TX bytes:8157 (7.9 KiB)

root@board:~# [ 226.100239] sfp sfp-eth0: module FINISAR CORP. FTLX8573D3BTL rev A sn A02AWA2 dc 180713
root@board:~# ifconfig eth1 #SFP is inserted
eth1 Link encap:Ethernet HWaddr 00:0A:35:00:00:01
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20a:35ff:fe00:1/64 Scope:Link
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:292 errors:0 dropped:4 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:28303 (27.6 KiB) TX bytes:8430 (8.2 KiB)

root@board:~#



I need to set/get RUNNING flag at ethernet interface.

How can I change RUNNING or other flags (MULTICAST or BROADCAST) without PHY?

Do I modify kernel code? or must be used PHY?

 

Eth0 uses TI DP83867 PHY on the same custom board.

I could check that RUNNING flag of Eth0 was changed.


root@board:~# ifconfig eth0 #ethernet cable is connected
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:01
inet addr:192.168.0.189 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1565 (1.5 KiB) TX bytes:5576 (5.4 KiB)
Interrupt:29

[ 157.771277] macb ff0d0000.ethernet eth0: link down

root@board:~# ifconfig eth0 #ethernet cable is disconnected

eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:01
inet addr:192.168.0.189 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1565 (1.5 KiB) TX bytes:5576 (5.4 KiB)
Interrupt:29

root@board:~# [ 165.963470] macb ff0d0000.ethernet eth0: link up (1000/Full)
root@board:~# ifconfig eth0 #ethernet cable is connected
eth0 Link encap:Ethernet HWaddr 00:0A:35:00:22:01
inet addr:192.168.0.189 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1565 (1.5 KiB) TX bytes:5576 (5.4 KiB)
Interrupt:29

root@board:~#


 

 

Help me, please.

 

0 Kudos
0 Replies