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 the 64-bit PCI DMA tag if available. Otherw...



details:   https://anonhg.NetBSD.org/src/rev/23766b9f38f0
branches:  trunk
changeset: 969741:23766b9f38f0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Feb 29 18:07:57 2020 +0000

description:
Use the 64-bit PCI DMA tag if available.  Otherwise, we are needlessly
allocating (and using) bounce buffers on sytems with >4GB of RAM.

XXX pullup-9

diffstat:

 sys/dev/pci/if_mcx.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r ed58610489a8 -r 23766b9f38f0 sys/dev/pci/if_mcx.c
--- a/sys/dev/pci/if_mcx.c      Sat Feb 29 17:15:43 2020 +0000
+++ b/sys/dev/pci/if_mcx.c      Sat Feb 29 18:07:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mcx.c,v 1.10 2020/01/30 14:02:14 thorpej Exp $ */
+/*     $NetBSD: if_mcx.c,v 1.11 2020/02/29 18:07:57 thorpej Exp $ */
 /*     $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -2215,7 +2215,10 @@
        sc->sc_dev = self;
        sc->sc_pc = pa->pa_pc;
        sc->sc_tag = pa->pa_tag;
-       sc->sc_dmat = pa->pa_dmat;
+       if (pci_dma64_available(pa))
+               sc->sc_dmat = pa->pa_dmat64;
+       else
+               sc->sc_dmat = pa->pa_dmat;
 
        /* Map the PCI memory space */
        memtype = pci_mapreg_type(sc->sc_pc, sc->sc_tag, MCX_HCA_BAR);



Home | Main Index | Thread Index | Old Index