summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-02-28 12:07:55 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-03-07 09:52:24 +0100
commitaebfa669d9fe77876f120d3d9a28fee240fe5a8e (patch)
treeb1552eddfd5572fcb1bfc82aaae2e0cd6d7d4ab4 /drivers/s390/block
parent4fa3c019640ef776e393345ed35d9ec5c51aa3c1 (diff)
s390/scm: process availability
Let the bus code process scm availability information and notify scm device drivers about the new state. Reviewed-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/scm_drv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c
index ff8558c4fe2..5f6180d6ff0 100644
--- a/drivers/s390/block/scm_drv.c
+++ b/drivers/s390/block/scm_drv.c
@@ -15,6 +15,8 @@
static void scm_notify(struct scm_device *scmdev, enum scm_event event)
{
+ struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
+
switch (event) {
case SCM_CHANGE:
pr_info("%lu: The capabilities of the SCM increment changed\n",
@@ -22,6 +24,11 @@ static void scm_notify(struct scm_device *scmdev, enum scm_event event)
SCM_LOG(2, "State changed");
SCM_LOG_STATE(2, scmdev);
break;
+ case SCM_AVAIL:
+ SCM_LOG(2, "Increment available");
+ SCM_LOG_STATE(2, scmdev);
+ scm_blk_set_available(bdev);
+ break;
}
}