diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-04-04 04:25:06 -0400 |
---|---|---|
committer | Gleb Natapov <gleb@redhat.com> | 2013-04-07 06:13:47 -0400 |
commit | 99437a2782730ec8c7e6cfebb6143d00b091e4a8 (patch) | |
tree | b68e32dbff273f8f8613efd734c4b46849231efc /drivers/s390 | |
parent | 450e0b411f56db9839c9725d4d49e70e24f87ba3 (diff) |
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')
-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, | |||
133 | do { | 133 | do { |
134 | spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); | 134 | spin_lock_irqsave(get_ccwdev_lock(vcdev->cdev), flags); |
135 | ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0); | 135 | ret = ccw_device_start(vcdev->cdev, ccw, intparm, 0, 0); |
136 | if (!ret) | 136 | if (!ret) { |
137 | if (!vcdev->curr_io) | ||
138 | vcdev->err = 0; | ||
137 | vcdev->curr_io |= flag; | 139 | vcdev->curr_io |= flag; |
140 | } | ||
138 | spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); | 141 | spin_unlock_irqrestore(get_ccwdev_lock(vcdev->cdev), flags); |
139 | cpu_relax(); | 142 | cpu_relax(); |
140 | } while (ret == -EBUSY); | 143 | } while (ret == -EBUSY); |