aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/cio.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2008-12-25 07:39:13 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:10 -0500
commit13952ec12dfeea793ff83c2a96139ed57eb0b897 (patch)
tree3311df62a1794bf95f78b2c57f25f0a79dc84523 /drivers/s390/cio/cio.h
parentcdb912a40df8b8507ab60b3d52f9980c0ba1f44d (diff)
[S390] cio: introduce cio_commit_config
To change the configuration of a subchannel we alter the modifiable bits of the subchannel's schib field and issue a modify subchannel. There can be the case that not all changes were applied -or worse- quietly overwritten by the hardware. With the next store subchannel we obtain the current state of the hardware but lose our target configuration. With this patch we introduce a subchannel_config structure which contains the target subchannel configuration. Additionally the msch wrapper cio_modify is replaced with cio_commit_config which copies the desired changes to a temporary schib. msch is then called with the temporary schib. This schib is only written back to the subchannel if all changes were applied. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/cio.h')
-rw-r--r--drivers/s390/cio/cio.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
index fb125efd6891..5150fba742ac 100644
--- a/drivers/s390/cio/cio.h
+++ b/drivers/s390/cio/cio.h
@@ -45,6 +45,19 @@ struct pmcw {
45 /* ... in an operand exception. */ 45 /* ... in an operand exception. */
46} __attribute__ ((packed)); 46} __attribute__ ((packed));
47 47
48/* Target SCHIB configuration. */
49struct schib_config {
50 u64 mba;
51 u32 intparm;
52 u16 mbi;
53 u32 isc:3;
54 u32 ena:1;
55 u32 mme:2;
56 u32 mp:1;
57 u32 csense:1;
58 u32 mbfc:1;
59} __attribute__ ((packed));
60
48/* 61/*
49 * subchannel information block 62 * subchannel information block
50 */ 63 */
@@ -83,6 +96,7 @@ struct subchannel {
83 struct css_driver *driver; 96 struct css_driver *driver;
84 void *private; /* private per subchannel type data */ 97 void *private; /* private per subchannel type data */
85 struct work_struct work; 98 struct work_struct work;
99 struct schib_config config;
86} __attribute__ ((aligned(8))); 100} __attribute__ ((aligned(8)));
87 101
88#define IO_INTERRUPT_TYPE 0 /* I/O interrupt type */ 102#define IO_INTERRUPT_TYPE 0 /* I/O interrupt type */
@@ -101,8 +115,8 @@ extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8);
101extern int cio_cancel (struct subchannel *); 115extern int cio_cancel (struct subchannel *);
102extern int cio_set_options (struct subchannel *, int); 116extern int cio_set_options (struct subchannel *, int);
103extern int cio_get_options (struct subchannel *); 117extern int cio_get_options (struct subchannel *);
104extern int cio_modify (struct subchannel *);
105extern int cio_update_schib(struct subchannel *sch); 118extern int cio_update_schib(struct subchannel *sch);
119extern int cio_commit_config(struct subchannel *sch);
106 120
107int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key); 121int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key);
108int cio_tm_intrg(struct subchannel *sch); 122int cio_tm_intrg(struct subchannel *sch);