From da2d58743ae460630d0a97f270392dfaaa817216 Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 25 Nov 2019 16:58:54 +0000 Subject: [PATCH] Pull up following revision(s) (requested by nonaka in ticket #480): sys/dev/hyperv/hvs.c: revision 1.3 sys/dev/hyperv/if_hvn.c: revision 1.10 hvs(4), hvn(4): Set correct size for bus_dmamap_sync(9). --- sys/dev/hyperv/hvs.c | 7 ++++--- sys/dev/hyperv/if_hvn.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sys/dev/hyperv/hvs.c b/sys/dev/hyperv/hvs.c index 2bce33458ec1..36334076772a 100644 --- a/sys/dev/hyperv/hvs.c +++ b/sys/dev/hyperv/hvs.c @@ -1,4 +1,4 @@ -/* $NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $ */ +/* $NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: hvs.c,v 1.17 2017/08/10 17:22:48 mikeb Exp $ */ /*- @@ -37,7 +37,7 @@ /* #define HVS_DEBUG_IO */ #include -__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1 2019/02/15 08:54:01 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hvs.c,v 1.1.8.1 2019/11/25 16:58:54 martin Exp $"); #include #include @@ -1095,7 +1095,8 @@ hvs_free_ccbs(struct hvs_softc *sc) if (ccb->ccb_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmap, + 0, ccb->ccb_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, ccb->ccb_dmap); bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmap); diff --git a/sys/dev/hyperv/if_hvn.c b/sys/dev/hyperv/if_hvn.c index 5f23e734a316..fbf046b324a7 100644 --- a/sys/dev/hyperv/if_hvn.c +++ b/sys/dev/hyperv/if_hvn.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $ */ +/* $NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $ */ /* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */ /*- @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.4 2019/11/25 16:58:54 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -632,7 +632,8 @@ hvn_decap(struct hvn_softc *sc, struct hvn_tx_desc *txd) { struct ifnet *ifp = SC2IFP(sc); - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); txd->txd_buf = NULL; @@ -667,7 +668,8 @@ hvn_txeof(struct hvn_softc *sc, uint64_t tid) } txd->txd_buf = NULL; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); m_freem(m); @@ -844,7 +846,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc) txd = &sc->sc_tx_desc[i]; if (txd->txd_dmap == NULL) continue; - bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, txd->txd_dmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, txd->txd_dmap); bus_dmamap_destroy(sc->sc_dmat, txd->txd_dmap); @@ -855,7 +858,8 @@ hvn_tx_ring_destroy(struct hvn_softc *sc) txd->txd_buf = NULL; } if (sc->sc_tx_rmap) { - bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, 0, 0, + bus_dmamap_sync(sc->sc_dmat, sc->sc_tx_rmap, + 0, txd->txd_dmap->dm_mapsize, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->sc_dmat, sc->sc_tx_rmap); bus_dmamap_destroy(sc->sc_dmat, sc->sc_tx_rmap);