]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/s390/cio/device.c
Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[karo-tx-linux.git] / drivers / s390 / cio / device.c
index d3127018fb81c8f49030490de21777d1f8a03205..23d5752349b59d0f85b3274c206eea556123e10e 100644 (file)
@@ -1174,7 +1174,8 @@ void io_subchannel_init_config(struct subchannel *sch)
 {
        memset(&sch->config, 0, sizeof(sch->config));
        sch->config.csense = 1;
-       if ((sch->lpm & (sch->lpm - 1)) != 0)
+       /* Use subchannel mp mode when there is more than 1 installed CHPID. */
+       if ((sch->schib.pmcw.pim & (sch->schib.pmcw.pim - 1)) != 0)
                sch->config.mp = 1;
 }
 
@@ -1259,6 +1260,9 @@ static int io_subchannel_probe(struct subchannel *sch)
                return 0;
        }
        io_subchannel_init_fields(sch);
+       rc = cio_commit_config(sch);
+       if (rc)
+               goto out_schedule;
        rc = sysfs_create_group(&sch->dev.kobj,
                                &io_subchannel_attr_group);
        if (rc)
@@ -1722,6 +1726,9 @@ static int ccw_device_console_enable(struct ccw_device *cdev,
        sch->private = cio_get_console_priv();
        memset(sch->private, 0, sizeof(struct io_subchannel_private));
        io_subchannel_init_fields(sch);
+       rc = cio_commit_config(sch);
+       if (rc)
+               return rc;
        sch->driver = &io_subchannel_driver;
        /* Initialize the ccw_device structure. */
        cdev->dev.parent= &sch->dev;