summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-09-19 12:58:54 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-09-19 12:58:54 +0300
commit3b601dd398b0f8a66744c0ecf384a6cbe65e36e7 (patch)
tree570d5895dfced5d2e443a7f9b8f6fa5f9a7560f3 /drivers/virtio
parenta638073161e90ac6dc0ffc2e27cbc4bcd3ff88c3 (diff)
parent5fd2d19eeb9767339e1338eb6789495d1812065b (diff)
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.4.r1-05900-8x98.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 5fd2d19eeb976 Merge 4.4.236 into android-4.4-p Conflicts: drivers/scsi/ufs/ufshcd.c Change-Id: I22282a0d571bdb72f50d3fc1e2cee4443de1f7f4
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_ring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 761f28ffd40e..7a3d722be30d 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -781,6 +781,9 @@ bool virtqueue_poll(struct virtqueue *_vq, unsigned last_used_idx)
{
struct vring_virtqueue *vq = to_vvq(_vq);
+ if (unlikely(vq->broken))
+ return false;
+
virtio_mb(vq->weak_barriers);
return (u16)last_used_idx != virtio16_to_cpu(_vq->vdev, vq->vring.used->idx);
}