Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151110
b: refs/heads/master
c: daa70fa
h: refs/heads/master
v: v3
  • Loading branch information
Martin Petermann authored and Martin Schwidefsky committed Jun 16, 2009
1 parent bfe8078 commit 08766c7
Show file tree
Hide file tree
Showing 2 changed files with 34 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: 88efc2c503e82072a19b531d54e02f22de14a132
refs/heads/master: daa70fa960fb5625d762988cca7e4733573d90a3
33 changes: 33 additions & 0 deletions trunk/drivers/s390/scsi/zfcp_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,36 @@

#define ZFCP_MODEL_PRIV 0x4

static int zfcp_ccw_suspend(struct ccw_device *cdev)

{
struct zfcp_adapter *adapter = dev_get_drvdata(&cdev->dev);

down(&zfcp_data.config_sema);

zfcp_erp_adapter_shutdown(adapter, 0, "ccsusp1", NULL);
zfcp_erp_wait(adapter);

up(&zfcp_data.config_sema);

return 0;
}

static int zfcp_ccw_activate(struct ccw_device *cdev)

{
struct zfcp_adapter *adapter = dev_get_drvdata(&cdev->dev);

zfcp_erp_modify_adapter_status(adapter, "ccresu1", NULL,
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
"ccresu2", NULL);
zfcp_erp_wait(adapter);
flush_work(&adapter->scan_work);

return 0;
}

static struct ccw_device_id zfcp_ccw_device_id[] = {
{ CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, 0x3) },
{ CCW_DEVICE_DEVTYPE(0x1731, 0x3, 0x1732, ZFCP_MODEL_PRIV) },
Expand Down Expand Up @@ -227,6 +257,9 @@ static struct ccw_driver zfcp_ccw_driver = {
.set_offline = zfcp_ccw_set_offline,
.notify = zfcp_ccw_notify,
.shutdown = zfcp_ccw_shutdown,
.freeze = zfcp_ccw_suspend,
.thaw = zfcp_ccw_activate,
.restore = zfcp_ccw_activate,
};

/**
Expand Down

0 comments on commit 08766c7

Please sign in to comment.