Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Make sure we allocate enough segments for the re...



details:   https://anonhg.NetBSD.org/src/rev/1fddf27c786d
branches:  trunk
changeset: 770803:1fddf27c786d
user:      hannken <hannken%NetBSD.org@localhost>
date:      Wed Nov 02 14:34:09 2011 +0000

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

diffstat:

 sys/dev/pci/ld_virtio.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 5f6002bc3231 -r 1fddf27c786d sys/dev/pci/ld_virtio.c
--- a/sys/dev/pci/ld_virtio.c   Wed Nov 02 13:52:34 2011 +0000
+++ b/sys/dev/pci/ld_virtio.c   Wed Nov 02 14:34:09 2011 +0000
@@ -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 @@
                }
                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);



Home | Main Index | Thread Index | Old Index