Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Oct 2016 20:53:44 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307881 - head/sys/contrib/rdma/krping
Message-ID:  <201610242053.u9OKriuB009550@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon Oct 24 20:53:44 2016
New Revision: 307881
URL: https://svnweb.freebsd.org/changeset/base/307881

Log:
  krping: Allow the underlying ib_device to handle DMA mappings.
  
  Submitted by:	Vijay Singh @ Netapp

Modified:
  head/sys/contrib/rdma/krping/krping.c

Modified: head/sys/contrib/rdma/krping/krping.c
==============================================================================
--- head/sys/contrib/rdma/krping/krping.c	Mon Oct 24 20:47:46 2016	(r307880)
+++ head/sys/contrib/rdma/krping/krping.c	Mon Oct 24 20:53:44 2016	(r307881)
@@ -548,11 +548,11 @@ static int krping_setup_buffers(struct k
 
 	DEBUG_LOG(cb, "krping_setup_buffers called on cb %p\n", cb);
 
-	cb->recv_dma_addr = dma_map_single(cb->pd->device->dma_device, 
+	cb->recv_dma_addr = ib_dma_map_single(cb->pd->device, 
 				   &cb->recv_buf, 
 				   sizeof(cb->recv_buf), DMA_BIDIRECTIONAL);
 	pci_unmap_addr_set(cb, recv_mapping, cb->recv_dma_addr);
-	cb->send_dma_addr = dma_map_single(cb->pd->device->dma_device, 
+	cb->send_dma_addr = ib_dma_map_single(cb->pd->device, 
 					   &cb->send_buf, sizeof(cb->send_buf),
 					   DMA_BIDIRECTIONAL);
 	pci_unmap_addr_set(cb, send_mapping, cb->send_dma_addr);
@@ -606,7 +606,7 @@ static int krping_setup_buffers(struct k
 		goto bail;
 	}
 
-	cb->rdma_dma_addr = dma_map_single(cb->pd->device->dma_device, 
+	cb->rdma_dma_addr = ib_dma_map_single(cb->pd->device, 
 			       cb->rdma_buf, cb->size, 
 			       DMA_BIDIRECTIONAL);
 	pci_unmap_addr_set(cb, rdma_mapping, cb->rdma_dma_addr);
@@ -676,7 +676,7 @@ static int krping_setup_buffers(struct k
 			goto bail;
 		}
 
-		cb->start_dma_addr = dma_map_single(cb->pd->device->dma_device, 
+		cb->start_dma_addr = ib_dma_map_single(cb->pd->device, 
 						   cb->start_buf, cb->size, 
 						   DMA_BIDIRECTIONAL);
 		pci_unmap_addr_set(cb, start_mapping, cb->start_dma_addr);
@@ -1707,7 +1707,7 @@ static void krping_fr_test5(struct krpin
 			goto err2;
 		}
 		DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]);
-		dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device,
+		dma_addr[scnt] = ib_dma_map_single(cb->pd->device,
 						   buf[scnt], cb->size,
 						   DMA_BIDIRECTIONAL);
 		if (dma_mapping_error(cb->pd->device->dma_device,
@@ -2032,7 +2032,7 @@ static void krping_fr_test6(struct krpin
 			goto err2;
 		}
 		DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]);
-		dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device,
+		dma_addr[scnt] = ib_dma_map_single(cb->pd->device,
 						   buf[scnt], cb->size,
 						   DMA_BIDIRECTIONAL);
 		if (dma_mapping_error(cb->pd->device->dma_device,



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