Module Name:    src
Committed By:   hannken
Date:           Wed Nov  2 14:34:09 UTC 2011

Modified Files:
        src/sys/dev/pci: ld_virtio.c

Log Message:
Make sure we allocate enough segments for the request dma maps.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/ld_virtio.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/ld_virtio.c
diff -u src/sys/dev/pci/ld_virtio.c:1.1 src/sys/dev/pci/ld_virtio.c:1.2
--- src/sys/dev/pci/ld_virtio.c:1.1	Sun Oct 30 12:12:21 2011
+++ src/sys/dev/pci/ld_virtio.c	Wed Nov  2 14:34:09 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $	*/
+/*	$NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.1 2011/10/30 12:12:21 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_virtio.c,v 1.2 2011/11/02 14:34:09 hannken Exp $");
 
 #include "rnd.h"
 
@@ -194,7 +194,8 @@ ld_virtio_alloc_reqs(struct ld_virtio_so
 		}
 		r = bus_dmamap_create(sc->sc_virtio->sc_dmat,
 				      ld->sc_maxxfer,
-				      ld->sc_maxxfer / NBPG, ld->sc_maxxfer,
+				      (ld->sc_maxxfer / NBPG) + 1,
+				      ld->sc_maxxfer,
 				      0,
 				      BUS_DMA_NOWAIT|BUS_DMA_ALLOCNOW,
 				      &vr->vr_payload);

Reply via email to