aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/iucv/iucv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index c833481d32e3..aabd2388fcce 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -79,6 +79,14 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv)
79 return 0; 79 return 0;
80} 80}
81 81
82enum iucv_pm_states {
83 IUCV_PM_INITIAL = 0,
84 IUCV_PM_FREEZING = 1,
85 IUCV_PM_THAWING = 2,
86 IUCV_PM_RESTORING = 3,
87};
88static enum iucv_pm_states iucv_pm_state;
89
82static int iucv_pm_prepare(struct device *); 90static int iucv_pm_prepare(struct device *);
83static void iucv_pm_complete(struct device *); 91static void iucv_pm_complete(struct device *);
84static int iucv_pm_freeze(struct device *); 92static int iucv_pm_freeze(struct device *);
@@ -1875,6 +1883,7 @@ static int iucv_pm_freeze(struct device *dev)
1875#ifdef CONFIG_PM_DEBUG 1883#ifdef CONFIG_PM_DEBUG
1876 printk(KERN_WARNING "iucv_pm_freeze\n"); 1884 printk(KERN_WARNING "iucv_pm_freeze\n");
1877#endif 1885#endif
1886 iucv_pm_state = IUCV_PM_FREEZING;
1878 for_each_cpu_mask_nr(cpu, iucv_irq_cpumask) 1887 for_each_cpu_mask_nr(cpu, iucv_irq_cpumask)
1879 smp_call_function_single(cpu, iucv_block_cpu_almost, NULL, 1); 1888 smp_call_function_single(cpu, iucv_block_cpu_almost, NULL, 1);
1880 if (dev->driver && dev->driver->pm && dev->driver->pm->freeze) 1889 if (dev->driver && dev->driver->pm && dev->driver->pm->freeze)
@@ -1899,6 +1908,7 @@ static int iucv_pm_thaw(struct device *dev)
1899#ifdef CONFIG_PM_DEBUG 1908#ifdef CONFIG_PM_DEBUG
1900 printk(KERN_WARNING "iucv_pm_thaw\n"); 1909 printk(KERN_WARNING "iucv_pm_thaw\n");
1901#endif 1910#endif
1911 iucv_pm_state = IUCV_PM_THAWING;
1902 if (!iucv_path_table) { 1912 if (!iucv_path_table) {
1903 rc = iucv_enable(); 1913 rc = iucv_enable();
1904 if (rc) 1914 if (rc)
@@ -1933,6 +1943,10 @@ static int iucv_pm_restore(struct device *dev)
1933#ifdef CONFIG_PM_DEBUG 1943#ifdef CONFIG_PM_DEBUG
1934 printk(KERN_WARNING "iucv_pm_restore %p\n", iucv_path_table); 1944 printk(KERN_WARNING "iucv_pm_restore %p\n", iucv_path_table);
1935#endif 1945#endif
1946 if ((iucv_pm_state != IUCV_PM_RESTORING) && iucv_path_table)
1947 pr_warning("Suspending Linux did not completely close all IUCV "
1948 "connections\n");
1949 iucv_pm_state = IUCV_PM_RESTORING;
1936 if (cpus_empty(iucv_irq_cpumask)) { 1950 if (cpus_empty(iucv_irq_cpumask)) {
1937 rc = iucv_query_maxconn(); 1951 rc = iucv_query_maxconn();
1938 rc = iucv_enable(); 1952 rc = iucv_enable();