From owner-svn-src-stable@FreeBSD.ORG Tue Jul 23 22:53:02 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 652AB538; Tue, 23 Jul 2013 22:53:02 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 563692ADE; Tue, 23 Jul 2013 22:53:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6NMr2vl096734; Tue, 23 Jul 2013 22:53:02 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6NMr2dh096733; Tue, 23 Jul 2013 22:53:02 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201307232253.r6NMr2dh096733@svn.freebsd.org> From: Jim Harris Date: Tue, 23 Jul 2013 22:53:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253584 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2013 22:53:02 -0000 Author: jimharris Date: Tue Jul 23 22:53:01 2013 New Revision: 253584 URL: http://svnweb.freebsd.org/changeset/base/253584 Log: MFC r253434: Add bus_dmamap_load_bio and bus_dmamap_load_ccb to bus_dma(9). Approved by: re (marius) Modified: stable/9/share/man/man9/bus_dma.9 Directory Properties: stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/bus_dma.9 ============================================================================== --- stable/9/share/man/man9/bus_dma.9 Tue Jul 23 22:52:38 2013 (r253583) +++ stable/9/share/man/man9/bus_dma.9 Tue Jul 23 22:53:01 2013 (r253584) @@ -60,7 +60,7 @@ .\" $FreeBSD$ .\" $NetBSD: bus_dma.9,v 1.25 2002/10/14 13:43:16 wiz Exp $ .\" -.Dd May 12, 2009 +.Dd July 17, 2013 .Dt BUS_DMA 9 .Os .Sh NAME @@ -70,6 +70,8 @@ .Nm bus_dmamap_create , .Nm bus_dmamap_destroy , .Nm bus_dmamap_load , +.Nm bus_dmamap_load_bio , +.Nm bus_dmamap_load_ccb , .Nm bus_dmamap_load_mbuf , .Nm bus_dmamap_load_mbuf_sg , .Nm bus_dmamap_load_uio , @@ -97,6 +99,14 @@ "bus_size_t buflen" "bus_dmamap_callback_t *callback" "void *callback_arg" \ "int flags" .Ft int +.Fn bus_dmamap_load_bio "bus_dma_tag_t dmat" "bus_dmamap_t map" \ +"struct bio *bio" "bus_dmamap_callback_t *callback" "void *callback_arg" \ +"int flags" +.Ft int +.Fn bus_dmamap_load_ccb "bus_dma_tag_t dmat" "bus_dmamap_t map" \ +"union ccb *ccb" "bus_dmamap_callback_t *callback" "void *callback_arg" \ +"int flags" +.Ft int .Fn bus_dmamap_load_mbuf "bus_dma_tag_t dmat" "bus_dmamap_t map" \ "struct mbuf *mbuf" "bus_dmamap_callback2_t *callback" "void *callback_arg" \ "int flags" @@ -199,7 +209,10 @@ Client specified callback for receiving the load of a .Vt bus_dmamap_t via -.Fn bus_dmamap_load . +.Fn bus_dmamap_load , +.Fn bus_dmamap_load_bio +or +.Fn bus_dmamap_load_ccb . Callbacks are of the format: .Bl -tag -width indent .It Ft void @@ -624,6 +637,49 @@ This array is only valid during the scop A mapping could not be achieved within the segment constraints provided in the tag even though the requested allocation size was less than maxsize. .El +.It Fn bus_dmamap_load_bio "dmat" "map" "bio" "callback" "callback_arg" "flags" +This is a variation of +.Fn bus_dmamap_load +which maps buffers pointed to by +.Fa bio +for DMA transfers. +.Fa bio +may point to either a mapped or unmapped buffer. +.It Fn bus_dmamap_load_ccb "dmat" "map" "ccb" "callback" "callback_arg" "flags" +This is a variation of +.Fn bus_dmamap_load +which maps data pointed to by +.Fa ccb +for DMA transfers. +The data for +.Fa ccb +may be any of the following types: +.Bl -tag -width ".Er CAM_DATA_SG_PADDR" +.It CAM_DATA_VADDR +The data is a single KVA buffer. +.It CAM_DATA_PADDR +The data is a single bus address range. +.It CAM_DATA_SG +The data is a scatter/gather list of KVA buffers. +.It CAM_DATA_SG_PADDR +The data is a scatter/gather list of bus address ranges. +.It CAM_DATA_BIO +The data is contained in a +.Vt struct bio +attached to the CCB. +.El +.Pp +.Fn bus_dmamap_load_ccb +supports the following CCB XPT function codes: +.Pp +.Bl -item -offset indent -compact +.It +XPT_ATA_IO +.It +XPT_CONT_TARGET_IO +.It +XPT_SCSI_IO +.El .It Fn bus_dmamap_load_mbuf "dmat" "map" "mbuf" "callback2" "callback_arg" \ "flags" This is a variation of @@ -898,12 +954,16 @@ These functions include: .It .Fn bus_dmamap_load .It -.Fn bus_dmamap_load_uio +.Fn bus_dmamap_load_bio +.It +.Fn bus_dmamap_load_ccb .It .Fn bus_dmamap_load_mbuf .It .Fn bus_dmamap_load_mbuf_sg .It +.Fn bus_dmamap_load_uio +.It .Fn bus_dmamap_unload .It .Fn bus_dmamap_sync