[U-Boot] Ping failure

Paul Nader paul.nader at gmail.com
Thu Nov 8 20:19:18 UTC 2018


Hi,

I tried with x-over cable and the results were practically the same - no
pings.

I increased the tx-delay-ps to 700ps and then I started getting the
occasional arp being responded to. Below that I wouldn't see any. Here is
the relevant potion of my DT (attached):

&emac {
        pinctrl-names = "default";
        pinctrl-0 = <&rgmii_pins>;
        phy-mode = "rgmii";
        phy-handle = <&ext_rgmii_phy>;
        phy-supply = <&reg_dcdc1>;
        allwinner,tx-delay-ps = <700>;
        status = "okay";
};

&mdio {
        ext_rgmii_phy: ethernet-phy at 1 {
                compatible = "ethernet-phy-ieee802.3-c22";
                reg = <1>;
        };
};

Below is a the trace for a ping (I've added some more code trace statements
myself). Here the first ARP request times out, but the second one is
responded to.
I see the requests and responses in wireshark on the development host
(attached to email).
The host doing the ping is 192.168.0.2 (02:ba:7b:d5:c6:6f), the one suposed
to respond is 192.168.0.1 (94:de:80:7e:84:9c)

DEBUG.none,net/net.c:412-net_loop() --- net_loop Entry
DEBUG.none,net/eth-uclass.c:272-eth_init() Trying ethernet at 1c30000
DEBUG.none,include/net.h:655-net_set_state() --- NetState set to 0
DEBUG.none,net/net.c:438-net_loop() --- net_loop Init
Using ethernet at 1c30000 device
DEBUG.none,net/net.c:795-net_set_timeout_handler() --- net_loop timeout
handler set (000000007dfa4ea8)
DEBUG.none,net/ping.c:44-ping_send() sending ARP for 192.168.0.1
DEBUG.none,net/arp.c:58-arp_raw_request() ARP broadcast 1
DEBUG.none,net/eth-uclass.c:332-eth_send() uclass_emac_eth_send
DEBUG.none,drivers/net/sun8i_emac.c:572-_sun8i_emac_eth_send()
_sun8i_emac_eth_send
DEBUG.none,net/arp.c:109-arp_timeout_check() ARP Timeout expired: 669957
5000
DEBUG.none,net/arp.c:58-arp_raw_request() ARP broadcast 2
DEBUG.none,net/eth-uclass.c:332-eth_send() uclass_emac_eth_send
DEBUG.none,drivers/net/sun8i_emac.c:572-_sun8i_emac_eth_send()
_sun8i_emac_eth_send
DEBUG.none,net/net.c:1087-net_process_received_packet() packet received
DEBUG.none,net/net.c:1159-net_process_received_packet() Receive from
protocol 0x806
DEBUG.none,net/arp.c:140-arp_receive() Got ARP
DEBUG.none,net/arp.c:196-arp_receive() Got ARP REPLY
DEBUG.none,net/arp.c:212-arp_receive() Got ARP REPLY, set eth addr
(94:de:80:7e:84:9c)
DEBUG.none,net/arp.c:226-arp_receive() Sending tx_packet
DEBUG.none,net/eth-uclass.c:332-eth_send() uclass_emac_eth_send
DEBUG.none,drivers/net/sun8i_emac.c:572-_sun8i_emac_eth_send()
_sun8i_emac_eth_send
DEBUG.none,net/net.c:622-net_loop() --- net_loop timeout
DEBUG.none,include/net.h:655-net_set_state() --- NetState set to 3
DEBUG.none,include/net.h:655-net_set_state() --- NetState set to 3
DEBUG.none,net/net.c:759-net_set_udp_handler() --- net_loop UDP handler set
(0000000000000000)
DEBUG.none,net/net.c:773-net_set_arp_handler() --- net_loop ARP handler set
(0000000000000000)
DEBUG.none,net/net.c:791-net_set_timeout_handler() --- net_loop timeout
handler cancelled
DEBUG.none,net/net.c:659-net_loop() --- net_loop Fail!
DEBUG.none,include/net.h:655-net_set_state() --- NetState set to 0
ping failed; host 192.168.0.1 is not alive
DEBUG.none,common/command.c:501-cmd_call() Command failed, result=1
DEBUG.none,net/net.c:412-net_loop() --- net_loop Entry
DEBUG.none,net/eth-uclass.c:272-eth_init() Trying ethernet at 1c30000
DEBUG.none,include/net.h:655-net_set_state() --- NetState set to 0
DEBUG.none,net/net.c:438-net_loop() --- net_loop Init
Using ethernet at 1c30000 device
DEBUG.none,net/net.c:795-net_set_timeout_handler() --- net_loop timeout
handler set (000000007dfa4ea8)
DEBUG.none,net/ping.c:44-ping_send() sending ARP for 192.168.0.1
DEBUG.none,net/arp.c:58-arp_raw_request() ARP broadcast 1
DEBUG.none,net/eth-uclass.c:332-eth_send() uclass_emac_eth_send
DEBUG.none,drivers/net/sun8i_emac.c:572-_sun8i_emac_eth_send()
_sun8i_emac_eth_send
DEBUG.none,net/net.c:759-net_set_udp_handler() --- net_loop UDP handler set
(0000000000000000)
DEBUG.none,net/net.c:773-net_set_arp_handler() --- net_loop ARP handler set
(0000000000000000)
DEBUG.none,net/net.c:791-net_set_timeout_handler() --- net_loop timeout
handler cancelled

Even though _sun8i_emac_eth_send() is called to send the ICMP ping packet I
never see it arrive at the host. After that net loop times out at
net/net.c:622

Any suggestions on how to proceed next?

Paul

On Tue, Nov 6, 2018 at 10:54 AM Paul Nader <paul.nader at gmail.com> wrote:

> I'll try without the switch using a crossover cable to link the board and
> the host running wireshark directly and let you know.
>
> On Tue, Nov 6, 2018 at 10:19 AM Paul Nader <paul.nader at gmail.com> wrote:
>
>>
>>
>> On Tue, Nov 6, 2018 at 9:45 AM Chris Packham <judge.packham at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Tue, 6 Nov 2018, 6:09 AM Paul Nader <paul.nader at gmail.com wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm trying to get an olinuxino-a64 board to boot using bootp but it
>>>> failed
>>>> to send any DHCP packets so I reduced the problem to trying to get it to
>>>> ping another host but that fails as well.
>>>>
>>>> I tried it both with 2018.09 and then the head of master given there
>>>> were
>>>> some recent commits to the net area to fix handling asynchronous
>>>> responses.
>>>>
>>>> I'm testing this  by having the board ethernet connected to a switch and
>>>> another port of the switch to a host running wireshark snooping packets
>>>> in
>>>> promiscuous mode.
>>>>
>>>
>>> Could the switch be dropping the packets? Are the ports in the same
>>> vlan? Is your monitoring host the same host you're trying to ping? (if not
>>> you'll need to configure your switch for mirroring)
>>>
>>
>>
>> The switch is a unmanaged TP-Link SG105
>> <https://www.tp-link.com/uk/products/details/cat-42_TL-SG105.html> which
>> as far as I can tell has no configuration.
>>
>> The host I am pinging is the same host that is running wireshark.
>>
>>
>>>
>>>> In:    serial
>>>> Out:   serial
>>>> Err:   serial
>>>> Net:   phy interface7
>>>> eth0: ethernet at 1c30000
>>>> starting USB...
>>>> No controllers found
>>>> Hit any key to stop autoboot:  0
>>>> => setenv ipaddr 192.168.0.2
>>>> => log level 10
>>>> => setenv netmask 255.255.255.0
>>>>
>>>
>>> What do you end up with for a mac address? I'm not familiar with the
>>> olinuxino hardware does it have an eeprom for the mac or does it just come
>>> from the environment.
>>>
>>>>
>>>>
>> I tried overwriting the mac address using setenv but it wouldn't allow it
>> so I think it is coming from an eeprom. I didn't set it up in the u-boot
>> environment.
>>
>> Also, just to reiterate, this all works fine once the kernel has booted.
>> I can configure the interface within linux and ping the host without any
>> problems.
>>
>>
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wireshark_eth0_20181108164511_scCpYP.pdf
Type: application/pdf
Size: 21570 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/185e1144/attachment.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sun50i-a64-olinuxino.dts
Type: audio/vnd.dts
Size: 6107 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/185e1144/attachment.bin>


More information about the U-Boot mailing list