aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visornic/visornic_main.c
diff options
context:
space:
mode:
authorTim Sell <Timothy.Sell@unisys.com>2017-02-01 17:38:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-02 13:10:49 +0100
commit9c70ee32ffedc48705b08d97212683a5482628cb (patch)
tree6593e7603381eaaf7a80e6e3d17aaeef5857366a /drivers/staging/unisys/visornic/visornic_main.c
parentstaging: unisys: visorbus: Consolidate kobject functions (diff)
downloadlinux-dev-9c70ee32ffedc48705b08d97212683a5482628cb.tar.xz
linux-dev-9c70ee32ffedc48705b08d97212683a5482628cb.zip
staging: unisys: visornic: prevent hang doing 'modprobe -r visornic'
A stray+extraneous 'netif_napi_add()' that we were doing in visornic_probe() was causing havoc when we got into visornic_remove(), called during 'modprobe -r visornic'. The symptom was a processor busy-wait loop on the modprobe process, which '/proc/<pid>/stack' would show looping doing napi things. Presumably the stray line got there as a result of some merging snafoo, and has been deleted to fix the problem. With this patch 'modprobe -r visornic' and a subsequent 'modprobe visornic' both complete successfully, and result in an operational network. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visornic/visornic_main.c')
-rw-r--r--drivers/staging/unisys/visornic/visornic_main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index c44c430b966f..d8f5ecac6c12 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1802,7 +1802,7 @@ static int visornic_probe(struct visor_device *dev)
/* TODO: Setup Interrupt information */
/* Let's start our threads to get responses */
- netif_napi_add(netdev, &devdata->napi, visornic_poll, 64);
+ netif_napi_add(netdev, &devdata->napi, visornic_poll, NAPI_WEIGHT);
setup_timer(&devdata->irq_poll_timer, poll_for_irq,
(unsigned long)devdata);
@@ -1832,9 +1832,6 @@ static int visornic_probe(struct visor_device *dev)
goto cleanup_napi_add;
}
- /* Let's start our threads to get responses */
- netif_napi_add(netdev, &devdata->napi, visornic_poll, NAPI_WEIGHT);
-
/* Note: Interrupts have to be enable before the while
* loop below because the napi routine is responsible for
* setting enab_dis_acked