diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2008-12-25 13:39:13 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 13:39:10 +0100 |
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 fb125efd689..5150fba742a 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h @@ -45,6 +45,19 @@ struct pmcw { /* ... in an operand exception. */ } __attribute__ ((packed)); +/* Target SCHIB configuration. */ +struct schib_config { + u64 mba; + u32 intparm; + u16 mbi; + u32 isc:3; + u32 ena:1; + u32 mme:2; + u32 mp:1; + u32 csense:1; + u32 mbfc:1; +} __attribute__ ((packed)); + /* * subchannel information block */ @@ -83,6 +96,7 @@ struct subchannel { struct css_driver *driver; void *private; /* private per subchannel type data */ struct work_struct work; + struct schib_config config; } __attribute__ ((aligned(8))); #define IO_INTERRUPT_TYPE 0 /* I/O interrupt type */ @@ -101,8 +115,8 @@ extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8); extern int cio_cancel (struct subchannel *); extern int cio_set_options (struct subchannel *, int); extern int cio_get_options (struct subchannel *); -extern int cio_modify (struct subchannel *); extern int cio_update_schib(struct subchannel *sch); +extern int cio_commit_config(struct subchannel *sch); int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key); int cio_tm_intrg(struct subchannel *sch); |