Module Name: src
Committed By: jdolecek
Date: Sat May 13 20:17:43 UTC 2017
Modified Files:
src/sys/dev/pci: vioscsi.c
Log Message:
fix number of maximum segments in the queue allocation so that
MAXPHYS-sized tranfer fits inside the indirect descriptor; avoids the
!indirect path in virtio_enqueue_reserve() for these transfers,
which runs out of the vq_entries and triggers XS_RESOURCE_SHORTAGE for
bigger number of outstanding tranfers
fixes PR kern/52199 by MB
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/vioscsi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/vioscsi.c
diff -u src/sys/dev/pci/vioscsi.c:1.16 src/sys/dev/pci/vioscsi.c:1.17
--- src/sys/dev/pci/vioscsi.c:1.16 Sat Mar 25 23:58:35 2017
+++ src/sys/dev/pci/vioscsi.c Sat May 13 20:17:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vioscsi.c,v 1.16 2017/03/25 23:58:35 christos Exp $ */
+/* $NetBSD: vioscsi.c,v 1.17 2017/05/13 20:17:42 jdolecek Exp $ */
/* $OpenBSD: vioscsi.c,v 1.3 2015/03/14 03:38:49 jsg Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.16 2017/03/25 23:58:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vioscsi.c,v 1.17 2017/05/13 20:17:42 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -154,7 +154,7 @@ vioscsi_attach(device_t parent, device_t
for(i=0; i < __arraycount(sc->sc_vqs); i++) {
rv = virtio_alloc_vq(vsc, &sc->sc_vqs[i], i, MAXPHYS,
- 1 + howmany(MAXPHYS, NBPG),
+ VIRTIO_SCSI_MIN_SEGMENTS + howmany(MAXPHYS, NBPG),
vioscsi_vq_names[i]);
if (rv) {
aprint_error_dev(sc->sc_dev,