Re: [OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace
On 2019-09-16 22:43, Hauke Mehrtens wrote: On 9/16/19 7:09 PM, Martin Blumenstingl wrote: Hi Martin, On Mon, Sep 16, 2019 at 12:54 PM Martin Schiller wrote: Hi! I am searching for a possibility to disable Auto Negotiation of an PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch. The xrx200-net driver does not seem to have support for that. I don't know about xrx200-net, but ... Accessing the STD_CRTL register on the mdio bus from uboot with the mdio command works like expected. Any suggestions how to do that from linux userspace? ... my (limited) understanding is that this is one of the benefits of DSA: you get one interface per port - with that you can use for example ethtool to disable auto negotiation for one port kernel source reference: [0] I also do not know if xrx200-net supports that or if it is possible with swconfig at all. There is also a DSA driver for this switch in the mainline kernel: https://elixir.bootlin.com/linux/latest/source/drivers/net/dsa/lantiq_gswip.c This driver should support everything the xrx200-net driver supports plus some extras. I would prefer to use the DSA driver also in OpenWrt, but we need a way to migrate the existing configurations which are based on swconfig to DSA. You could try the fixed-link attribute in device tree to model this with DSA. Thanks for your answers. Switching to DSA would be nice, but it's too much work I can't afford right now. Disabling ANEG in the DTS is not enough, because I also need a way to turn ANEG on and off at runtime. Meanwhile I found out that there is a mechanism with swconfig to configure the link attributes: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=6219b3deae1c8dfbf405f5a701d3f3b00ebacce1 I will try to integrate this into the "old" xrx200-net driver. Martin ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] apm821xx: for Meraki MR24 modify BLOCKSIZE to reduce LEB over-allocation
On Meraki MR24, the BLOCKSIZE variable is used to allocate space for the kernel blob. The LEB size on MR24 is 15.5k (15872 bytes). In the particular instance observed, it was found that reducing blocksize to 512 bytes resulted in 3 fewer LEBs being allocated to the kernel ubi volume, with no ill effects. Signed-off-by: Russell Senior --- target/linux/apm821xx/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 8203de39c5..1aa4e0dad3 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -127,7 +127,7 @@ define Device/meraki_mr24 DEVICE_PACKAGES := kmod-spi-gpio -swconfig BOARD_NAME := mr24 DEVICE_DTS := meraki-mr24 - BLOCKSIZE := 63k + BLOCKSIZE := 512 IMAGES := sysupgrade.bin DTB_SIZE := 64512 IMAGE_SIZE := 8191k -- 2.23.0 -- Russell Senior, President russ...@personaltelco.net ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ath79: add support for TP-Link TL-MR6400
This adds support to the ath79 target for the TP-Link MR6400 router. As per original commit, hardware specifications (v1.0 EU): - SoC: QCA9531 - Flash: Winbond W25Q64FV (8MiB) - RAM: EtronTech EM6AB160TSE-5G (64MiB) - Wireless: SoC platform only (2.4GHz b/g/n, 2x internal antenna) - Ethernet: 2NIC (3x100M + 1x100M) - WWAN: TP-LINK LTE MODULE (2x external detachable antenna) - Power: DC 12V 1A Flashing instructions: You can flash via tftp recovery (serve factory image as /mr6400_tp_recovery.bin on 192.168.0.66/24, connect to any ethernet port and power on device while holding the reset button). Flashing via OEM web interface does not work. Working: - Wi-Fi - TP-Link LTE module does it's thing (but see Notes) - reset/rfkill keys Untested: - recovery via factory - leds Issues for which I need help: eth1 detects link when infact it's not there, and occasionally causes kernel traces due to tx timeouts. I promise I'll test untested items as well in final version Note: as it happened occasionally in ar71xx, during bursty flash activity, LTE module init will fail, with USB enumeration errors. Signed-off-by: Enrico Mioso CC: Filip Moc CC: Piotr Dymacz --- .../ath79/base-files/etc/board.d/01_leds | 6 + .../ath79/base-files/etc/board.d/02_network | 5 + .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts | 165 ++ target/linux/ath79/image/generic-tp-link.mk | 10 ++ 4 files changed, 186 insertions(+) create mode 100644 target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 778316e450..5728aeb491 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -130,6 +130,12 @@ tplink,archer-c7-v5) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20" ;; +tplink,tl-mr6400-v1) + ucidef_set_led_netdev "lan" "LAN" "tp-link:white:lan" "eth0" + ucidef_set_led_netdev "wan" "WAN" "tp-link:white:wan" "eth1" + ucidef_set_led_netdev "4g" "4G" "tp-link:white:4g" "usb0" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:white:wlan" "phy0tpt" + ;; tplink,archer-c2-v3|\ tplink,tl-wr1043nd-v4|\ tplink,tl-wr1043n-v5) diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 5b47af8ef7..2b0e1ce400 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -56,6 +56,11 @@ ath79_setup_interfaces() winchannel,wb2000) ucidef_set_interface_lan "eth0" ;; + tplink,tl-mr6400-v1) + ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0" + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" "3:lan" + ;; avm,fritz4020|\ pcs,cr3000|\ tplink,archer-c58-v1|\ diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts new file mode 100644 index 00..4acb1a02a4 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts @@ -0,0 +1,165 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include +#include + +#include "qca953x.dtsi" + +/ { + compatible = "tplink,tl-mr6400-v1", "qca,qca9531"; + model = "TP-Link TL-MR6400 v1.0"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + /* D12 */ + led_wan: wan { + label = "tp-link:white:wan"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + /* D11 */ + led_4g: 4g { + label = "tp-link:white:4g"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + + /* D5 */ + led_wps: wps { + label = "tp-link:white:wps"; + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + }; + + /* D3 */ + led_wlan: wlan { + label = "tp-link:white:wlan"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + + /* D2 */ + led_power: power { + label = "tp-link:white:power"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + + /* D4 */ + led_lan: lan { + label = "tp-link:white:lan"; + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + }
[OpenWrt-Devel] [PATCH] build: fix make kernel_menuconfig
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Use system pkg-config instead of toolchain pkg-config when the kernel config scripts are compiled (see FS#2423) Signed-off-by: Thomas Albers --- Makefile | 1 + tools/pkg-config/files/pkg-config | 6 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5301883061..7bfc34e002 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir world: +export SYSTEM_PKG_CONFIG:=$(shell which pkg-config) export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) ifneq ($(OPENWRT_BUILD),1) diff --git a/tools/pkg-config/files/pkg-config b/tools/pkg-config/files/pkg-config index 82cc74ffcb..00243e663e 100755 --- a/tools/pkg-config/files/pkg-config +++ b/tools/pkg-config/files/pkg-config @@ -1,3 +1,7 @@ #!/bin/sh -pkg-config.real --define-variable=prefix=${STAGING_PREFIX} --define-variable=exec_prefix=${STAGING_PREFIX} --define-variable=bindir=${STAGING_PREFIX}/bin $@ +if [ -n "${STAGING_PREFIX}" ]; then + pkg-config.real --define-variable=prefix=${STAGING_PREFIX} --define-variable=exec_prefix=${STAGING_PREFIX} --define-variable=bindir=${STAGING_PREFIX}/bin $@ +else + ${SYSTEM_PKG_CONFIG} $@ +fi -- 2.21.0 --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] uClibc++: Remove faulty patch
This patch was originally added to fix compilation with v4l2rtspserver. Turns out it was v4l2rtspserver that was broken, not uClibc++. This now causes issues with a different package where the arguments are being split. Note that with this patch, shellcheck throws an error: SC2068: Double quote array expansions to avoid re-splitting elements. More: https://github.com/openwrt/packages/pull/9972#discussion_r324878373 Signed-off-by: Rosen Penev --- package/libs/uclibc++/patches/002-quote-fix.patch | 13 - 1 file changed, 13 deletions(-) delete mode 100644 package/libs/uclibc++/patches/002-quote-fix.patch diff --git a/package/libs/uclibc++/patches/002-quote-fix.patch b/package/libs/uclibc++/patches/002-quote-fix.patch deleted file mode 100644 index 49e7ac3d14..00 --- a/package/libs/uclibc++/patches/002-quote-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ a/bin/Makefile.in -+++ b/bin/Makefile.in -@@ -44,8 +44,8 @@ define do_wrapper - $(Q)echo ' WRAPPER_OPTIONS="$$WRAPPER_OPTIONS -nodefaultlibs $$WRAPPER_LIBDIR -l$(LNAME) $$WRAPPER_LIBS"' >> $@.tmp - $(Q)echo 'fi' >> $@.tmp - $(Q)echo '' >> $@.tmp -- $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp -- $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR "$$@" $$WRAPPER_OPTIONS' >> $@.tmp -+ $(Q)echo '[ -n "$$V" ] && [ $$V -gt 1 ] && echo $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp -+ $(Q)echo 'exec $(CXX) $(GEN_CFLAGS) $(GEN_CXXFLAGS) $(EH_CXXFLAGS) $$WRAPPER_INCLUDEDIR $$@ $$WRAPPER_OPTIONS' >> $@.tmp - $(Q)echo '' >> $@.tmp - $(Q)chmod 0755 $@.tmp - $(Q)mv $@.tmp $@ -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace
On 9/16/19 7:09 PM, Martin Blumenstingl wrote: > Hi Martin, > > On Mon, Sep 16, 2019 at 12:54 PM Martin Schiller wrote: >> >> Hi! >> >> I am searching for a possibility to disable Auto Negotiation of an >> PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch. >> >> The xrx200-net driver does not seem to have support for that. > I don't know about xrx200-net, but ... > >> Accessing the STD_CRTL register on the mdio bus from uboot with the mdio >> command works like expected. >> >> Any suggestions how to do that from linux userspace? > ... my (limited) understanding is that this is one of the benefits of DSA: > you get one interface per port - with that you can use for example > ethtool to disable auto negotiation for one port > kernel source reference: [0] I also do not know if xrx200-net supports that or if it is possible with swconfig at all. There is also a DSA driver for this switch in the mainline kernel: https://elixir.bootlin.com/linux/latest/source/drivers/net/dsa/lantiq_gswip.c This driver should support everything the xrx200-net driver supports plus some extras. I would prefer to use the DSA driver also in OpenWrt, but we need a way to migrate the existing configurations which are based on swconfig to DSA. You could try the fixed-link attribute in device tree to model this with DSA. Hauke signature.asc Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Bumping net/wireless it s buggy ! 5.3-rc4-1 => 5.3 ( rc9) ?
Hi Sven, On 9/16/19 8:10 PM, sven falempin wrote: > Dear openWRT gurus, > > the patch : > https://github.com/torvalds/linux/commit/b67fd72e84a88cae64cea8ab47ccdaab3bb3094d#diff-35454f3f0395271a0e34581e160bea5f > > Is missing from my build : > ./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/backports-5.3-rc4-1 > > # cat /etc/openwrt_release > DISTRIB_ID='OpenWrt' > DISTRIB_RELEASE='SNAPSHOT' > DISTRIB_REVISION='r10985-4364dd244c' > DISTRIB_TARGET='ipq40xx/generic' > DISTRIB_ARCH='arm_cortex-a7_neon-vfpv4' > DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r10985-4364dd244c' > DISTRIB_TAINTS='no-all busybox' > > I tried to catch up the last commits, but it breaks my release. > Moreover, util.c exploded ( trace below) > > I do not know where backports-5.3-rc4-1 is inserted in linux-ipq, so I > cannot check if it was updated on your side with my missing commit to > be current. The Package Makefile for backports is located here: package/kernel/mac80211/Makefile We backported some patches from more recent version, but the one you linked is missing as far as I know. Please send a patch if you need it so we can add it. > Moreover I am not sure if this bug should be reported upstream on > linux ASM or some nl80211 mailing list. I think I also saw this once or twice, please report this upstream. Are you using ath10k-ct driver which is still based on Linux 4.19 or do you use the normal ath10k driver? > Would it be possible to backport 5.3 that was release 22 hours ago > over the 4.19 ? how to test it ? ( IE where is this backport copied / > used ) My plan is to update the wireless subsystem to the one from Linux 5.4 in about 4 weeks in OpenWrt master. Kernel 5.4 should be a LTS kernel so we can follow that one and get security and other updates for the next few years. OpenWrt 19.07 will stay at the wireless subsystem of Linux 4.19 and will get updated to the most recent 4.19 stable version every few months. Hauke > > Please advise. > > > # [ 6872.302513] [ cut here ] > [ 6872.302926] WARNING: CPU: 0 PID: 0 at > backports-5.3-rc4-1/net/wireless/util.c:1171 > cfg80211_calculate_bitrate+0x1d8/0x24c [cfg80211] > [ 6872.306319] invalid rate bw=4, mcs=15, nss=4 > [ 6872.318171] Modules linked in: pppoe ppp_async iptable_nat > ipt_MASQUERADE ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack > xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat > nf_flow_table_hw nf_flow_table nf_conntrack_rtcache > nf_conntrack_netlink nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time > xt_tcpudp xt_multiport xt_mark > xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 > nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle > iptable_filter ip_tables hwmon crc_ccitt compat xt_set ip_set_list_set > ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet > ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac > ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport > ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port > ip_set_bitmap_ipmac ip_set_bitmap_ip > [ 6872.370738] ip_set nfnetlink nf_log_ipv6 nf_log_common > ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables > nf_reject_ipv6 ip_tunnel tun vxlan udp_tunnel ip6_udp_tunnel leds_gpio > xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug > [ 6872.393242] CPU: 0 PID: 0 Comm: swapper/0 Tainted: GW > 4.19.69 #0 > [ 6872.415448] Hardware name: Generic DT based system > [ 6872.422962] [] (unwind_backtrace) from [] > (show_stack+0x10/0x14) > [ 6872.427552] [] (show_stack) from [] > (dump_stack+0x88/0x9c) > [ 6872.435646] [] (dump_stack) from [] (__warn+0xd4/0xf0) > [ 6872.442671] [] (__warn) from [] > (warn_slowpath_fmt+0x38/0x48) > [ 6872.450470] [] (warn_slowpath_fmt) from [] > (cfg80211_calculate_bitrate+0x1d8/0x24c [cfg80211]) > [ 6872.459339] [] (cfg80211_calculate_bitrate [cfg80211]) > from [] (ieee80211s_update_metric+0x78/0x9c [mac80211]) > [ 6872.469580] [] (ieee80211s_update_metric [mac80211]) from > [] (ieee80211_tx_monitor+0x768/0xb4c [mac80211]) > [ 6872.481163] [] (ieee80211_tx_monitor [mac80211]) from > [] (ieee80211_tx_status+0x88/0x90 [mac80211]) > [ 6872.492320] [] (ieee80211_tx_status [mac80211]) from > [] (ath10k_txrx_tx_unref+0x540/0x58c [ath10k_core]) > [ 6872.502657] [] (ath10k_txrx_tx_unref [ath10k_core]) from > [] (ath10k_htt_t2h_msg_handler+0x610/0x1fb8 [ath10k_core]) > [ 6872.513377] [] (ath10k_htt_t2h_msg_handler [ath10k_core]) > from [] (ath10k_pci_htt_rx_cb+0x1c8/0x218 [ath10k_pci]) > [ 6872.525404] [] (ath10k_pci_htt_rx_cb [ath10k_pci]) from > [] (ath10k_ce_per_engine_service+0x80/0xd8 [ath10k_core]) > [ 6872.537968] [] (ath10k_ce_per_engine_service > [ath10k_core]) from [] > (ath10k_ce_per_engine_service_any+0x6c/0x98 [ath10k_core]) > [ 6872.549388] [] (ath10k_ce_per_engine_service_any > [ath10k_core]) from [] (ath10k_pci_napi_poll+0x64/0x100 > [ath10k_pci]) > [ 6872.561741] [] (ath10k_pci_napi_poll [ath10k_pci]) from >
[OpenWrt-Devel] Bumping net/wireless it s buggy ! 5.3-rc4-1 => 5.3 ( rc9) ?
Dear openWRT gurus, the patch : https://github.com/torvalds/linux/commit/b67fd72e84a88cae64cea8ab47ccdaab3bb3094d#diff-35454f3f0395271a0e34581e160bea5f Is missing from my build : ./build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/backports-5.3-rc4-1 # cat /etc/openwrt_release DISTRIB_ID='OpenWrt' DISTRIB_RELEASE='SNAPSHOT' DISTRIB_REVISION='r10985-4364dd244c' DISTRIB_TARGET='ipq40xx/generic' DISTRIB_ARCH='arm_cortex-a7_neon-vfpv4' DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r10985-4364dd244c' DISTRIB_TAINTS='no-all busybox' I tried to catch up the last commits, but it breaks my release. Moreover, util.c exploded ( trace below) I do not know where backports-5.3-rc4-1 is inserted in linux-ipq, so I cannot check if it was updated on your side with my missing commit to be current. Moreover I am not sure if this bug should be reported upstream on linux ASM or some nl80211 mailing list. Would it be possible to backport 5.3 that was release 22 hours ago over the 4.19 ? how to test it ? ( IE where is this backport copied / used ) Please advise. # [ 6872.302513] [ cut here ] [ 6872.302926] WARNING: CPU: 0 PID: 0 at backports-5.3-rc4-1/net/wireless/util.c:1171 cfg80211_calculate_bitrate+0x1d8/0x24c [cfg80211] [ 6872.306319] invalid rate bw=4, mcs=15, nss=4 [ 6872.318171] Modules linked in: pppoe ppp_async iptable_nat ipt_MASQUERADE ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_FLOWOFFLOAD pppox ppp_generic nf_nat_ipv4 nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack_netlink nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables hwmon crc_ccitt compat xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip [ 6872.370738] ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ip_tunnel tun vxlan udp_tunnel ip6_udp_tunnel leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug [ 6872.393242] CPU: 0 PID: 0 Comm: swapper/0 Tainted: GW 4.19.69 #0 [ 6872.415448] Hardware name: Generic DT based system [ 6872.422962] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 6872.427552] [] (show_stack) from [] (dump_stack+0x88/0x9c) [ 6872.435646] [] (dump_stack) from [] (__warn+0xd4/0xf0) [ 6872.442671] [] (__warn) from [] (warn_slowpath_fmt+0x38/0x48) [ 6872.450470] [] (warn_slowpath_fmt) from [] (cfg80211_calculate_bitrate+0x1d8/0x24c [cfg80211]) [ 6872.459339] [] (cfg80211_calculate_bitrate [cfg80211]) from [] (ieee80211s_update_metric+0x78/0x9c [mac80211]) [ 6872.469580] [] (ieee80211s_update_metric [mac80211]) from [] (ieee80211_tx_monitor+0x768/0xb4c [mac80211]) [ 6872.481163] [] (ieee80211_tx_monitor [mac80211]) from [] (ieee80211_tx_status+0x88/0x90 [mac80211]) [ 6872.492320] [] (ieee80211_tx_status [mac80211]) from [] (ath10k_txrx_tx_unref+0x540/0x58c [ath10k_core]) [ 6872.502657] [] (ath10k_txrx_tx_unref [ath10k_core]) from [] (ath10k_htt_t2h_msg_handler+0x610/0x1fb8 [ath10k_core]) [ 6872.513377] [] (ath10k_htt_t2h_msg_handler [ath10k_core]) from [] (ath10k_pci_htt_rx_cb+0x1c8/0x218 [ath10k_pci]) [ 6872.525404] [] (ath10k_pci_htt_rx_cb [ath10k_pci]) from [] (ath10k_ce_per_engine_service+0x80/0xd8 [ath10k_core]) [ 6872.537968] [] (ath10k_ce_per_engine_service [ath10k_core]) from [] (ath10k_ce_per_engine_service_any+0x6c/0x98 [ath10k_core]) [ 6872.549388] [] (ath10k_ce_per_engine_service_any [ath10k_core]) from [] (ath10k_pci_napi_poll+0x64/0x100 [ath10k_pci]) [ 6872.561741] [] (ath10k_pci_napi_poll [ath10k_pci]) from [] (net_rx_action+0x138/0x2fc) [ 6872.574009] [] (net_rx_action) from [] (__do_softirq+0xe0/0x268) [ 6872.583626] [] (__do_softirq) from [] (irq_exit+0x9c/0xfc) [ 6872.591537] [] (irq_exit) from [] (__handle_domain_irq+0x9c/0xac) [ 6872.598579] [] (__handle_domain_irq) from [] (gic_handle_irq+0x5c/0x90) [ 6872.606451] [] (gic_handle_irq) from [] (__irq_svc+0x6c/0x90) [ 6872.614508] Exception stack(0xc0b01f30 to 0xc0b01f78) [ 6872.622180] 1f20: 01a07230 dfb352c4 c0313a40 [ 6872.627274] 1f40: e000 c0b04c6c 0001 c0b04cac c0a3bda8 [ 6872.635411] 1f60: 1f0fb000 c0b01f80 c03082f4 c03082f8 6013 [ 6872.643622] [] (__irq_svc) from [] (arch_cpu_idle+0x34/0x38) [ 6872.650074] [] (arch_cpu_idle) from [] (do_idle+0xf8/0x208) [ 6872.657704] [] (do_idle) from [] (cpu_startup_entry+0x18/0x20) [ 6872.664727] [] (cpu_startup_entry) from [] (start_kernel+0x428/0x438) [ 6872.672406] ---[ end trace 0eec939763ac67c4 ]--- __
Re: [OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace
The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software.--- Begin Message --- Hi Martin, On Mon, Sep 16, 2019 at 12:54 PM Martin Schiller wrote: > > Hi! > > I am searching for a possibility to disable Auto Negotiation of an > PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch. > > The xrx200-net driver does not seem to have support for that. I don't know about xrx200-net, but ... > Accessing the STD_CRTL register on the mdio bus from uboot with the mdio > command works like expected. > > Any suggestions how to do that from linux userspace? ... my (limited) understanding is that this is one of the benefits of DSA: you get one interface per port - with that you can use for example ethtool to disable auto negotiation for one port kernel source reference: [0] Martin [0] https://elixir.bootlin.com/linux/latest/source/net/dsa/slave.c#L1133 --- End Message --- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] brcm47xx: sysupgrade: support Luxul firmware format
From: Dan Haab Allow flashing Luxul devices using vendor firmware format. Signed-off-by: Dan Haab --- .../brcm47xx/base-files/lib/upgrade/platform.sh| 82 ++ 1 file changed, 82 insertions(+) diff --git a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh index 537bac2..3e1b834 100644 --- a/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/brcm47xx/base-files/lib/upgrade/platform.sh @@ -1,11 +1,19 @@ PART_NAME=firmware +LXL_FLAGS_VENDOR_LUXUL=0x0001 + # $(1): file to read magic from # $(2): offset in bytes get_magic_long_at() { dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' } +# $(1): file to read LE long number from +# $(2): offset in bytes +get_le_long_at() { + echo $((0x$(dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/4 "%02x"'))) +} + platform_expected_image() { local machine=$(board_name) @@ -49,6 +57,16 @@ platform_expected_image() { "Linksys WRT310N V2") echo "cybertan 310N"; return;; "Linksys WRT610N V1") echo "cybertan 610N"; return;; "Linksys WRT610N V2") echo "cybertan 610N"; return;; + "Luxul XAP-310 V1") echo "lxl XAP-310"; return;; + "Luxul XAP-1210 V1")echo "lxl XAP-1210"; return;; + "Luxul XAP-1230 V1")echo "lxl XAP-1230"; return;; + "Luxul XAP-1240 V1")echo "lxl XAP-1240"; return;; + "Luxul XAP-1500 V1")echo "lxl XAP-1500"; return;; + "Luxul ABR-4400 V1")echo "lxl ABR-4400"; return;; + "Luxul XBR-4400 V1")echo "lxl XBR-4400"; return;; + "Luxul XVW-P30 V1") echo "lxl XVW-P30"; return;; + "Luxul XWR-600 V1") echo "lxl XWR-600"; return;; + "Luxul XWR-1750 V1")echo "lxl XWR-1750"; return;; esac } @@ -65,6 +83,10 @@ brcm47xx_identify() { echo "chk" return ;; + "4c584c23") + echo "lxl" + return + ;; esac magic=$(get_magic_long_at "$1" 14) @@ -73,6 +95,12 @@ brcm47xx_identify() { return } + magic=$(get_magic_long_at "$1" 60) + [ "$magic" = "4c584c23" ] && { + echo "lxlold" + return + } + echo "unknown" } @@ -122,6 +150,48 @@ platform_check_image() { notify_firmware_test_result "trx_valid" 1 fi ;; + "lxl") + local hdr_len=$(get_le_long_at "$1" 8) + local flags=$(get_le_long_at "$1" 12) + local board=$(dd if="$1" skip=16 bs=1 count=16 2>/dev/null | hexdump -v -e '1/1 "%c"') + local dev_board=$(platform_expected_image) + echo "Found Luxul image for board $board" + + [ -n "$dev_board" -a "lxl $board" != "$dev_board" ] && { + echo "Firmware ($board) doesn't match device ($dev_board)" + error=1 + } + + [ $((flags & LXL_FLAGS_VENDOR_LUXUL)) -gt 0 ] && notify_firmware_no_backup + + if ! otrx check "$1" -o "$hdr_len"; then + echo "No valid TRX firmware in the Luxul image" + notify_firmware_test_result "trx_valid" 0 + error=1 + else + notify_firmware_test_result "trx_valid" 1 + fi + ;; + "lxlold") + local board_id=$(dd if="$1" skip=48 bs=1 count=12 2>/dev/null | hexdump -v -e '1/1 "%c"') + local dev_board_id=$(platform_expected_image) + echo "Found Luxul image with device board_id $board_id" + + [ -n "$dev_board_id" -a "lxl $board_id" != "$dev_board_id" ] && { + echo "Firmware board_id doesn't match device board_id ($dev_board_id)" + error=1 + } + + notify_firmware_no_backup + + if ! otrx check "$1" -o 64; then + echo "No valid TRX firmware in the Luxul image" + notify_firmware_test_result "trx_valid" 0 + error=1 + else + notify_firmware_test_result "trx_valid" 1 + fi + ;; "trx") if ! otrx check "$1"; then echo "Invalid (corrup
[OpenWrt-Devel] Lantiq xrx200: Access to ethernet phy registers (MDIO) from userspace
Hi! I am searching for a possibility to disable Auto Negotiation of an PEF7072 which is attached to MAC1 of the Lantiq xrx200 switch. The xrx200-net driver does not seem to have support for that. Accessing the STD_CRTL register on the mdio bus from uboot with the mdio command works like expected. Any suggestions how to do that from linux userspace? Thanks, Martin ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel