summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2013-10-06 23:35:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 22:03:18 -0700
commitd2ca24c7c32bf35d150e58e5ca6cd24fced1df0f (patch)
tree001cbead13109a5e4a4dc1a6179ee5578b585b1c /drivers/staging/octeon
parentcd39f7374d343e6af22d7c929ec87c7406ebd00c (diff)
downloadlinux-d2ca24c7c32bf35d150e58e5ca6cd24fced1df0f.tar.gz
linux-d2ca24c7c32bf35d150e58e5ca6cd24fced1df0f.tar.bz2
linux-d2ca24c7c32bf35d150e58e5ca6cd24fced1df0f.zip
staging: octeon-ethernet: allow to use only 1 CPU for packet processing
Module parameter max_rx_cpus has off-by-one error. Fix that. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon')
-rw-r--r--drivers/staging/octeon/ethernet-rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c
index 0d539eb2be5b..0315f60497b7 100644
--- a/drivers/staging/octeon/ethernet-rx.c
+++ b/drivers/staging/octeon/ethernet-rx.c
@@ -513,7 +513,7 @@ void cvm_oct_rx_initialize(void)
if (NULL == dev_for_napi)
panic("No net_devices were allocated.");
- if (max_rx_cpus > 1 && max_rx_cpus < num_online_cpus())
+ if (max_rx_cpus >= 1 && max_rx_cpus < num_online_cpus())
atomic_set(&core_state.available_cores, max_rx_cpus);
else
atomic_set(&core_state.available_cores, num_online_cpus());