aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_core.c11
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c4
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c1
4 files changed, 3 insertions, 14 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 838f571027b7..9a33fdde2d16 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -45,7 +45,6 @@ extern int pciehp_poll_time;
45extern int pciehp_debug; 45extern int pciehp_debug;
46extern int pciehp_force; 46extern int pciehp_force;
47extern struct workqueue_struct *pciehp_wq; 47extern struct workqueue_struct *pciehp_wq;
48extern struct workqueue_struct *pciehp_ordered_wq;
49 48
50#define dbg(format, arg...) \ 49#define dbg(format, arg...) \
51do { \ 50do { \
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 7ac8358df8fd..b8c99d35ac97 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -43,7 +43,6 @@ int pciehp_poll_mode;
43int pciehp_poll_time; 43int pciehp_poll_time;
44int pciehp_force; 44int pciehp_force;
45struct workqueue_struct *pciehp_wq; 45struct workqueue_struct *pciehp_wq;
46struct workqueue_struct *pciehp_ordered_wq;
47 46
48#define DRIVER_VERSION "0.4" 47#define DRIVER_VERSION "0.4"
49#define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>" 48#define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>, Dely Sy <dely.l.sy@intel.com>"
@@ -345,18 +344,11 @@ static int __init pcied_init(void)
345 if (!pciehp_wq) 344 if (!pciehp_wq)
346 return -ENOMEM; 345 return -ENOMEM;
347 346
348 pciehp_ordered_wq = alloc_ordered_workqueue("pciehp_ordered", 0);
349 if (!pciehp_ordered_wq) {
350 destroy_workqueue(pciehp_wq);
351 return -ENOMEM;
352 }
353
354 pciehp_firmware_init(); 347 pciehp_firmware_init();
355 retval = pcie_port_service_register(&hpdriver_portdrv); 348 retval = pcie_port_service_register(&hpdriver_portdrv);
356 dbg("pcie_port_service_register = %d\n", retval); 349 dbg("pcie_port_service_register = %d\n", retval);
357 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 350 info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
358 if (retval) { 351 if (retval) {
359 destroy_workqueue(pciehp_ordered_wq);
360 destroy_workqueue(pciehp_wq); 352 destroy_workqueue(pciehp_wq);
361 dbg("Failure to register service\n"); 353 dbg("Failure to register service\n");
362 } 354 }
@@ -366,9 +358,8 @@ static int __init pcied_init(void)
366static void __exit pcied_cleanup(void) 358static void __exit pcied_cleanup(void)
367{ 359{
368 dbg("unload_pciehpd()\n"); 360 dbg("unload_pciehpd()\n");
369 destroy_workqueue(pciehp_ordered_wq);
370 destroy_workqueue(pciehp_wq);
371 pcie_port_service_unregister(&hpdriver_portdrv); 361 pcie_port_service_unregister(&hpdriver_portdrv);
362 destroy_workqueue(pciehp_wq);
372 info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n"); 363 info(DRIVER_DESC " version: " DRIVER_VERSION " unloaded\n");
373} 364}
374 365
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 085dbb5fc168..27f44295a657 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -344,7 +344,7 @@ void pciehp_queue_pushbutton_work(struct work_struct *work)
344 kfree(info); 344 kfree(info);
345 goto out; 345 goto out;
346 } 346 }
347 queue_work(pciehp_ordered_wq, &info->work); 347 queue_work(pciehp_wq, &info->work);
348 out: 348 out:
349 mutex_unlock(&p_slot->lock); 349 mutex_unlock(&p_slot->lock);
350} 350}
@@ -439,7 +439,7 @@ static void handle_surprise_event(struct slot *p_slot)
439 else 439 else
440 p_slot->state = POWERON_STATE; 440 p_slot->state = POWERON_STATE;
441 441
442 queue_work(pciehp_ordered_wq, &info->work); 442 queue_work(pciehp_wq, &info->work);
443} 443}
444 444
445static void interrupt_event_handler(struct work_struct *work) 445static void interrupt_event_handler(struct work_struct *work)
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 7b1414810ae3..bcdbb1643621 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -806,7 +806,6 @@ static void pcie_cleanup_slot(struct controller *ctrl)
806 struct slot *slot = ctrl->slot; 806 struct slot *slot = ctrl->slot;
807 cancel_delayed_work(&slot->work); 807 cancel_delayed_work(&slot->work);
808 flush_workqueue(pciehp_wq); 808 flush_workqueue(pciehp_wq);
809 flush_workqueue(pciehp_ordered_wq);
810 kfree(slot); 809 kfree(slot);
811} 810}
812 811