Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci fix number of maximum segments in the queue allo...
details: https://anonhg.NetBSD.org/src/rev/a786fe29a596
branches: trunk
changeset: 353588:a786fe29a596
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat May 13 20:17:42 2017 +0000
description:
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
diffstat:
sys/dev/pci/vioscsi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 7beb66cdbc46 -r a786fe29a596 sys/dev/pci/vioscsi.c
--- a/sys/dev/pci/vioscsi.c Sat May 13 20:13:26 2017 +0000
+++ b/sys/dev/pci/vioscsi.c Sat May 13 20:17:42 2017 +0000
@@ -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 @@
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,
Home |
Main Index |
Thread Index |
Old Index