[OpenWrt-Devel] MV88E6060 switch
Nerijus Baliunas
nerijus at users.sourceforge.net
Sun Oct 8 16:12:59 EDT 2017
On Tue, 3 Oct 2017 03:27:21 +0300 Sergey Ryazanov <ryazanov.s.a at gmail.com> wrote:
> After these lines, I carefully examine available data about WRT300Nv2
> and related code and found several interesting things.
>
> Usually SoC in the router have only one ethernet interface and vendors
> pair it with manageable switch IC. This swith IC accepts packets from
> LAN and WAN ports, then it tags them and forward to the SoC. Thus,
> using VLAN tags, SoC can distinguish from which port the packet was
> received and handle it appropriately. So the firmware should contains
> a driver for switch IC to be able to properly configure ports and
> VLANs inside the switch.
>
> In case of WRT300Nv2 the SoC contains two ethernet adapters: NPE-C
> (eth1), which has own phy and acted as a WAN port and NPE-B (eth0),
> which is connected to switch IC, each port of which is acting as LAN
> port. So since all ports of switch are equal then the switch themself
> requires a minimal (if any) configuration. And this router can
> possibly act without any special driver for switch IC.
>
> Also I found why the switch is properly detected on the MDIO bus but
> not used as phy-device. This happened because PHY ID for eth0 is
> hardcoded inside WRT300Nv2 setup code.
>
> To check whether your board can act without dedicated driver for 88E6060:
> * revert any earlier modifications to LEDE if you do any
> * disable any drivers for 88E6060 (e.g. disable both
> CONFIG_NET_DSA_MV88E6060 and CONFIG_MVSWITCH_PHY)
> * place attached patch to the target/linux/ixp4xx/patches-4.4
> * rebuild and boot new firmware
> * check dmesg for "eth0: link up" message
> * check eth0 functioning: check packets receiving with tcpdump or
> manually assign IP address to the eth0 interface (without any VLAN's
> and so on) and try to ping.
I did this, and now when booting I see
[ 0.999140] eth0: MII PHY 32 on NPE-B
[ 1.005714] eth1: MII PHY 1 on NPE-C
...
[ 6.531972] NPE-B: firmware functionality 0x2, revision 0x2:1
[ 6.540066] eth0: link up, speed 100 Mb/s, full duplex
[ 9.070970] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 9.118732] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 9.250596] eth0: link down
I assigned IP with a command
ip a a 192.168.0.10/24 dev eth0
but ping from PC does not answer.
ifconfig -a shows a few RX and TX packets:
eth0 Link encap:Ethernet HWaddr 00:18:39:21:0D:AE
inet addr:192.168.0.10 Bcast:0.0.0.0 Mask:255.255.255.0
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
but the packet count does not increase after pinging.
Regards,
Nerijus
_______________________________________________
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