diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2008-12-25 07:39:13 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:10 -0500 |
commit | 13952ec12dfeea793ff83c2a96139ed57eb0b897 (patch) | |
tree | 3311df62a1794bf95f78b2c57f25f0a79dc84523 /drivers/s390/cio/cio.h | |
parent | cdb912a40df8b8507ab60b3d52f9980c0ba1f44d (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.h | 16 |
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. */ | ||
49 | struct 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); | |||
101 | extern int cio_cancel (struct subchannel *); | 115 | extern int cio_cancel (struct subchannel *); |
102 | extern int cio_set_options (struct subchannel *, int); | 116 | extern int cio_set_options (struct subchannel *, int); |
103 | extern int cio_get_options (struct subchannel *); | 117 | extern int cio_get_options (struct subchannel *); |
104 | extern int cio_modify (struct subchannel *); | ||
105 | extern int cio_update_schib(struct subchannel *sch); | 118 | extern int cio_update_schib(struct subchannel *sch); |
119 | extern int cio_commit_config(struct subchannel *sch); | ||
106 | 120 | ||
107 | int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key); | 121 | int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key); |
108 | int cio_tm_intrg(struct subchannel *sch); | 122 | int cio_tm_intrg(struct subchannel *sch); |