Commit 2502d0ef authored by Maxime Ripard's avatar Maxime Ripard Committed by David S. Miller
Browse files

net: mvneta: Fix CPU_MAP registers initialisation

The CPU_MAP register is duplicated for each CPUs at different addresses,
each instance being at a different address.

However, the code so far was using CONFIG_NR_CPUS to initialise the CPU_MAP
registers for each registers, while the SoCs embed at most 4 CPUs.

This is especially an issue with multi_v7_defconfig, where CONFIG_NR_CPUS
is currently set to 16, resulting in writes to registers that are not

Fixes: c5aff182

 ("net: mvneta: driver for Marvell Armada 370/XP network unit")
Signed-off-by: default avatarMaxime Ripard <>
Cc: <> # v3.8+
Signed-off-by: default avatarGregory CLEMENT <>
Signed-off-by: default avatarDavid S. Miller <>
parent 080481f9
......@@ -949,7 +949,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp)
/* Set CPU queue access map - all CPUs have access to all RX
* queues and to all TX queues
for (cpu = 0; cpu < CONFIG_NR_CPUS; cpu++)
mvreg_write(pp, MVNETA_CPU_MAP(cpu),
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment