aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index b2fe5cdbcaee..d9da5c42ccbe 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -13,6 +13,36 @@
13 13
14#define ZFCP_MODEL_PRIV 0x4 14#define ZFCP_MODEL_PRIV 0x4
15 15
16static int zfcp_ccw_suspend(struct ccw_device *cdev)
17
18{
19 struct zfcp_adapter *adapter = dev_get_drvdata(&cdev->dev);
20
21 down(&zfcp_data.config_sema);
22
23 zfcp_erp_adapter_shutdown(adapter, 0, "ccsusp1", NULL);
24 zfcp_erp_wait(adapter);
25
26 up(&zfcp_data.config_sema);
27
28 return 0;
29}
30
31static int zfcp_ccw_activate(struct ccw_device *cdev)
32
33{
34 struct zfcp_adapter *adapter = dev_get_drvdata(&cdev->dev);
35
36 zfcp_erp_modify_adapter_status(adapter, "ccresu1", NULL,
37 ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
38 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
39 "ccresu2", NULL);
40 zfcp_erp_wait(adapter);
41 flush_work(&adapter->scan_work);
42
43 return 0;
44}
45
16static struct ccw_device_id zfcp_ccw_device_id[] = { 46static struct ccw_device_id zfcp_ccw_device_id[] = {
17 { CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, 0x3) }, 47 { CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, 0x3) },
18 { CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, ZFCP_MODEL_PRIV) }, 48 { CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, ZFCP_MODEL_PRIV) },
@@ -227,6 +257,9 @@ static struct ccw_driver zfcp_ccw_driver = {
227 .set_offline = zfcp_ccw_set_offline, 257 .set_offline = zfcp_ccw_set_offline,
228 .notify = zfcp_ccw_notify, 258 .notify = zfcp_ccw_notify,
229 .shutdown = zfcp_ccw_shutdown, 259 .shutdown = zfcp_ccw_shutdown,
260 .freeze = zfcp_ccw_suspend,
261 .thaw = zfcp_ccw_activate,
262 .restore = zfcp_ccw_activate,
230}; 263};
231 264
232/** 265/**