Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci PR/52333: Jia-Ju Bai: explicitly pass BUS_DMA_NO...



details:   https://anonhg.NetBSD.org/src/rev/e52fcf86ce0c
branches:  trunk
changeset: 825017:e52fcf86ce0c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jun 26 18:23:49 2017 +0000

description:
PR/52333: Jia-Ju Bai: explicitly pass BUS_DMA_NOWAIT to bus_dmamap_load_mbuf()
called from an interrupt context. It should not matter since the maps are
constructed with BUS_DMA_ALLOCNOW, but :-)

diffstat:

 sys/dev/pci/if_vte.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r ca085b44c999 -r e52fcf86ce0c sys/dev/pci/if_vte.c
--- a/sys/dev/pci/if_vte.c      Mon Jun 26 17:45:56 2017 +0000
+++ b/sys/dev/pci/if_vte.c      Mon Jun 26 18:23:49 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vte.c,v 1.17 2017/05/23 02:19:14 ozaki-r Exp $      */
+/*     $NetBSD: if_vte.c,v 1.18 2017/06/26 18:23:49 christos Exp $     */
 
 /*
  * Copyright (c) 2011 Manuel Bouyer.  All rights reserved.
@@ -55,7 +55,7 @@
 /* Driver for DM&P Electronics, Inc, Vortex86 RDC R6040 FastEthernet. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.17 2017/05/23 02:19:14 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.18 2017/06/26 18:23:49 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -733,7 +733,8 @@
                m->m_len = m->m_pkthdr.len;
        }
 
-       error = bus_dmamap_load_mbuf(sc->vte_dmatag, txd->tx_dmamap, m, 0);
+       error = bus_dmamap_load_mbuf(sc->vte_dmatag, txd->tx_dmamap, m,
+           BUS_DMA_NOWAIT);
        if (error != 0) {
                txd->tx_flags &= ~VTE_TXMBUF;
                return (NULL);
@@ -1055,7 +1056,7 @@
        m_adj(m, sizeof(uint32_t));
 
        if (bus_dmamap_load_mbuf(sc->vte_dmatag,
-           sc->vte_cdata.vte_rx_sparemap, m, 0) != 0) {
+           sc->vte_cdata.vte_rx_sparemap, m, BUS_DMA_NOWAIT) != 0) {
                m_freem(m);
                return (ENOBUFS);
        }



Home | Main Index | Thread Index | Old Index