Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/pci Use 64-bit DMA, if it is available.
details: https://anonhg.NetBSD.org/src/rev/45db05a53d72
branches: trunk
changeset: 796812:45db05a53d72
user: hikaru <hikaru%NetBSD.org@localhost>
date: Thu Jun 19 13:20:28 2014 +0000
description:
Use 64-bit DMA, if it is available.
This fixes null packet handling on guest which have memory over than 3GB.
diffstat:
sys/arch/x86/pci/if_vmx.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 283c781b8993 -r 45db05a53d72 sys/arch/x86/pci/if_vmx.c
--- a/sys/arch/x86/pci/if_vmx.c Thu Jun 19 13:20:13 2014 +0000
+++ b/sys/arch/x86/pci/if_vmx.c Thu Jun 19 13:20:28 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vmx.c,v 1.2 2014/06/19 13:16:29 hikaru Exp $ */
+/* $NetBSD: if_vmx.c,v 1.3 2014/06/19 13:20:28 hikaru Exp $ */
/* $OpenBSD: if_vmx.c,v 1.16 2014/01/22 06:04:17 brad Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.2 2014/06/19 13:16:29 hikaru Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vmx.c,v 1.3 2014/06/19 13:20:28 hikaru Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -238,7 +238,10 @@
preg |= PCI_COMMAND_MASTER_ENABLE;
pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, preg);
- sc->sc_dmat = pa->pa_dmat;
+ if (pci_dma64_available(pa))
+ sc->sc_dmat = pa->pa_dmat64;
+ else
+ sc->sc_dmat = pa->pa_dmat;
if (vmxnet3_dma_init(sc)) {
aprint_error_dev(sc->sc_dev, "failed to setup DMA\n");
return;
Home |
Main Index |
Thread Index |
Old Index