diff options
author | Stefan Fritsch <sf@cvs.openbsd.org> | 2017-05-26 15:26:29 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@cvs.openbsd.org> | 2017-05-26 15:26:29 +0000 |
commit | d0d109ea56949bb6120396889638b54cabd46fd1 (patch) | |
tree | b41f8949ea96275fb44e1f82dd2e63547d665fd0 /sys/dev/pv | |
parent | 0626a9399558d308e18d890e4ae6588b3cc53d66 (diff) |
vioblk: set VIOBLK_DONE from vioblk_vq_done1
If the device needs to be reset due to a poll timeout, we need accurate
information which requests are already completed. Otherwise, there will
be a panic "scsi_done called twice on xs", as found out by mpi@
Diffstat (limited to 'sys/dev/pv')
-rw-r--r-- | sys/dev/pv/vioblk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pv/vioblk.c b/sys/dev/pv/vioblk.c index c791f4c9ec3..f977cf96905 100644 --- a/sys/dev/pv/vioblk.c +++ b/sys/dev/pv/vioblk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vioblk.c,v 1.3 2017/05/26 10:59:55 krw Exp $ */ +/* $OpenBSD: vioblk.c,v 1.4 2017/05/26 15:26:28 sf Exp $ */ /* * Copyright (c) 2012 Stefan Fritsch. @@ -306,7 +306,6 @@ vioblk_req_put(void *cookie, void *io) s = splbio(); - vr->vr_len = VIOBLK_DONE; virtio_enqueue_trim(vq, slot, ALLOC_SEGS); virtio_dequeue_commit(vq, slot); @@ -365,6 +364,7 @@ vioblk_vq_done1(struct vioblk_softc *sc, struct virtio_softc *vsc, xs->error = XS_NOERROR; xs->resid = xs->datalen - vr->vr_len; } + vr->vr_len = VIOBLK_DONE; scsi_done(xs); } |