[net] net: mvneta: fix txq_map in case of txq_number==1

Message ID 20230705053712.3914-1-klaus.kudielka@gmail.com
State New
Headers
Series [net] net: mvneta: fix txq_map in case of txq_number==1 |

Commit Message

Klaus Kudielka July 5, 2023, 5:37 a.m. UTC
  If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
initialized. Fix this.

Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
---
 drivers/net/ethernet/marvell/mvneta.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Michal Kubiak July 5, 2023, 6:38 p.m. UTC | #1
On Wed, Jul 05, 2023 at 07:37:12AM +0200, Klaus Kudielka wrote:
> If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
> MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
> initialized. Fix this.
> 
> Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
> Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>

LGTM

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
  
patchwork-bot+netdevbpf@kernel.org July 6, 2023, 8:50 a.m. UTC | #2
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Wed,  5 Jul 2023 07:37:12 +0200 you wrote:
> If we boot with mvneta.txq_number=1, the txq_map is set incorrectly:
> MVNETA_CPU_TXQ_ACCESS(1) refers to TX queue 1, but only TX queue 0 is
> initialized. Fix this.
> 
> Fixes: 50bf8cb6fc9c ("net: mvneta: Configure XPS support")
> Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net] net: mvneta: fix txq_map in case of txq_number==1
    https://git.kernel.org/netdev/net/c/21327f81db63

You are awesome, thank you!
  

Patch

diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index 2cad76d0a50e..4401fad31fb9 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -1505,7 +1505,7 @@  static void mvneta_defaults_set(struct mvneta_port *pp)
 			 */
 			if (txq_number == 1)
 				txq_map = (cpu == pp->rxq_def) ?
-					MVNETA_CPU_TXQ_ACCESS(1) : 0;
+					MVNETA_CPU_TXQ_ACCESS(0) : 0;
 
 		} else {
 			txq_map = MVNETA_CPU_TXQ_ACCESS_ALL_MASK;
@@ -4295,7 +4295,7 @@  static void mvneta_percpu_elect(struct mvneta_port *pp)
 		 */
 		if (txq_number == 1)
 			txq_map = (cpu == elected_cpu) ?
-				MVNETA_CPU_TXQ_ACCESS(1) : 0;
+				MVNETA_CPU_TXQ_ACCESS(0) : 0;
 		else
 			txq_map = mvreg_read(pp, MVNETA_CPU_MAP(cpu)) &
 				MVNETA_CPU_TXQ_ACCESS_ALL_MASK;