Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162916
b: refs/heads/master
c: 4c89d86
h: refs/heads/master
v: v3
  • Loading branch information
Ursula Braun authored and David S. Miller committed Sep 17, 2009
1 parent 8a7cfce commit 90475a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12cbcfd386df56dce8b8ba6ba2c7f85680793716
refs/heads/master: 4c89d86b4df8e4f2cdccb72495e2f4664118ebf1
14 changes: 14 additions & 0 deletions trunk/net/iucv/iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv)
return 0;
}

enum iucv_pm_states {
IUCV_PM_INITIAL = 0,
IUCV_PM_FREEZING = 1,
IUCV_PM_THAWING = 2,
IUCV_PM_RESTORING = 3,
};
static enum iucv_pm_states iucv_pm_state;

static int iucv_pm_prepare(struct device *);
static void iucv_pm_complete(struct device *);
static int iucv_pm_freeze(struct device *);
Expand Down Expand Up @@ -1875,6 +1883,7 @@ static int iucv_pm_freeze(struct device *dev)
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "iucv_pm_freeze\n");
#endif
iucv_pm_state = IUCV_PM_FREEZING;
for_each_cpu_mask_nr(cpu, iucv_irq_cpumask)
smp_call_function_single(cpu, iucv_block_cpu_almost, NULL, 1);
if (dev->driver && dev->driver->pm && dev->driver->pm->freeze)
Expand All @@ -1899,6 +1908,7 @@ static int iucv_pm_thaw(struct device *dev)
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "iucv_pm_thaw\n");
#endif
iucv_pm_state = IUCV_PM_THAWING;
if (!iucv_path_table) {
rc = iucv_enable();
if (rc)
Expand Down Expand Up @@ -1933,6 +1943,10 @@ static int iucv_pm_restore(struct device *dev)
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "iucv_pm_restore %p\n", iucv_path_table);
#endif
if ((iucv_pm_state != IUCV_PM_RESTORING) && iucv_path_table)
pr_warning("Suspending Linux did not completely close all IUCV "
"connections\n");
iucv_pm_state = IUCV_PM_RESTORING;
if (cpus_empty(iucv_irq_cpumask)) {
rc = iucv_query_maxconn();
rc = iucv_enable();
Expand Down

0 comments on commit 90475a3

Please sign in to comment.