git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
pci
/
hotplug
/
cpci_hotplug_core.c
diff --git
a/drivers/pci/hotplug/cpci_hotplug_core.c
b/drivers/pci/hotplug/cpci_hotplug_core.c
index
5b33e96
..
ed24360
100644
(file)
--- a/
drivers/pci/hotplug/cpci_hotplug_core.c
+++ b/
drivers/pci/hotplug/cpci_hotplug_core.c
@@
-33,6
+33,7
@@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h>
+#include <linux/delay.h>
#include "pci_hotplug.h"
#include "cpci_hotplug.h"
#include "pci_hotplug.h"
#include "cpci_hotplug.h"
@@
-513,11
+514,10
@@
event_thread(void *data)
break;
while(controller->ops->query_enum()) {
rc = check_slots();
break;
while(controller->ops->query_enum()) {
rc = check_slots();
- if
(rc > 0) {
+ if
(rc > 0)
/* Give userspace a chance to handle extraction */
/* Give userspace a chance to handle extraction */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 2);
- } else if(rc < 0) {
+ msleep(500);
+ else if (rc < 0) {
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
@@
-568,11
+568,10
@@
poll_thread(void *data)
while(controller->ops->query_enum()) {
rc = check_slots();
while(controller->ops->query_enum()) {
rc = check_slots();
- if(rc > 0)
{
+ if(rc > 0)
/* Give userspace a chance to handle extraction */
/* Give userspace a chance to handle extraction */
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 2);
- } else if(rc < 0) {
+ msleep(500);
+ else if (rc < 0) {
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
dbg("%s - error checking slots", __FUNCTION__);
thread_finished = 1;
break;
@@
-595,8
+594,7
@@
poll_thread(void *data)
}
}
}
}
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ / 10);
+ msleep(100);
}
dbg("poll thread signals exit");
up(&thread_exit);
}
dbg("poll thread signals exit");
up(&thread_exit);
@@
-614,9
+612,9
@@
cpci_start_thread(void)
thread_finished = 0;
if(controller->irq) {
thread_finished = 0;
if(controller->irq) {
- pid = kernel_thread(event_thread,
0
, 0);
+ pid = kernel_thread(event_thread,
NULL
, 0);
} else {
} else {
- pid = kernel_thread(poll_thread,
0
, 0);
+ pid = kernel_thread(poll_thread,
NULL
, 0);
}
if(pid < 0) {
err("Can't start up our thread");
}
if(pid < 0) {
err("Can't start up our thread");