[OpenWrt-Devel] AR8334 switch support

Christian Mehlis christian at m3hlis.de
Tue Apr 21 13:06:51 EDT 2015


Am 21.04.2015 um 17:19 schrieb Heiner Kallweit:
> All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
> (There was even an AR8335 with five ports mentioned).
> Considering the port / phy layout of AR8337 and the existing boards
> with AR8334 I'd assume that AR8334 has just two phy's.
> The 8327/8337 code of the driver at least would have to be extended to
> not assume a fixed 7 port / 5 phy layout.

I see.

> Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
> chip it also applies the fixups for AR8327 rev. 2, what is at least
> questionnable.
>
> Is the AR8334 fully functional with this slightly modified driver or
> are certain thing not working?

With the vendor patch, Linux is able to talk to the switch, and 
send/receive data.

Strange things I discovered:

1) on "plug out"

	Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down

is printed, but linux keeps the interface as UP.

2) # swconfig list (on this board) shows multiple switches?!
Found: switch0 - ag71xx-mdio.0
Found: switch1 - eth1

3) swconfig dev switch0 show
	works as expected.

files attached:
	1. boot with ports connected
	2. disconnect plugs
	3. dump the files

If you can supply some sort of patch for the 4 port switch, I would be 
happy to test. -> I want to have upstream support for the switch (and 
the compex wpj344).

In case you really need the actual hardware (the compex wpj344) I can 
send you a board.

Best
Christian

-------------- next part --------------
Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        arl_table: address resolution table
Port 0: MAC 56:61:d1:e9:13:d6

Port 0:
        mib: Port 0 MIB counters
RxBroad     : 19
RxPause     : 0
RxMulti     : 56
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 18
Rx128Byte   : 69
Rx256Byte   : 584
Rx512Byte   : 10
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 127420
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 58
TxBroad     : 134
TxPause     : 0
TxMulti     : 1141
TxUnderRun  : 0
Tx64Byte    : 21
Tx128Byte   : 1194
Tx256Byte   : 95
Tx512Byte   : 4
Tx1024Byte  : 4
Tx1518Byte  : 4
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 121582
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
        mib: Port 1 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
RxBroad     : 98
RxPause     : 0
RxMulti     : 326
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 135
Rx128Byte   : 295
Rx256Byte   : 31
Rx512Byte   : 2
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 40127
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 2
TxPause     : 0
TxMulti     : 5
TxUnderRun  : 0
Tx64Byte    : 3
Tx128Byte   : 37
Tx256Byte   : 5
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 5122
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 2
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
RxBroad     : 37
RxPause     : 0
RxMulti     : 815
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 54
Rx128Byte   : 732
Rx256Byte   : 64
Rx512Byte   : 2
Rx1024Byte  : 4
Rx1518Byte  : 4
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 76507
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 1
TxBroad     : 2
TxPause     : 0
TxMulti     : 15
TxUnderRun  : 0
Tx64Byte    : 1
Tx128Byte   : 12
Tx256Byte   : 561
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 111573
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: Port 6 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:6 link:down
VLAN 1:
        vid: 1
        ports: 0t 3 
VLAN 2:
        vid: 2
        ports: 0t 2 
-------------- next part --------------
br-lan    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          inet6 addr: fda5:f102:d34e::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:680 errors:0 dropped:0 overruns:0 frame:0
          TX packets:621 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:41359 (40.3 KiB)  TX bytes:114061 (111.3 KiB)

eth0      Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1228 errors:0 dropped:2 overruns:0 frame:0
          TX packets:686 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:108319 (105.7 KiB)  TX bytes:124883 (121.9 KiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:759 errors:0 dropped:0 overruns:0 frame:0
          TX packets:589 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:54118 (52.8 KiB)  TX bytes:111189 (108.5 KiB)

eth0.2    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet addr:10.0.19.104  Bcast:10.0.255.255  Mask:255.255.0.0
          inet6 addr: 2001:920:18ae:3:5461:d1ff:fee9:13d6/64 Scope:Global
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:463 errors:0 dropped:3 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:31793 (31.0 KiB)  TX bytes:10094 (9.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2480 (2.4 KiB)  TX bytes:2480 (2.4 KiB)

-------------- next part --------------
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fda5:f102:d34e::/48'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 3'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 2'


-------------- next part --------------
_______________________________________________
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