aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/scm_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/block/scm_drv.c')
-rw-r--r--drivers/s390/block/scm_drv.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c
index 9fa0a908607b..5f6180d6ff08 100644
--- a/drivers/s390/block/scm_drv.c
+++ b/drivers/s390/block/scm_drv.c
@@ -13,12 +13,23 @@
13#include <asm/eadm.h> 13#include <asm/eadm.h>
14#include "scm_blk.h" 14#include "scm_blk.h"
15 15
16static void notify(struct scm_device *scmdev) 16static void scm_notify(struct scm_device *scmdev, enum scm_event event)
17{ 17{
18 pr_info("%lu: The capabilities of the SCM increment changed\n", 18 struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev);
19 (unsigned long) scmdev->address); 19
20 SCM_LOG(2, "State changed"); 20 switch (event) {
21 SCM_LOG_STATE(2, scmdev); 21 case SCM_CHANGE:
22 pr_info("%lu: The capabilities of the SCM increment changed\n",
23 (unsigned long) scmdev->address);
24 SCM_LOG(2, "State changed");
25 SCM_LOG_STATE(2, scmdev);
26 break;
27 case SCM_AVAIL:
28 SCM_LOG(2, "Increment available");
29 SCM_LOG_STATE(2, scmdev);
30 scm_blk_set_available(bdev);
31 break;
32 }
22} 33}
23 34
24static int scm_probe(struct scm_device *scmdev) 35static int scm_probe(struct scm_device *scmdev)
@@ -64,7 +75,7 @@ static struct scm_driver scm_drv = {
64 .name = "scm_block", 75 .name = "scm_block",
65 .owner = THIS_MODULE, 76 .owner = THIS_MODULE,
66 }, 77 },
67 .notify = notify, 78 .notify = scm_notify,
68 .probe = scm_probe, 79 .probe = scm_probe,
69 .remove = scm_remove, 80 .remove = scm_remove,
70 .handler = scm_blk_irq, 81 .handler = scm_blk_irq,