aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/css.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x/css.c')
-rw-r--r--hw/s390x/css.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index c87c1aecc0..bee12a3e65 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1402,20 +1402,17 @@ out:
return ret;
}
-int css_do_xsch(SubchDev *sch)
+IOInstEnding css_do_xsch(SubchDev *sch)
{
SCSW *s = &sch->curr_status.scsw;
PMCW *p = &sch->curr_status.pmcw;
- int ret;
if (~(p->flags) & (PMCW_FLAGS_MASK_DNV | PMCW_FLAGS_MASK_ENA)) {
- ret = -ENODEV;
- goto out;
+ return IOINST_CC_NOT_OPERATIONAL;
}
if (s->ctrl & SCSW_CTRL_MASK_STCTL) {
- ret = -EINPROGRESS;
- goto out;
+ return IOINST_CC_STATUS_PRESENT;
}
if (!(s->ctrl & SCSW_CTRL_MASK_FCTL) ||
@@ -1423,8 +1420,7 @@ int css_do_xsch(SubchDev *sch)
(!(s->ctrl &
(SCSW_ACTL_RESUME_PEND | SCSW_ACTL_START_PEND | SCSW_ACTL_SUSP))) ||
(s->ctrl & SCSW_ACTL_SUBCH_ACTIVE)) {
- ret = -EBUSY;
- goto out;
+ return IOINST_CC_BUSY;
}
/* Cancel the current operation. */
@@ -1436,10 +1432,7 @@ int css_do_xsch(SubchDev *sch)
sch->last_cmd_valid = false;
s->dstat = 0;
s->cstat = 0;
- ret = 0;
-
-out:
- return ret;
+ return IOINST_CC_EXPECTED;
}
int css_do_csch(SubchDev *sch)