Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci use dma64 if available so we don't have do bounc...
details: https://anonhg.NetBSD.org/src/rev/df1565a735d9
branches: trunk
changeset: 341250:df1565a735d9
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 27 23:08:27 2015 +0000
description:
use dma64 if available so we don't have do bounce around too much.
diffstat:
sys/dev/pci/virtio.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r f350ac05448f -r df1565a735d9 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c Tue Oct 27 22:28:56 2015 +0000
+++ b/sys/dev/pci/virtio.c Tue Oct 27 23:08:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: virtio.c,v 1.11 2015/10/26 01:44:48 ozaki-r Exp $ */
+/* $NetBSD: virtio.c,v 1.12 2015/10/27 23:08:27 christos Exp $ */
/*
* Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.11 2015/10/26 01:44:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.12 2015/10/27 23:08:27 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -341,7 +341,10 @@
sc->sc_pc = pc;
sc->sc_tag = tag;
sc->sc_iot = pa->pa_iot;
- sc->sc_dmat = pa->pa_dmat;
+ if (pci_dma64_available(pa))
+ sc->sc_dmat = pa->pa_dmat64;
+ else
+ sc->sc_dmat = pa->pa_dmat;
sc->sc_config_offset = VIRTIO_CONFIG_DEVICE_CONFIG_NOMSI;
if (pci_mapreg_map(pa, PCI_MAPREG_START, PCI_MAPREG_TYPE_IO, 0,
Home |
Main Index |
Thread Index |
Old Index