Commit 758976f9 authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky

[S390] cio: Catch operand exceptions on stsch.

If we have a subchannel id which has been generated via
for_each_subchannel(), it might contain an invalid subchannel set id.
We need to catch the ensuing operand exception by using stsch_err()
instead of stsch() in all possible cases.
Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent d8c351a9
...@@ -608,7 +608,7 @@ __chp_add_new_sch(struct subchannel_id schid) ...@@ -608,7 +608,7 @@ __chp_add_new_sch(struct subchannel_id schid)
struct schib schib; struct schib schib;
int ret; int ret;
if (stsch(schid, &schib)) if (stsch_err(schid, &schib))
/* We're through */ /* We're through */
return need_rescan ? -EAGAIN : -ENXIO; return need_rescan ? -EAGAIN : -ENXIO;
......
...@@ -296,7 +296,7 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow) ...@@ -296,7 +296,7 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow)
/* Will be done on the slow path. */ /* Will be done on the slow path. */
return -EAGAIN; return -EAGAIN;
} }
if (stsch(schid, &schib) || !schib.pmcw.dnv) { if (stsch_err(schid, &schib) || !schib.pmcw.dnv) {
/* Unusable - ignore. */ /* Unusable - ignore. */
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment