#18768: Nexx WT3020 Failsafe does not work
-----------------------+------------------------
  Reporter:  probono   |      Owner:  developers
      Type:  defect    |     Status:  new
  Priority:  normal    |  Milestone:
 Component:  packages  |    Version:  Trunk
Resolution:            |   Keywords:
-----------------------+------------------------

Comment (by marcin1j):

 The problem is that the switch on MT7620 has VLANs enabled by default and
 in this mode, eth0 won't receive any packet unless you create at least one
 eth0.x device for VLANs and bring it up.
 Therefore, you have to either:
  1. Create at least `eth0.1` and use it as default failsafe device,
 bringing `eth0` up (this is what the preinit script does for rt305x
 switch),
  2. Turn off VLAN support - easier approach, the following patch will fix
 network in failsafe mode:
 {{{
 #!diff
 diff --git a/target/linux/ramips/base-
 files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-
 files/lib/preinit/07_set_preinit_iface_ramips
 index cae6396..42e3386 100644
 --- a/target/linux/ramips/base-
 files/lib/preinit/07_set_preinit_iface_ramips
 +++ b/target/linux/ramips/base-
 files/lib/preinit/07_set_preinit_iface_ramips
 @@ -26,6 +26,11 @@ ramips_set_preinit_iface() {
                 vconfig add eth0 1
                 ifconfig eth0 up
                 ifname=eth0.1
 +       elif grep MT7620 /proc/cpuinfo; then
 +               swconfig dev mt7620 set reset 1
 +               swconfig dev mt7620 set enable_vlan 0
 +               swconfig dev mt7620 set apply
 +               ifname=eth0
         else
                 ifname=eth0
         fi
 }}}

 I can't tell which solution conforms better to OpenWrt code base, but for
 some reason the MT7620 switch driver enables VLAN when probing for device
 (see
 
[browser:trunk/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620a.c@44044#L725
 gsw_mt7620a.c] - the third parameter of `mt7530_probe()` enables or
 disables VLAN):
 {{{
 #!c
 int mt7620_gsw_config(struct fe_priv *priv)
 {
         struct mt7620_gsw *gsw = (struct mt7620_gsw *) priv->soc->swpriv;

         /* is the mt7530 internal or external */
         if (priv->mii_bus && priv->mii_bus->phy_map[0x1f]) {
                 mt7530_probe(priv->device, gsw->base, NULL, 0);
                 mt7530_probe(priv->device, NULL, priv->mii_bus, 1);
         } else {
                 mt7530_probe(priv->device, gsw->base, NULL, 1);
         }

         return 0;
 }
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/18768#comment:5>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to