]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[S390] cio: Catch operand exceptions on stsch.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 5 Feb 2007 20:17:36 +0000 (21:17 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 5 Feb 2007 20:17:36 +0000 (21:17 +0100)
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: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/chsc.c
drivers/s390/cio/css.c

index 15b0e6329cf3f913dd1689724fa27ab9a9f10162..514daeaba7055e6e3635ac00e57db2f86aea9cc9 100644 (file)
@@ -608,7 +608,7 @@ __chp_add_new_sch(struct subchannel_id schid)
        struct schib schib;
        int ret;
 
-       if (stsch(schid, &schib))
+       if (stsch_err(schid, &schib))
                /* We're through */
                return need_rescan ? -EAGAIN : -ENXIO;
 
index 2da01b7a3b0a24315d16acd7d326820f7c496c3c..bdf13699fe0d2ce42cae3bf7ed54175e84b57739 100644 (file)
@@ -296,7 +296,7 @@ static int css_evaluate_new_subchannel(struct subchannel_id schid, int slow)
                /* 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;
        }