Hi,
I'm having a problem not being able to ping to an ipaddress. I'm wokring on P1021rdb PowerQUICC based processor, configured eTSEC2 in SGMII mode. The link shows being "Link - Up" but unable to ping
I'm only using ethernet 1 (eTSEC2 in SGMII mode)
Please find all the info regarding the board bring up, uboot output, dts,
bootUp file and Application which configures the ethernet is attached
Please go through the files.
DTS:
==========p1021rdb-pc.dtsi========
&soc {
mdio@25000 {
tbi1:tbi-phy@1f {
reg = <0x1f>;
device_type = "tbi-phy";
};
};
enet1: ethernet@b1000 {
// fixed-link =<31 1 1000 0 0>;
//phy-handle = <&phy0>;
phy-handle = <&tbi1>;
tbi-handle = <&tbi1>;
phy-connection-type = "sgmii";
};
};
=========p1021si-pre.dtsi=========
aliases {
serial0 = &serial0;
serial1 = &serial1;
// ethernet0 = &enet0;
ethernet1 = &enet1;
// ethernet2 = &enet2;
// pci0 = &pci0;
// pci1 = &pci1;
};
========p1021si-post.dtsi==========
enet1: enet1_grp2: ethernet@b1000 {
// ptimer-handle = <&ptp_timer>;
fsl,pmc-handle = <&etsec2_clk>;
};
global-utilities@e0000 {
compatible = "fsl,p1021-guts";
reg = <0xe0000 0x1000>;
fsl,has-rstcr;
};
=========pq3-etsec2-1.dtsi=======
mdio@25000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-tbi"; //changed from etsec2-tbi to gianfar-tbi since tbipa = 0x030
reg = <0x25000 0x1000 0xb1030 0x4>;
};
ethernet@b1000 {
#address-cells = <1>;
#size-cells = <1>;
device_type = "network";
model = "eTSEC";
compatible = "fsl,etsec2";
fsl,num_rx_queues = <0x8>;
fsl,num_tx_queues = <0x8>;
fsl,magic-packet;
local-mac-address = [ 00 11 22 33 44 77 ];
ranges;
queue-group@b1000 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0xb1000 0x1000>;
interrupts = <35 2 0 0 36 2 0 0 40 2 0 0>;
};
};
==========pq3-etsec2-grp2-1.dtsi============
&enet1_grp2 {
queue-group@b5000 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0xb5000 0x1000>;
interrupts = <51 2 0 0 52 2 0 0 67 2 0 0>;
};
};
======UBOOT========
==>print
eth1addr=00:11:22:02:01:01
eth2addr=00:11:22:02:01:01
ethact=eTSEC2
ethaddr=00:11:22:33:44:55
ethprime=eTSEC2
ipaddr=192.168.30.176
=> mdio list
FSL_MDIO:
0 - Generic PHY <--> eTSEC2
15 - TI DP83867 <--> eTSEC3
17 - Generic PHY <--> eTSEC1
==============
After board bringUp, we created an application which configures the ethernet,
we are using ELECTRICAL SFP (Finisar).
Application successfully configures the ethernet and the Link is Up,
but not able to use PING
Attached the BootUp file and Application Output File. Please check the files
===============================
=========ethtool=========
root@p1021rdb:~# ethtool eth0
Settings for eth0:
Supported ports: [ MII ]
Supported link modes: 1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 31
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup
Link detected: yes
root@p1021rdb:~# ethtool -a eth0
Pa Ker: gfar_gpauseparam epause->autoneg: 0 epause->rx_pause: 0 epause->tx_pause: 0
use parameters for eth0:
Autonegotiate: off
RX: off
TX: off
============PING=================
root@p1021rdb:~# ping 192.168.30.123
PIN Ker: gfar_start_xmit
G 192.168.30.123 (192.168.30.123) 56(84) bytes of data.
Ker: gfar_start_xmit
Ker: gfar_start_xmit
Ker: gfar_start_xmit
From 192.168.30.51 icmp_seq=1 Dest Ker: gfar_start_xmit
ination Host Unreachable
From 192.168.30.51 icmp_seq=2 Destination Host Unreachable
From 192.168.30.51 icmp_seq=3 Destination Host Unreachable
Ker: gfar_start_xmit
Ker: gfar_start_xmit
From 192.168.30.51 icmp_seq=4 Desti Ker: gfar_start_xmit
nation Host Unreachable
From 192.168.30.51 icmp_seq=5 Destination Host Unreachable
From 192.168.30.51 icmp_seq=6 Destination Host Unreachable
^C
--- 192.168.30.123 ping statistics ---
7 packets transmitted, 0 received, +6 errors, 100% packet loss, time 6000ms
pipe 3
root@p1021rdb:~# Ker: gfar_start_xmit
========
Awaiting for response
Thank you
Solved! Go to Solution.
Found the solution for the error.
I was going through the Gianfar.c and in the gfar_start() function I've observed that the below two lines of code which enables the queues were commented.
gfar_write(®s->rqueue, priv->rqueue);
gfar_write(®s->tqueue, priv->tqueue);
i don't remember why it was commented out, but thank you for the support given
Please define enet1 similar as the following.
enet1: ethernet@b1000 {
phy-handle = <&phy0>;
tbi-handle = <&tbi1>;
phy-connection-type = "sgmii";
}
mdio@24000 {
phy0: ethernet-phy@0 {
interrupt-parent = <&mpic>;
interrupts =<3
reg = <0x0>;
};
...
Found the solution for the error.
I was going through the Gianfar.c and in the gfar_start() function I've observed that the below two lines of code which enables the queues were commented.
gfar_write(®s->rqueue, priv->rqueue);
gfar_write(®s->tqueue, priv->tqueue);
i don't remember why it was commented out, but thank you for the support given
Hello solomon,
You need to contact the PHY manufacturer for driver availability.
Please refer to https://elixir.bootlin.com/linux/latest/source/drivers/net/phy/mdio-i2c.c
You need to replace phy_read()/phy_write in PHY device driver with i2c read/write functions.