Skip to content

Commit

Permalink
s390: css error codes.
Browse files Browse the repository at this point in the history
Changed error codes in the channel subsystem / virtio-ccw code
(-EOPNOTSUPP -> -ENOSYS, -ERESTART -> -EINPROGRESS).

This should hopefully fix building on mingw32.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
cohuck authored and agraf committed Jan 29, 2013
1 parent 50c8d9b commit 8d034a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions hw/s390x/css.c
Expand Up @@ -223,7 +223,7 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr)
}

if (ccw.flags & CCW_FLAG_SUSPEND) {
return -ERESTART;
return -EINPROGRESS;
}

check_len = !((ccw.flags & CCW_FLAG_SLI) && !(ccw.flags & CCW_FLAG_DC));
Expand Down Expand Up @@ -291,7 +291,7 @@ static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr)
/* Handle device specific commands. */
ret = sch->ccw_cb(sch, ccw);
} else {
ret = -EOPNOTSUPP;
ret = -ENOSYS;
}
break;
}
Expand Down Expand Up @@ -347,7 +347,7 @@ static void sch_handle_start_func(SubchDev *sch)
SCSW_STCTL_STATUS_PEND;
s->dstat = SCSW_DSTAT_CHANNEL_END | SCSW_DSTAT_DEVICE_END;
break;
case -EOPNOTSUPP:
case -ENOSYS:
/* unsupported command, generate unit check (command reject) */
s->ctrl &= ~SCSW_ACTL_START_PEND;
s->dstat = SCSW_DSTAT_UNIT_CHECK;
Expand All @@ -372,7 +372,7 @@ static void sch_handle_start_func(SubchDev *sch)
s->ctrl &= ~SCSW_CTRL_MASK_STCTL;
s->ctrl |= SCSW_STCTL_ALERT | SCSW_STCTL_STATUS_PEND;
break;
case -ERESTART:
case -EINPROGRESS:
/* channel program has been suspended */
s->ctrl &= ~SCSW_ACTL_START_PEND;
s->ctrl |= SCSW_ACTL_SUSP;
Expand Down
2 changes: 1 addition & 1 deletion hw/s390x/virtio-ccw.c
Expand Up @@ -384,7 +384,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
}
break;
default:
ret = -EOPNOTSUPP;
ret = -ENOSYS;
break;
}
return ret;
Expand Down

0 comments on commit 8d034a6

Please sign in to comment.