From: "Michael S. Tsirkin" Subject: [ofa-general] Re: mthca use of dma_sync_single is bogus Date: Tue, 10 Jul 2007 20:11:42 +0300 Message-ID: <20070710171142.GC11320@mellanox.co.il> References: <20070709213913.GB20052@mellanox.co.il> <20070710071547.GA3814@mellanox.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org To: Roland Dreier Cc: Keir Fraser , Lukas Hejtmanek , xen-devel@lists.xensource.com, "Michael S. Tsirkin" , general@lists.openfabrics.org List-Id: xen-devel@lists.xenproject.org > Quoting Roland Dreier : > Subject: Re: mthca use of dma_sync_single is bogus > > > What makes you think dma_sync_single_range can't be used on memory mapped > > by pci_map_sg/dma_map_sg? > > The fact that it's dma_sync_*SINGLE*_range, and that there's a > separate dma_sync_sg() function defined in DMA-API.txt. Aha. I looked at the code a bit. Basically is seems that some architectures use the dma handle and some the virtual address to flush the cache, that's where the requirement that same parameters are used for sync single as for map single comes from. So it seems that this requirement does not apply to s/g, and that we can just build a scatterlist structure and do dma_sync_sg? -- MST