Skip to contentSkip to conversation

cio: Catch operand exceptions on stsch.

S390 Martin Schwidefsky 1 participant 1 message Feb 2, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Cornelia Huck <[email protected]>

[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.

---

 drivers/s390/cio/chsc.c |    2 +-
 drivers/s390/cio/css.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/cio/chsc.c +1 -1
diff -urpN linux-2.6/drivers/s390/cio/chsc.c linux-2.6-patched/drivers/s390/cio/chsc.c
@@ -608,7 +608,7 @@ __chp_add_new_sch(struct subchannel_id s
 	struct schib schib;
 	int ret;
 
-	if (stsch(schid, &schib))
+	if (stsch_err(schid, &schib))
 		/* We're through */
 		return need_rescan ? -EAGAIN : -ENXIO;
 
drivers/s390/cio/css.c +1 -1
diff -urpN linux-2.6/drivers/s390/cio/css.c linux-2.6-patched/drivers/s390/cio/css.c
@@ -296,7 +296,7 @@ static int css_evaluate_new_subchannel(s
 		/* Will be done on the slow path. */
 		return -EAGAIN;
 	}
-	if (stsch(schid, &schib) || !schib.pmcw.dnv) {
+	if (stsch_err(schid, &schib) || !schib.pmcw.dnv) {
 		/* Unusable - ignore. */
 		return 0;
 	}