Commit 93a27592 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky

[S390] pm: io subchannel driver power management callbacks

Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent dcbd16d5
...@@ -138,6 +138,19 @@ static struct css_device_id io_subchannel_ids[] = { ...@@ -138,6 +138,19 @@ static struct css_device_id io_subchannel_ids[] = {
}; };
MODULE_DEVICE_TABLE(css, io_subchannel_ids); MODULE_DEVICE_TABLE(css, io_subchannel_ids);
static int io_subchannel_prepare(struct subchannel *sch)
{
struct ccw_device *cdev;
/*
* Don't allow suspend while a ccw device registration
* is still outstanding.
*/
cdev = sch_get_cdev(sch);
if (cdev && !device_is_registered(&cdev->dev))
return -EAGAIN;
return 0;
}
static struct css_driver io_subchannel_driver = { static struct css_driver io_subchannel_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.subchannel_type = io_subchannel_ids, .subchannel_type = io_subchannel_ids,
...@@ -148,6 +161,7 @@ static struct css_driver io_subchannel_driver = { ...@@ -148,6 +161,7 @@ static struct css_driver io_subchannel_driver = {
.probe = io_subchannel_probe, .probe = io_subchannel_probe,
.remove = io_subchannel_remove, .remove = io_subchannel_remove,
.shutdown = io_subchannel_shutdown, .shutdown = io_subchannel_shutdown,
.prepare = io_subchannel_prepare,
}; };
struct workqueue_struct *ccw_device_work; struct workqueue_struct *ccw_device_work;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment