aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/scm_blk.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-02-28 12:07:48 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-03-07 09:52:23 +0100
commit4fa3c019640ef776e393345ed35d9ec5c51aa3c1 (patch)
tree496a04beb012b9111f3735dbf3cf14a5861b71bd /drivers/s390/block/scm_blk.h
parents390/scm_drv: extend notify callback (diff)
downloadlinux-dev-4fa3c019640ef776e393345ed35d9ec5c51aa3c1.tar.xz
linux-dev-4fa3c019640ef776e393345ed35d9ec5c51aa3c1.zip
s390/scm_blk: suspend writes
Stop writing to scm after certain error conditions such as a concurrent firmware upgrade. Resume to normal state once scm_blk_set_available is called (due to an scm availability notification). 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/scm_blk.h')
-rw-r--r--drivers/s390/block/scm_blk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/block/scm_blk.h b/drivers/s390/block/scm_blk.h
index 3c1ccf494647..8b387b32fd62 100644
--- a/drivers/s390/block/scm_blk.h
+++ b/drivers/s390/block/scm_blk.h
@@ -21,6 +21,7 @@ struct scm_blk_dev {
spinlock_t rq_lock; /* guard the request queue */
spinlock_t lock; /* guard the rest of the blockdev */
atomic_t queued_reqs;
+ enum {SCM_OPER, SCM_WR_PROHIBIT} state;
struct list_head finished_requests;
#ifdef CONFIG_SCM_BLOCK_CLUSTER_WRITE
struct list_head cluster_list;
@@ -48,6 +49,7 @@ struct scm_request {
int scm_blk_dev_setup(struct scm_blk_dev *, struct scm_device *);
void scm_blk_dev_cleanup(struct scm_blk_dev *);
+void scm_blk_set_available(struct scm_blk_dev *);
void scm_blk_irq(struct scm_device *, void *, int);
void scm_request_finish(struct scm_request *);