[OpenWrt-Devel] ar934x+ar8327v4

David Hutchison dhutchison at bluemesh.net
Wed Dec 10 03:29:44 EST 2014


I decided to try and toggle all of the bits by setting
ath79_eth0_pll_data.pll_1000=0x6f000000 and it seems to be flowing Ok:

root at OpenWrt:/# arp -n
IP address       HW type     Flags       HW address            Mask     Device
root at OpenWrt:/# brctl delif br-lan eth0
[   30.200000] device eth0 left promiscuous mode
[   30.200000] br-lan: port 1(eth0) entered disabled state
root at OpenWrt:/# ifconfig eth0 10.128.41.249 netmask 255.255.255.0 up
root at OpenWrt:/# ping 10.128.41.1
PING 10.128.41.1 (10.128.41.1): 56 data bytes
64 bytes from 10.128.41.1: seq=0 ttl=64 time=1.596 ms
64 bytes from 10.128.41.1: seq=1 ttl=64 time=0.673 ms
64 bytes from 10.128.41.1: seq=2 ttl=64 time=0.603 ms
64 bytes from 10.128.41.1: seq=3 ttl=64 time=0.595 ms
64 bytes from 10.128.41.1: seq=4 ttl=64 time=0.610 ms
64 bytes from 10.128.41.1: seq=5 ttl=64 time=0.606 ms
64 bytes from 10.128.41.1: seq=6 ttl=64 time=0.628 ms
64 bytes from 10.128.41.1: seq=7 ttl=64 time=0.559 ms
64 bytes from 10.128.41.1: seq=8 ttl=64 time=0.641 ms
64 bytes from 10.128.41.1: seq=9 ttl=64 time=0.593 ms
64 bytes from 10.128.41.1: seq=10 ttl=64 time=0.603 ms
64 bytes from 10.128.41.1: seq=11 ttl=64 time=0.596 ms
64 bytes from 10.128.41.1: seq=12 ttl=64 time=0.596 ms
64 bytes from 10.128.41.1: seq=13 ttl=64 time=0.596 ms
64 bytes from 10.128.41.1: seq=14 ttl=64 time=0.642 ms
64 bytes from 10.128.41.1: seq=15 ttl=64 time=0.590 ms
64 bytes from 10.128.41.1: seq=16 ttl=64 time=0.836 ms
^C
--- 10.128.41.1 ping statistics ---
17 packets transmitted, 17 packets received, 0% packet loss
round-trip min/avg/max = 0.559/0.680/1.596 ms
root at OpenWrt:/# arp -n
IP address       HW type     Flags       HW address            Mask     Device
10.128.41.1      0x1         0x2         d4:ca:6d:77:2b:3d     *        eth0

I am once again just guessing with 0x6f000000, so I am sure this is wrong.
I would love to learn if you could give me insight :-)

I would also love to make a patch for both the 951G and the rb2011
(gigabit switch version). I don't have packet loss anymore! :-)

-- Davey

On Wed, Dec 10, 2014 at 1:00 AM, David Hutchison
<dhutchison at bluemesh.net> wrote:
> Hello,
>
> I have made some progress narrowing down the issue. It seems the
> ath79_eth0_pll_data.pll_1000 is not configured correctly. I do not
> understand how to determine what the correct value should be.
> Originally the mach-rb95x.c did not have any definition for this
> variable. I looked at other Mikrotik architectures and found the
> 750Gr3 utilized this and set it to 0x62000000. When I compiled this I
> noticed differences in the amount of packets I was receiving via eth0.
>
> Looking at more architectures it appears that other devices with an
> ar8327 use 0x06000000. I tried that and saw 100% packet loss, and arp
> was not responding. I went ahead and *guessed* and tried 0x66000000.
> Now pings sporadically began to respond:
>
> root at OpenWrt:/# arp -n
> IP address       HW type     Flags       HW address            Mask     Device
> 10.128.41.1      0x1         0x2         d4:ca:6d:77:2b:3d     *        eth0
> root at OpenWrt:/# ifconfig eth0 10.128.41.2 netmask 255.255.255.0 up
> root at OpenWrt:/# ifconfig eth0
> eth0      Link encap:Ethernet  HWaddr 4C:5E:0C:6D:24:43
>           inet addr:10.128.41.248  Bcast:10.128.41.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:187 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:14785 (14.4 KiB)  TX bytes:2180 (2.1 KiB)
>           Interrupt:4
>
> root at OpenWrt:/# ping 10.128.41.1
> PING 10.128.41.1 (10.128.41.1): 56 data bytes
> 64 bytes from 10.128.41.1: seq=3 ttl=64 time=1.169 ms
> 64 bytes from 10.128.41.1: seq=10 ttl=64 time=0.663 ms
> 64 bytes from 10.128.41.1: seq=12 ttl=64 time=1992.529 ms
> 64 bytes from 10.128.41.1: seq=17 ttl=64 time=0.660 ms
> 64 bytes from 10.128.41.1: seq=20 ttl=64 time=0.610 ms
> 64 bytes from 10.128.41.1: seq=23 ttl=64 time=0.612 ms
> 64 bytes from 10.128.41.1: seq=27 ttl=64 time=0.634 ms
> 64 bytes from 10.128.41.1: seq=31 ttl=64 time=0.631 ms
> 64 bytes from 10.128.41.1: seq=39 ttl=64 time=0.583 ms
> ^C
> --- 10.128.41.1 ping statistics ---
> 40 packets transmitted, 9 packets received, 77% packet loss
> round-trip min/avg/max = 0.583/222.010/1992.529 ms
>
> I have about 77% packet loss.
>
> This is improvement as originally we saw 100% packet loss and no arp.
>
> I looked at a patch by Gabor Juhosg (
> https://dev.openwrt.org/browser/trunk/target/linux/ar71xx/files/arch/mips/ath79/mach-rb91x.c?rev=39642
> ) and he set the RB91x to 0x02000000
> I think if we correctly configure it in mach-rb95x.c, we may solve the
> problem :-)
>
> Could someone help me determine what the correct
> ath79_eth0_pll_data.pll_1000 should be configured to?
>
> -- Davey
>
> On Mon, Dec 8, 2014 at 3:20 PM, Chris Green <cl at isbd.net> wrote:
>> On Mon, Dec 08, 2014 at 11:13:07AM -0700, David Hutchison wrote:
>>>
>>> root at OpenWrt:/dev# ifconfig eth0
>>> eth0      Link encap:Ethernet  HWaddr 4C:5E:0C:6D:24:43
>>>           inet addr:10.128.41.249  Bcast:10.128.41.255  Mask:255.255.255.0
>>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>>           RX packets:144 errors:0 dropped:0 overruns:0 frame:0
>>>           TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
>>>           collisions:0 txqueuelen:1000
>>>           RX bytes:8996 (8.7 KiB)  TX bytes:1292 (1.2 KiB)
>>>           Interrupt:4
>>>
>> If it's of any use/interest my rb-2011uias-2hnd gives the following
>> MAC addresses:-
>>
>>     br-lan    Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:3E
>>     eth0      Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:3E
>>     eth0.1    Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:3E
>>     eth0.2    Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:3E
>>     eth0.3    Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:3E
>>     eth1      Link encap:Ethernet  HWaddr 4C:5E:0C:73:87:43
>>
>> Oddly it's eth1, the 10/100 fast ethernet switch built into the
>> processor that works and eth0 the Gigabit switch that doesn't work.
>>
>> Running an ARP scan from another computer on the LAN shows the
>> mikrotik (192.168.1.40) as follows:-
>>
>>     192.168.1.40     mikrotik                    4C:5E:0C:73:87:3E (Unknown)
>>
>>
>> --
>> Chris Green
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list