ipq40XX: low performance when sending traffic?

I used iperf/iperf3 to measure the speed between ath79 and ipq40xx (fritzbox 4040 and zyxel).
Receiving speed is about 220 MBit/s and sending speed only 3 MBit/s.

1 Like

Went back to 4.19 on master and it works perfectly.

Hm, there have really been 3 changes that could affect the performance.
Should be easy to bisect through them:

1 Like

I don't have the latest commit. Could that fix my issue with wan port tagging? Or will the wan interface completely break?

I just did eth1.42.

Hm, looks like its related to your issue

When I look at dmesg

[   27.754706] br-dhcp: port 2(eth1) entered blocking state
[   27.760426] br-dhcp: port 2(eth1) entered forwarding state
[   27.766635] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.42: link becomes ready
[   27.771435] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.102: link becomes ready
[   27.777968] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.104: link becomes ready
[   27.784470] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.130: link becomes ready
[   27.790995] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.160: link becomes ready
[   27.797811] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.170: link becomes ready
[   27.804575] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.200: link becomes ready
[   27.810783] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.280: link becomes ready
[   35.072277] ------------[ cut here ]------------
[   35.072353] WARNING: CPU: 0 PID: 0 at include/net/dst.h:228 nf_rtcache_forward4+0x164/0x1a0 [nf_conntrack_rtcache]
[   35.076008] Modules linked in: pppoe ppp_async iptable_nat ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache 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 ledtrig_heartbeat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 l2tp_ip6 l2tp_ip l2tp_eth l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel ipip tunnel4 ip_tunnel leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug
[   35.132337] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.63 #0
[   35.154532] Hardware name: Generic DT based system
[   35.160350] [<c030e524>] (unwind_backtrace) from [<c030afa4>] (show_stack+0x10/0x14)
[   35.165178] [<c030afa4>] (show_stack) from [<c08354d8>] (dump_stack+0x94/0xa8)
[   35.173055] [<c08354d8>] (dump_stack) from [<c03212d4>] (__warn+0xbc/0xd8)
[   35.179916] [<c03212d4>] (__warn) from [<c0321340>] (warn_slowpath_fmt+0x50/0x94)
[   35.186804] [<c0321340>] (warn_slowpath_fmt) from [<bf289230>] (nf_rtcache_forward4+0x164/0x1a0 [nf_conntrack_rtcache])
[   35.194395] [<bf289230>] (nf_rtcache_forward4 [nf_conntrack_rtcache]) from [<c0761a8c>] (nf_hook_slow+0x38/0xb4)
[   35.205130] [<c0761a8c>] (nf_hook_slow) from [<c076af30>] (ip_forward+0x318/0x394)
[   35.215537] [<c076af30>] (ip_forward) from [<c07693dc>] (ip_sublist_rcv_finish+0x44/0x5c)
[   35.222915] [<c07693dc>] (ip_sublist_rcv_finish) from [<c0769840>] (ip_sublist_rcv+0x190/0x1d0)
[   35.230970] [<c0769840>] (ip_sublist_rcv) from [<c0769f0c>] (ip_list_rcv+0xd4/0xe4)
[   35.239479] [<c0769f0c>] (ip_list_rcv) from [<c071da64>] (__netif_receive_skb_list_core+0x190/0x1f0)
[   35.247125] [<c071da64>] (__netif_receive_skb_list_core) from [<c071dc78>] (netif_receive_skb_list_internal+0x1b4/0x290)
[   35.256717] [<c071dc78>] (netif_receive_skb_list_internal) from [<c071dd78>] (gro_normal_list.part.42+0x14/0x28)
[   35.267559] [<c071dd78>] (gro_normal_list.part.42) from [<c071e95c>] (napi_complete_done+0x13c/0x1b0)
[   35.277502] [<c071e95c>] (napi_complete_done) from [<c0688198>] (edma_poll+0x398/0xef4)
[   35.286613] [<c0688198>] (edma_poll) from [<c071e9f8>] (__napi_poll+0x28/0x104)
[   35.294443] [<c071e9f8>] (__napi_poll) from [<c071ec60>] (net_rx_action+0xf8/0x284)
[   35.301909] [<c071ec60>] (net_rx_action) from [<c0302288>] (__do_softirq+0x120/0x2b0)
[   35.309534] [<c0302288>] (__do_softirq) from [<c0325260>] (irq_exit+0xb0/0xd4)
[   35.317510] [<c0325260>] (irq_exit) from [<c036aa20>] (__handle_domain_irq+0x60/0xb4)
[   35.324622] [<c036aa20>] (__handle_domain_irq) from [<c05a0d30>] (gic_handle_irq+0x4c/0x90)
[   35.332519] [<c05a0d30>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[   35.340594] Exception stack(0xc0b01f28 to 0xc0b01f70)
[   35.348142] 1f20:                   00000000 0004b0a0 cfd78234 c0313c00 ffffe000 c0b04e68
[   35.353186] 1f40: c0b04ea8 00000001 00000000 c0a3ede8 c0b0de08 00000000 0f338000 c0b01f78
[   35.361331] 1f60: c03083e8 c03083ec 60000013 ffffffff
[   35.369478] [<c0301a8c>] (__irq_svc) from [<c03083ec>] (arch_cpu_idle+0x38/0x3c)
[   35.374513] [<c03083ec>] (arch_cpu_idle) from [<c0349a68>] (do_idle+0x1e4/0x21c)
[   35.381974] [<c0349a68>] (do_idle) from [<c0349d30>] (cpu_startup_entry+0x18/0x1c)
[   35.389356] [<c0349d30>] (cpu_startup_entry) from [<c0a00df4>] (start_kernel+0x488/0x498)
[   35.396752] ---[ end trace c1076ed4b870690c ]---
[   35.407950] ------------[ cut here ]------------
[   35.409669] WARNING: CPU: 0 PID: 9 at net/core/dst.c:175 dst_release+0xb8/0xbc
[   35.414361] dst_release underflow
[   35.414370] Modules linked in: pppoe ppp_async iptable_nat ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache 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 ledtrig_heartbeat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 l2tp_ip6 l2tp_ip l2tp_eth l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel ipip tunnel4 ip_tunnel leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug
[   35.470735] CPU: 0 PID: 9 Comm: ksoftirqd/0 Tainted: G        W         5.4.63 #0
[   35.492899] Hardware name: Generic DT based system
[   35.500295] [<c030e524>] (unwind_backtrace) from [<c030afa4>] (show_stack+0x10/0x14)
[   35.504976] [<c030afa4>] (show_stack) from [<c08354d8>] (dump_stack+0x94/0xa8)
[   35.512872] [<c08354d8>] (dump_stack) from [<c03212d4>] (__warn+0xbc/0xd8)
[   35.519902] [<c03212d4>] (__warn) from [<c0321374>] (warn_slowpath_fmt+0x84/0x94)
[   35.526763] [<c0321374>] (warn_slowpath_fmt) from [<c0728db4>] (dst_release+0xb8/0xbc)
[   35.534326] [<c0728db4>] (dst_release) from [<bf289260>] (nf_rtcache_forward4+0x194/0x1a0 [nf_conntrack_rtcache])
[   35.542140] [<bf289260>] (nf_rtcache_forward4 [nf_conntrack_rtcache]) from [<bf28939c>] (nf_rtcache_in4+0xc0/0xd4 [nf_conntrack_rtcache])
[   35.552470] [<bf28939c>] (nf_rtcache_in4 [nf_conntrack_rtcache]) from [<c0761a8c>] (nf_hook_slow+0x38/0xb4)
[   35.564787] [<c0761a8c>] (nf_hook_slow) from [<c0769724>] (ip_sublist_rcv+0x74/0x1d0)
[   35.574333] [<c0769724>] (ip_sublist_rcv) from [<c0769f0c>] (ip_list_rcv+0xd4/0xe4)
[   35.582320] [<c0769f0c>] (ip_list_rcv) from [<c071da64>] (__netif_receive_skb_list_core+0x190/0x1f0)
[   35.589788] [<c071da64>] (__netif_receive_skb_list_core) from [<c071dc78>] (netif_receive_skb_list_internal+0x1b4/0x290)
[   35.599163] [<c071dc78>] (netif_receive_skb_list_internal) from [<c071dd78>] (gro_normal_list.part.42+0x14/0x28)
[   35.610013] [<c071dd78>] (gro_normal_list.part.42) from [<c071e4dc>] (napi_gro_receive+0x58/0x98)
[   35.620168] [<c071e4dc>] (napi_gro_receive) from [<c06884b4>] (edma_poll+0x6b4/0xef4)
[   35.628935] [<c06884b4>] (edma_poll) from [<c071e9f8>] (__napi_poll+0x28/0x104)
[   35.636745] [<c071e9f8>] (__napi_poll) from [<c071ec60>] (net_rx_action+0xf8/0x284)
[   35.643864] [<c071ec60>] (net_rx_action) from [<c0302288>] (__do_softirq+0x120/0x2b0)
[   35.651503] [<c0302288>] (__do_softirq) from [<c0324ff4>] (run_ksoftirqd+0x2c/0x38)
[   35.659489] [<c0324ff4>] (run_ksoftirqd) from [<c0340f3c>] (smpboot_thread_fn+0xec/0x1a4)
[   35.666957] [<c0340f3c>] (smpboot_thread_fn) from [<c033df68>] (kthread+0x14c/0x150)
[   35.675288] [<c033df68>] (kthread) from [<c03010e8>] (ret_from_fork+0x14/0x2c)
[   35.683089] Exception stack(0xcf857fb0 to 0xcf857ff8)
[   35.690122] 7fa0:                                     00000000 00000000 00000000 00000000
[   35.695249] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   35.703407] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[   35.711596] ---[ end trace c1076ed4b870690d ]---
[   35.718007] dst_release: dst:e243131d refcnt:-1
[97830.373629] device eth1.130 entered promiscuous mode
[97838.459202] device eth1.130 left promiscuous mode
[97843.343974] device eth1.130 entered promiscuous mode
[97868.315331] device eth1.130 left promiscuous mode
[97869.542699] device eth1.130 entered promiscuous mode
[97978.304075] device eth1.130 left promiscuous mode
[128943.864953] ------------[ cut here ]------------
[128943.865095] WARNING: CPU: 0 PID: 0 at include/net/dst.h:228 nf_rtcache_forward4+0x164/0x1a0 [nf_conntrack_rtcache]
[128943.868807] Modules linked in: pppoe ppp_async iptable_nat ath10k_pci ath10k_core ath xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache 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 ledtrig_heartbeat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 l2tp_ip6 l2tp_ip l2tp_eth l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel ipip tunnel4 ip_tunnel leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom gpio_button_hotplug
[128943.925631] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W         5.4.63 #0
[128943.947333] Hardware name: Generic DT based system
[128943.954843] [<c030e524>] (unwind_backtrace) from [<c030afa4>] (show_stack+0x10/0x14)
[128943.959431] [<c030afa4>] (show_stack) from [<c08354d8>] (dump_stack+0x94/0xa8)
[128943.967410] [<c08354d8>] (dump_stack) from [<c03212d4>] (__warn+0xbc/0xd8)
[128943.974681] [<c03212d4>] (__warn) from [<c0321340>] (warn_slowpath_fmt+0x50/0x94)
[128943.981728] [<c0321340>] (warn_slowpath_fmt) from [<bf289230>] (nf_rtcache_forward4+0x164/0x1a0 [nf_conntrack_rtcache])
[128943.989389] [<bf289230>] (nf_rtcache_forward4 [nf_conntrack_rtcache]) from [<c0761a8c>] (nf_hook_slow+0x38/0xb4)
[128944.000149] [<c0761a8c>] (nf_hook_slow) from [<c076af30>] (ip_forward+0x318/0x394)
[128944.010298] [<c076af30>] (ip_forward) from [<c07693dc>] (ip_sublist_rcv_finish+0x44/0x5c)
[128944.017765] [<c07693dc>] (ip_sublist_rcv_finish) from [<c0769840>] (ip_sublist_rcv+0x190/0x1d0)
[128944.026299] [<c0769840>] (ip_sublist_rcv) from [<c0769f0c>] (ip_list_rcv+0xd4/0xe4)
[128944.035245] [<c0769f0c>] (ip_list_rcv) from [<c071da64>] (__netif_receive_skb_list_core+0x190/0x1f0)
[128944.042986] [<c071da64>] (__netif_receive_skb_list_core) from [<c071dc78>] (netif_receive_skb_list_internal+0x1b4/0x290)
[128944.051848] [<c071dc78>] (netif_receive_skb_list_internal) from [<c071dd78>] (gro_normal_list.part.42+0x14/0x28)
[128944.062782] [<c071dd78>] (gro_normal_list.part.42) from [<c071e95c>] (napi_complete_done+0x13c/0x1b0)
[128944.073025] [<c071e95c>] (napi_complete_done) from [<c0688198>] (edma_poll+0x398/0xef4)
[128944.082453] [<c0688198>] (edma_poll) from [<c071e9f8>] (__napi_poll+0x28/0x104)
[128944.090706] [<c071e9f8>] (__napi_poll) from [<c071ec60>] (net_rx_action+0xf8/0x284)
[128944.098083] [<c071ec60>] (net_rx_action) from [<c0302288>] (__do_softirq+0x120/0x2b0)
[128944.105612] [<c0302288>] (__do_softirq) from [<c0325260>] (irq_exit+0xb0/0xd4)
[128944.113335] [<c0325260>] (irq_exit) from [<c036aa20>] (__handle_domain_irq+0x60/0xb4)
[128944.120538] [<c036aa20>] (__handle_domain_irq) from [<c05a0d30>] (gic_handle_irq+0x4c/0x90)
[128944.128694] [<c05a0d30>] (gic_handle_irq) from [<c0301a8c>] (__irq_svc+0x6c/0x90)
[128944.137197] Exception stack(0xc0b01f28 to 0xc0b01f70)
[128944.144633] 1f20:                   00000000 185314d8 cfd78234 c0313c00 ffffe000 c0b04e68
[128944.149797] 1f40: c0b04ea8 00000001 00000000 c0a3ede8 c0b0de08 00000000 0f338000 c0b01f78
[128944.157982] 1f60: c03083e8 c03083ec 60000013 ffffffff
[128944.166293] [<c0301a8c>] (__irq_svc) from [<c03083ec>] (arch_cpu_idle+0x38/0x3c)
[128944.171425] [<c03083ec>] (arch_cpu_idle) from [<c0349a68>] (do_idle+0x1e4/0x21c)
[128944.178962] [<c0349a68>] (do_idle) from [<c0349d30>] (cpu_startup_entry+0x18/0x1c)
[128944.186431] [<c0349d30>] (cpu_startup_entry) from [<c0a00df4>] (start_kernel+0x488/0x498)
[128944.194435] ---[ end trace c1076ed4b870690e ]---
[128944.215427] dst_release: dst:61b75e9f refcnt:-1

"Reverting" https://github.com/openwrt/openwrt/commit/9da2b567605b0964d921b9ca4f0c9886db4f636d#diff-043b5b3b3004fa40ab2e96f33c6be34d6dd190b4b281ad40e320a2cf40504b74 fixes everything. o.O

You can not easily just doing a "revert". Here is a patch:

diff --git a/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
index 50335b0d14..96a82b3116 100644
--- a/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
+++ b/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
@@ -968,6 +968,7 @@ static int edma_axi_probe(struct platform_device *pdev)
 		edma_netdev[i]->netdev_ops = &edma_axi_netdev_ops;
 		edma_netdev[i]->max_mtu = 9000;
 		edma_netdev[i]->features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM
+				      | NETIF_F_HW_VLAN_CTAG_TX
 				      | NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_SG |
 				      NETIF_F_TSO | NETIF_F_GRO;
 		edma_netdev[i]->hw_features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM |
@@ -979,10 +980,10 @@ static int edma_axi_probe(struct platform_device *pdev)
 					     NETIF_F_TSO | NETIF_F_GRO;
 
 #ifdef CONFIG_RFS_ACCEL
-		edma_netdev[i]->features |=  NETIF_F_NTUPLE;
-		edma_netdev[i]->hw_features |=  NETIF_F_NTUPLE;
-		edma_netdev[i]->vlan_features |= NETIF_F_NTUPLE;
-		edma_netdev[i]->wanted_features |= NETIF_F_NTUPLE;
+		edma_netdev[i]->features |=  NETIF_F_RXHASH | NETIF_F_NTUPLE;
+		edma_netdev[i]->hw_features |=  NETIF_F_RXHASH | NETIF_F_NTUPLE;
+		edma_netdev[i]->vlan_features |= NETIF_F_RXHASH | NETIF_F_NTUPLE;
+		edma_netdev[i]->wanted_features |= NETIF_F_RXHASH | NETIF_F_NTUPLE;
 #endif
 		edma_set_ethtool_ops(edma_netdev[i]);
 
diff --git a/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.c b/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.c
index db21547a03..fab8323d2c 100644
--- a/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.c
+++ b/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.c
@@ -1200,11 +1200,7 @@ ar40xx_init_port(struct ar40xx_priv *priv, int port)
 	ar40xx_rmw(priv, AR40XX_REG_PORT_STATUS(port),
 			AR40XX_PORT_AUTO_LINK_EN, 0);
 
-	/* CPU port is setting headers to limit output ports */
-	if (port == 0)
-		ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0x8);
-	else
-		ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0);
+	ar40xx_write(priv, AR40XX_REG_PORT_HEADER(port), 0);
 
 	ar40xx_write(priv, AR40XX_REG_PORT_VLAN0(port), 0);
 
@@ -1247,10 +1243,6 @@ ar40xx_init_globals(struct ar40xx_priv *priv)
 	t = (AR40XX_PORT0_FC_THRESH_ON_DFLT << 16) |
 	      AR40XX_PORT0_FC_THRESH_OFF_DFLT;
 	ar40xx_write(priv, AR40XX_REG_PORT_FLOWCTRL_THRESH(0), t);
-
-	/* set service tag to 802.1q */
-	t = ETH_P_8021Q | AR40XX_ESS_SERVICE_TAG_STAG;
-	ar40xx_write(priv, AR40XX_ESS_SERVICE_TAG, t);
 }
 
 static void
@@ -1576,11 +1568,7 @@ ar40xx_setup_port(struct ar40xx_priv *priv, int port, u32 members)
 	u32 pvid = priv->vlan_id[priv->pvid[port]];
 
 	if (priv->vlan) {
-		if (priv->vlan_tagged & BIT(port))
-			egress = AR40XX_PORT_VLAN1_OUT_MODE_TAG;
-		else
-			egress = AR40XX_PORT_VLAN1_OUT_MODE_UNMOD;
-
+		egress = AR40XX_PORT_VLAN1_OUT_MODE_UNMOD;
 		ingress = AR40XX_IN_SECURE;
 	} else {
 		egress = AR40XX_PORT_VLAN1_OUT_MODE_UNTOUCH;
@@ -1591,17 +1579,8 @@ ar40xx_setup_port(struct ar40xx_priv *priv, int port, u32 members)
 	t |= pvid << AR40XX_PORT_VLAN0_DEF_CVID_S;
 	ar40xx_write(priv, AR40XX_REG_PORT_VLAN0(port), t);
 
-	t = egress << AR40XX_PORT_VLAN1_OUT_MODE_S;
-
-	/* set CPU port to core port */
-	if (port == 0)
-		t |= AR40XX_PORT_VLAN1_CORE_PORT;
-
-	if (priv->vlan_tagged & BIT(port))
-		t |= AR40XX_PORT_VLAN1_PORT_VLAN_PROP;
-	else
-		t |= AR40XX_PORT_VLAN1_PORT_TLS_MODE;
-
+	t = AR40XX_PORT_VLAN1_PORT_VLAN_PROP;
+	t |= egress << AR40XX_PORT_VLAN1_OUT_MODE_S;
 	ar40xx_write(priv, AR40XX_REG_PORT_VLAN1(port), t);
 
 	t = members;
@@ -2042,12 +2021,6 @@ static int ar40xx_probe(struct platform_device *pdev)
 	/* register switch */
 	swdev = &priv->dev;
 
-	if (priv->mii_bus == NULL) {
-		dev_err(&pdev->dev, "Probe failed - Missing PHYs!\n");
-		ret = -ENODEV;
-		goto err_missing_phy;
-	}
-
 	swdev->alias = dev_name(&priv->mii_bus->dev);
 
 	swdev->cpu_port = AR40XX_PORT_CPU;
@@ -2079,7 +2052,6 @@ err_unregister_switch:
 	unregister_switch(&priv->dev);
 err_unregister_phy:
 	phy_driver_unregister(&ar40xx_phy_driver);
-err_missing_phy:
 	platform_set_drvdata(pdev, NULL);
 	return ret;
 }
diff --git a/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.h b/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.h
index 7ba40ccf75..722bf6ae4b 100644
--- a/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.h
+++ b/target/linux/ipq40xx/files-5.4/drivers/net/phy/ar40xx.h
@@ -151,9 +151,6 @@ struct ar40xx_mib_desc {
 #define   AR40XX_MIB_FUNC_NO_OP		0x0
 #define   AR40XX_MIB_FUNC_FLUSH		0x1
 
-#define AR40XX_ESS_SERVICE_TAG		0x48
-#define AR40XX_ESS_SERVICE_TAG_STAG	BIT(17)
-
 #define AR40XX_REG_PORT_STATUS(_i)		(0x07c + (_i) * 4)
 #define   AR40XX_PORT_SPEED			BITS(0, 2)
 #define   AR40XX_PORT_STATUS_SPEED_S	0
@@ -182,8 +179,6 @@ struct ar40xx_mib_desc {
 #define   AR40XX_PORT_VLAN0_DEF_CVID_S		16
 
 #define AR40XX_REG_PORT_VLAN1(_i)		(0x424 + (_i) * 0x8)
-#define   AR40XX_PORT_VLAN1_CORE_PORT		BIT(9)
-#define   AR40XX_PORT_VLAN1_PORT_TLS_MODE	BIT(7)
 #define   AR40XX_PORT_VLAN1_PORT_VLAN_PROP	BIT(6)
 #define   AR40XX_PORT_VLAN1_OUT_MODE		BITS(12, 2)
 #define   AR40XX_PORT_VLAN1_OUT_MODE_S		12

see also this related bug:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.