[OpenWrt-Devel] [RFC] ipq40xx: qca8x / ipqess: 10_indicate_preinit Likely Needs Adjustment

Jeff Kletsky lede at allycomm.com
Fri Mar 15 16:44:50 EDT 2019


In working with an IPQ4019 device with qca8x and ipqess,
using a handful of patches[1] from
<https://git.openwrt.org/openwrt/staging/chunkeey.git>

it appears that `10_indicate_preinit` has some behavior that needs to
be addressed in the future, prior to calling `preinit_net_echo`.

The two issues that I see include

   * eth0 needs to be "up" for lan1 at eth0 to be "up"

   * qca8x takes a little over a second from interface up request
     to the time that the bridge has reconfigured itself

The timing issue may be "hidden" once UCI-based switch configuration
is present in `preinit_config_switch`, but should be considered if the
`preinit_net_echo` functionality is to be reliably supported.


Indication of the issues can be seen in the boot log (serial) as

   [    4.024645] init: - preinit -
   ip: SIOCSIFFLAGS: Network is down
   sendto(): Network unreachable
   Press the [f] key and hit [enter] to enter failsafe mode


An "ugly hack" for this is to `ip link set dev eth0 up`
prior to trying to bring up lan1, then `sleep 2` after lan1 is up


The delay in qca8k is just a little over a second:

   [    5.165257] qca8k c000000.switch lan1: configuring for phy/ link mode
   DEBUG: Snoozing for 2 seconds to allow qca8k to respond
   [    6.246260] qca8k c000000.switch lan1: Link is Up - 1Gbps/Full - 
flow control rx/tx
   [    6.246654] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready


I've thought about bringing up any interfaces that match `ethN`, as
well as waiting for the "up" condition before `preinit_net_echo` as
potentially more robust approaches. Other suggestions are welcome.



Jeff



[1]

1db1612bbc ipq40xx: include ipq40xx-ized qca8k version
2db429cf34 ipq40xx: fix NPE related to bogus use of fixed phy
505cfcfb1c ipq40xx: extend DT mdio node to be more accessible
abf050221c ipq40xx: add ipqess ethernet driver
2d6352f8b1 ipq40xx: add resets for individual MAC1-5 and PSGMII
fce445b243 ipq40xx: decouple mdio-ipq40xx and ar40xx
99e74d2e90 phytool: add phytool utility
c83b9fec9e ipq40xx: fix phy interrupt setting

The last of these patches appears to now be present in `master`
as commit 784f2e73df


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list