]> err.no Git - linux-2.6/commitdiff
[S390] cio: observe chpid valid flag
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Fri, 27 Apr 2007 14:01:29 +0000 (16:01 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 27 Apr 2007 14:01:39 +0000 (16:01 +0200)
Check validity flag of CHPID description data before continuing with
channel-path initialization.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/chp.c

index 6e04521accd8488ee565e3c7be4b25e25417c921..8a5839147f8aed331669673ebf8ef946d464845c 100644 (file)
@@ -339,6 +339,10 @@ int chp_new(struct chp_id chpid)
        ret = chsc_determine_channel_path_description(chpid, &chp->desc);
        if (ret)
                goto out_free;
+       if ((chp->desc.flags & 0x80) == 0) {
+               ret = -ENODEV;
+               goto out_free;
+       }
        /* Get channel-measurement characteristics. */
        if (css_characteristics_avail && css_chsc_characteristics.scmc
            && css_chsc_characteristics.secm) {