Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 06:52:42 +0000 (UTC)
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300479 - head/sys/dev/hyperv/netvsc
Message-ID:  <201605230652.u4N6qgXo016502@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sephe
Date: Mon May 23 06:52:42 2016
New Revision: 300479
URL: https://svnweb.freebsd.org/changeset/base/300479

Log:
  hyperv/hn: Use hyperv busdma(9) helper.
  
  MFC after:	1 week
  Sponsored by:	Microsoft OSTC
  Differential Revision:	https://reviews.freebsd.org/D6444

Modified:
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Mon May 23 06:35:11 2016	(r300478)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c	Mon May 23 06:52:42 2016	(r300479)
@@ -113,6 +113,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/in_cksum.h>
 
 #include <dev/hyperv/include/hyperv.h>
+#include <dev/hyperv/include/hyperv_busdma.h>
 #include "hv_net_vsc.h"
 #include "hv_rndis.h"
 #include "hv_rndis_filter.h"
@@ -2171,18 +2172,6 @@ hn_check_iplen(const struct mbuf *m, int
 }
 
 static void
-hn_dma_map_paddr(void *arg, bus_dma_segment_t *segs, int nseg, int error)
-{
-	bus_addr_t *paddr = arg;
-
-	if (error)
-		return;
-
-	KASSERT(nseg == 1, ("too many segments %d!", nseg));
-	*paddr = segs->ds_addr;
-}
-
-static void
 hn_create_rx_data(struct hn_softc *sc, int ring_cnt)
 {
 	struct sysctl_oid_list *child;
@@ -2472,7 +2461,7 @@ hn_create_tx_ring(struct hn_softc *sc, i
 		error = bus_dmamap_load(txr->hn_tx_rndis_dtag,
 		    txd->rndis_msg_dmap,
 		    txd->rndis_msg, HN_RNDIS_MSG_LEN,
-		    hn_dma_map_paddr, &txd->rndis_msg_paddr,
+		    hyperv_dma_map_paddr, &txd->rndis_msg_paddr,
 		    BUS_DMA_NOWAIT);
 		if (error) {
 			device_printf(sc->hn_dev,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605230652.u4N6qgXo016502>