From cdb912a40df8b8507ab60b3d52f9980c0ba1f44d Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Thu, 25 Dec 2008 13:39:12 +0100 Subject: [S390] cio: introduce cio_update_schib There is the chance that we get condition code 0 for a stsch but the resulting schib is not vaild. In the current code there are 2 cases: * we do a check for validity of the schib after stsch, but at this time we have already stored the invaild schib in the subchannel structure. This may lead to problems. * we don't do a check for validity, which is not that good either. The patch addresses both issues by introducing the stsch wrapper cio_update_schib which performs stsch on a local schib. This schib is only written back to the subchannel if it's valid. side note: For some functions (chp_events) the return codes are different now (-ENXIO vs -ENODEV) but this shouldn't do harm since the caller doesn't check for _specific_ errors. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/cio.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/s390/cio/cio.h') diff --git a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h index 5db887e8f032..fb125efd6891 100644 --- a/drivers/s390/cio/cio.h +++ b/drivers/s390/cio/cio.h @@ -102,6 +102,7 @@ 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); int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key); int cio_tm_intrg(struct subchannel *sch); -- cgit v1.2.3-58-ga151