Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: mvneta: Add missing hotplug notifier transition

The mvneta_percpu_notifier() hotplug callback lacks handling of the
CPU_DOWN_FAILED case. That means, if CPU_DOWN_PREPARE failes, the
driver is not well configured on the CPU.

Add handling for CPU_DOWN_FAILED[_FROZEN] hotplug notifier transition
to setup the driver.

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: netdev@vger.kernel.org
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Anna-Maria Gleixner and committed by
David S. Miller
0df83e7a 7c82a7b9

+2
+2
drivers/net/ethernet/marvell/mvneta.c
··· 3328 3328 switch (action) { 3329 3329 case CPU_ONLINE: 3330 3330 case CPU_ONLINE_FROZEN: 3331 + case CPU_DOWN_FAILED: 3332 + case CPU_DOWN_FAILED_FROZEN: 3331 3333 spin_lock(&pp->lock); 3332 3334 /* Configuring the driver for a new CPU while the 3333 3335 * driver is stopping is racy, so just avoid it.