• Resolved

PROCESSOR-SDK-AM335X: PRU Ethernet issue on ICEv2

Prodigy 175 points

Replies: 6

Views: 76

Part Number: PROCESSOR-SDK-AM335X

Hi all,

I am using TI SDK 06.03.00.106 with kernel vs 4.19.94 on my ICEv2 board.

I need to run the board as Single EMAC. Although I've followed Documentation/devicetree/bindings/ti-prueth.txt while modifying the attached DTS file, I got crash messages about prueth timer from ti_prueth driver (logs are attached)

Have you any comments about the issue?

By the way, I've already read and applied the below URLs contents and could not get helpful info from those topics

Attachments

4617.icev2-prueth-singleemac-crash-logs.txt

1346.icev2-prueth-singleemac-startup-logs.txt

8154.am335x-icev2-prueth-sdk060300-kernel4.19.94-singleemac.DTS.zip

  • Hello Murat,

    I am able to replicate your results on an AM437x. Give me a day or so to look at this.

    Regards,

    Nick

  • In reply to Nick Saulnier:

    Hello Nick,

    Is there any progress in the issue at your side?

  • In reply to Nick Saulnier:

    Hello Nick,

    Sorry for making pressure but the issue is in urgent status at my side. Is there any progress in the issue at your side?

  • In reply to Murat Boyar:

    Hello Murat,

    Understood. I will have another reply in a day or so.

    Regards,

    Nick

  • In reply to Nick Saulnier:

    Hello Murat,

    It looks like the driver is missing a check for the emac pointer. This patch seems to fix the single EMAC issue on Linux Processor SDK 6.3 (Linux 4.19.94) when bringing the PRUETH port up with "ifconfig eth1 up":

    diff --git a/drivers/net/ethernet/ti/prueth.c
    b/drivers/net/ethernet/ti/prueth.c
    index a3b596f746aa..38e8a2507cbf 100644
    --- a/drivers/net/ethernet/ti/prueth.c
    +++ b/drivers/net/ethernet/ti/prueth.c
    @@ -1532,6 +1532,9 @@ static enum hrtimer_restart prueth_timer(struct hrtimer *timer)
    
             for (mac = PRUETH_MAC0; mac <= PRUETH_MAC1; mac++) {
                     emac = prueth->emac[mac];
    +               if (!emac)
    +                       continue;
    +
                     if (!(prueth->emac_configured & BIT(emac->port_id)))
                             break; /* port not enabled */
    

    Note that I did not try sending and receiving packets since I do not have physical access to my boards right now, so there may be other hidden single emac issues that I was not able to test.

    Regards,

    Nick

  • In reply to Nick Saulnier:

    It seems as working, everything is ok for now after applying the patch you shared. Thanks for your valuable support!

    root@mgate-eth:~# ifconfig -a
    eth0      Link encap:Ethernet  HWaddr 2c:6b:7d:49:cd:19
              inet addr:10.10.10.209  Bcast:10.10.10.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:351 errors:0 dropped:0 overruns:0 frame:0
              TX packets:336 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:461214 (450.4 KiB)  TX bytes:460286 (449.4 KiB)
    
    lo        Link encap:Local Loopback
              LOOPBACK  MTU:65536  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    sit0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
              NOARP  MTU:1480  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    root@mgate-eth:~# ethtool -i eth0
    driver: PRUSS Ethernet driver
    version: 0.2
    firmware-version:
    expansion-rom-version:
    bus-info:
    supports-statistics: yes
    supports-test: no
    supports-eeprom-access: no
    supports-register-dump: no
    supports-priv-flags: no
    root@mgate-eth:~#
    root@mgate-eth:~# ping  -s 50000 -l 4 10.10.10.195
    PING 10.10.10.195 (10.10.10.195) 50000(50028) bytes of data.
    50008 bytes from 10.10.10.195: icmp_seq=1 ttl=128 time=9.50 ms
    50008 bytes from 10.10.10.195: icmp_seq=2 ttl=128 time=10.0 ms
    50008 bytes from 10.10.10.195: icmp_seq=3 ttl=128 time=9.58 ms
    50008 bytes from 10.10.10.195: icmp_seq=4 ttl=128 time=10.3 ms
    50008 bytes from 10.10.10.195: icmp_seq=5 ttl=128 time=9.96 ms
    50008 bytes from 10.10.10.195: icmp_seq=6 ttl=128 time=9.96 ms
    ^C
    --- 10.10.10.195 ping statistics ---
    6 packets transmitted, 6 received, 0% packet loss, time 2002ms
    rtt min/avg/max/mdev = 9.505/9.904/10.351/0.308 ms, pipe 4
    root@mgate-eth:~#