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

staging: octeon: prevent poll during rx init

Prevent poll before the RX init has been completed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Aaro Koskinen and committed by
Greg Kroah-Hartman
d48f10fc ce060d8a

+6
+6
drivers/staging/octeon/ethernet-rx.c
··· 43 43 44 44 #include <asm/octeon/cvmx-gmxx-defs.h> 45 45 46 + static atomic_t oct_rx_ready = ATOMIC_INIT(0); 47 + 46 48 static struct oct_rx_group { 47 49 int irq; 48 50 int group; ··· 446 444 { 447 445 int i; 448 446 447 + if (!atomic_read(&oct_rx_ready)) 448 + return; 449 + 449 450 for (i = 0; i < ARRAY_SIZE(oct_rx_group); i++) { 450 451 451 452 if (!(pow_receive_groups & BIT(i))) ··· 529 524 */ 530 525 napi_schedule(&oct_rx_group[i].napi); 531 526 } 527 + atomic_inc(&oct_rx_ready); 532 528 } 533 529 534 530 void cvm_oct_rx_shutdown(void)