summaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm/virtio_ccw.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2013-04-04 10:25:06 +0200
committerGleb Natapov <gleb@redhat.com>2013-04-07 13:13:47 +0300
commit99437a2782730ec8c7e6cfebb6143d00b091e4a8 (patch)
treeb68e32dbff273f8f8613efd734c4b46849231efc /drivers/s390/kvm/virtio_ccw.c
parent450e0b411f56db9839c9725d4d49e70e24f87ba3 (diff)
downloadtalos-op-linux-99437a2782730ec8c7e6cfebb6143d00b091e4a8.tar.gz
talos-op-linux-99437a2782730ec8c7e6cfebb6143d00b091e4a8.zip
KVM: s390: virtio_ccw: reset errors for new I/O.
ccw_io_helper neglected to reset vcdev->err after a new channel program had been successfully started, resulting in stale errors delivered after one I/O failed. Reset the error after a new channel program has been successfully started with no old I/O pending. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'drivers/s390/kvm/virtio_ccw.c')
-rw-r--r--drivers/s390/kvm/virtio_ccw.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c
index 42d507c4e06b..5948f2a7b080 100644
--- a/drivers/s390/kvm/virtio_ccw.c
+++ b/drivers/s390/kvm/virtio_ccw.c
@@ -133,8 +133,11 @@ static int ccw_io_helper(struct virtio_ccw_device *vcdev,
do {
spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags);
ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0);
- if (!ret)
+ if (!ret) {
+ if (!vcdev->curr_io)
+ vcdev->err = 0;
vcdev->curr_io |= flag;
+ }
spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags);
cpu_relax();
} while (ret == -EBUSY);
OpenPOWER on IntegriCloud