Patchwork [18/19] s390: css error codes.

login
register
mail settings
Submitter Alexander Graf
Date Jan. 29, 2013, 8:50 p.m.
Message ID <1359492659-16362-19-git-send-email-agraf@suse.de>
Download mbox | patch
Permalink /patch/216666/
State New
Headers show

Comments

Alexander Graf - Jan. 29, 2013, 8:50 p.m.
From: Cornelia Huck <cornelia.huck@de.ibm.com>

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>
---
 hw/s390x/css.c        |    8 ++++----
 hw/s390x/virtio-ccw.c |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index 84efd4a..3244201 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -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));
@@ -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;
     }
@@ -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;
@@ -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;
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 8c9b745..7d7f336 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -384,7 +384,7 @@  static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
         }
         break;
     default:
-        ret = -EOPNOTSUPP;
+        ret = -ENOSYS;
         break;
     }
     return ret;