mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-22 20:38:29 +00:00
0b6b54eca9
Since the introduction of out-of-band tagging, writing the outbound tag
had been completely broken: First, in place of a port mask containing
the port number, just the port number itself was set in the register
value. Just after that, the full port mask 0x3e (all 5 external ports)
was set unconditionally.
This remained unnoticed because the switch would then use the FDB to
decide where to send unicast packets; broadcast and multicast packets
were however sent to every port.
Fix the port tag computation and only use the full port mask as a
fallback for non-DSA mode, as it was done in the older driver patches
used on Linux 5.15.
Fixes: cd9c721124
("ipq40xx: 6.1: use latest DSA and ethernet patches")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Robert Marko <robimarko@gmail.com>
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 9fa4a57a65e270e4d579cace4de5c438f46c7d12 Mon Sep 17 00:00:00 2001
|
|
From: Robert Marko <robimarko@gmail.com>
|
|
Date: Tue, 15 Aug 2023 14:38:44 +0200
|
|
Subject: [PATCH] net: qualcomm: ipqess: enable threaded NAPI by default
|
|
|
|
Threaded NAPI provides a nice performance boost, so lets enable it by
|
|
default.
|
|
|
|
We do however need to move the __napi_schedule() after HW IRQ has been
|
|
cleared in order to avoid concurency issues.
|
|
|
|
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
|
---
|
|
drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
|
|
+++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
|
|
@@ -530,9 +530,9 @@ static irqreturn_t ipqess_interrupt_tx(i
|
|
struct ipqess_tx_ring *tx_ring = (struct ipqess_tx_ring *)priv;
|
|
|
|
if (likely(napi_schedule_prep(&tx_ring->napi_tx))) {
|
|
- __napi_schedule(&tx_ring->napi_tx);
|
|
ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx),
|
|
0x0);
|
|
+ __napi_schedule(&tx_ring->napi_tx);
|
|
}
|
|
|
|
return IRQ_HANDLED;
|
|
@@ -543,9 +543,9 @@ static irqreturn_t ipqess_interrupt_rx(i
|
|
struct ipqess_rx_ring *rx_ring = (struct ipqess_rx_ring *)priv;
|
|
|
|
if (likely(napi_schedule_prep(&rx_ring->napi_rx))) {
|
|
- __napi_schedule(&rx_ring->napi_rx);
|
|
ipqess_w32(rx_ring->ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx),
|
|
0x0);
|
|
+ __napi_schedule(&rx_ring->napi_rx);
|
|
}
|
|
|
|
return IRQ_HANDLED;
|
|
@@ -1264,6 +1264,8 @@ static int ipqess_axi_probe(struct platf
|
|
if (err)
|
|
goto err_notifier_unregister;
|
|
|
|
+ dev_set_threaded(netdev, true);
|
|
+
|
|
return 0;
|
|
|
|
err_notifier_unregister:
|