diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-04-04 10:25:06 +0200 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-04-07 13:13:47 +0300 |
commit | 99437a2782730ec8c7e6cfebb6143d00b091e4a8 (patch) | |
tree | b68e32dbff273f8f8613efd734c4b46849231efc /drivers/s390/kvm/virtio_ccw.c | |
parent | 450e0b411f56db9839c9725d4d49e70e24f87ba3 (diff) | |
download | talos-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.c | 5 |
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); |