aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/css.c
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.vnet.ibm.com>2017-08-31 14:18:28 +0200
committerCornelia Huck <cohuck@redhat.com>2017-09-19 18:21:32 +0200
commit6c86462220a1c7f5d673663d31d297627a2868a6 (patch)
tree3127d34da49a72043ffd5b5aa83dc619e262ad22 /hw/s390x/css.c
parent7ec6a364916c0d1eba01128481e503a550a2b466 (diff)
downloadqemu-6c86462220a1c7f5d673663d31d297627a2868a6.zip
qemu-6c86462220a1c7f5d673663d31d297627a2868a6.tar.gz
qemu-6c86462220a1c7f5d673663d31d297627a2868a6.tar.bz2
s390x/css: fix cc handling for XSCH
The function ioinst_handle_xsch is presenting cc 2 when it's supposed to present cc 1 and the other way around, because css_do_xsch has the error codes mixed up. Because cc 1 has precedence over cc 2 we also have to swap the two checks. Let us fix this. Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reported-by: Pierre Morel <pmorel@linux.vnet.ibm.com> Message-Id: <20170831121828.85885-1-pasic@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/css.c')
-rw-r--r--hw/s390x/css.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 901dc6a..5d3de71 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -1276,16 +1276,16 @@ int css_do_xsch(SubchDev *sch)
goto out;
}
+ if (s->ctrl & SCSW_CTRL_MASK_STCTL) {
+ ret = -EINPROGRESS;
+ goto out;
+ }
+
if (!(s->ctrl & SCSW_CTRL_MASK_FCTL) ||
((s->ctrl & SCSW_CTRL_MASK_FCTL) != SCSW_FCTL_START_FUNC) ||
(!(s->ctrl &
(SCSW_ACTL_RESUME_PEND | SCSW_ACTL_START_PEND | SCSW_ACTL_SUSP))) ||
(s->ctrl & SCSW_ACTL_SUBCH_ACTIVE)) {
- ret = -EINPROGRESS;
- goto out;
- }
-
- if (s->ctrl & SCSW_CTRL_MASK_STCTL) {
ret = -EBUSY;
goto out;
}