diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2008-12-25 07:39:12 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-12-25 07:39:10 -0500 |
commit | cdb912a40df8b8507ab60b3d52f9980c0ba1f44d (patch) | |
tree | 52d693b3515b71b4f84b539d41571facb75498db /drivers/s390/cio/device_status.c | |
parent | d6a30761d8116b8de8a5b5e79e68cce81d36414b (diff) |
[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 <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_status.c')
-rw-r--r-- | drivers/s390/cio/device_status.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c index 1b03c5423be2..5814dbee2410 100644 --- a/drivers/s390/cio/device_status.c +++ b/drivers/s390/cio/device_status.c | |||
@@ -56,7 +56,8 @@ ccw_device_path_notoper(struct ccw_device *cdev) | |||
56 | struct subchannel *sch; | 56 | struct subchannel *sch; |
57 | 57 | ||
58 | sch = to_subchannel(cdev->dev.parent); | 58 | sch = to_subchannel(cdev->dev.parent); |
59 | stsch (sch->schid, &sch->schib); | 59 | if (cio_update_schib(sch)) |
60 | goto doverify; | ||
60 | 61 | ||
61 | CIO_MSG_EVENT(0, "%s(0.%x.%04x) - path(s) %02x are " | 62 | CIO_MSG_EVENT(0, "%s(0.%x.%04x) - path(s) %02x are " |
62 | "not operational \n", __func__, | 63 | "not operational \n", __func__, |
@@ -64,6 +65,7 @@ ccw_device_path_notoper(struct ccw_device *cdev) | |||
64 | sch->schib.pmcw.pnom); | 65 | sch->schib.pmcw.pnom); |
65 | 66 | ||
66 | sch->lpm &= ~sch->schib.pmcw.pnom; | 67 | sch->lpm &= ~sch->schib.pmcw.pnom; |
68 | doverify: | ||
67 | cdev->private->flags.doverify = 1; | 69 | cdev->private->flags.doverify = 1; |
68 | } | 70 | } |
69 | 71 | ||