aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 6412b2c3edd3..72187e54dcac 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -242,28 +242,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
242 if (sch->vpm == mask) 242 if (sch->vpm == mask)
243 goto out_unreg; 243 goto out_unreg;
244 244
245 if ((sch->schib.scsw.actl & (SCSW_ACTL_CLEAR_PEND | 245 if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) &&
246 SCSW_ACTL_HALT_PEND | 246 (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) &&
247 SCSW_ACTL_START_PEND | 247 (sch->schib.pmcw.lpum == mask) &&
248 SCSW_ACTL_RESUME_PEND)) && 248 (sch->vpm == 0)) {
249 (sch->schib.pmcw.lpum == mask)) {
250 int cc = cio_cancel(sch);
251
252 if (cc == -ENODEV)
253 goto out_unreg;
254
255 if (cc == -EINVAL) {
256 cc = cio_clear(sch);
257 if (cc == -ENODEV)
258 goto out_unreg;
259 /* Call handler. */
260 if (sch->driver && sch->driver->termination)
261 sch->driver->termination(&sch->dev);
262 goto out_unlock;
263 }
264 } else if ((sch->schib.scsw.actl & SCSW_ACTL_DEVACT) &&
265 (sch->schib.scsw.actl & SCSW_ACTL_SCHACT) &&
266 (sch->schib.pmcw.lpum == mask)) {
267 int cc; 249 int cc;
268 250
269 cc = cio_clear(sch); 251 cc = cio_clear(sch);
@@ -653,13 +635,13 @@ __chp_add(struct subchannel_id schid, void *data)
653 if (sch->schib.pmcw.chpid[i] == chp->id) { 635 if (sch->schib.pmcw.chpid[i] == chp->id) {
654 if (stsch(sch->schid, &sch->schib) != 0) { 636 if (stsch(sch->schid, &sch->schib) != 0) {
655 /* Endgame. */ 637 /* Endgame. */
656 spin_unlock(&sch->lock); 638 spin_unlock_irq(&sch->lock);
657 return -ENXIO; 639 return -ENXIO;
658 } 640 }
659 break; 641 break;
660 } 642 }
661 if (i==8) { 643 if (i==8) {
662 spin_unlock(&sch->lock); 644 spin_unlock_irq(&sch->lock);
663 return 0; 645 return 0;
664 } 646 }
665 sch->lpm = ((sch->schib.pmcw.pim & 647 sch->lpm = ((sch->schib.pmcw.pim &