diff options
Diffstat (limited to 'drivers/s390/kvm/virtio_ccw.c')
-rw-r--r-- | drivers/s390/kvm/virtio_ccw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c index d6297176ab85..0fc584832001 100644 --- a/drivers/s390/kvm/virtio_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c | |||
@@ -642,8 +642,15 @@ static void virtio_ccw_int_handler(struct ccw_device *cdev, | |||
642 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND))) { | 642 | (SCSW_STCTL_ALERT_STATUS | SCSW_STCTL_STATUS_PEND))) { |
643 | /* OK */ | 643 | /* OK */ |
644 | } | 644 | } |
645 | if (irb_is_error(irb)) | 645 | if (irb_is_error(irb)) { |
646 | vcdev->err = -EIO; /* XXX - use real error */ | 646 | /* Command reject? */ |
647 | if ((scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK) && | ||
648 | (irb->ecw[0] & SNS0_CMD_REJECT)) | ||
649 | vcdev->err = -EOPNOTSUPP; | ||
650 | else | ||
651 | /* Map everything else to -EIO. */ | ||
652 | vcdev->err = -EIO; | ||
653 | } | ||
647 | if (vcdev->curr_io & activity) { | 654 | if (vcdev->curr_io & activity) { |
648 | switch (activity) { | 655 | switch (activity) { |
649 | case VIRTIO_CCW_DOING_READ_FEAT: | 656 | case VIRTIO_CCW_DOING_READ_FEAT: |