From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCHv6 3/8] dma-mapping: add dma_{map,unmap}_resource Date: Thu, 19 May 2016 10:22:48 -0400 Message-ID: <20160519142248.GB21691@localhost.localdomain> References: <1462812247-3414-1-git-send-email-niklas.soderlund+renesas@ragnatech.se> <1462812247-3414-4-git-send-email-niklas.soderlund+renesas@ragnatech.se> <20160517145445.GE4074@char.us.oracle.com> <20160519112926.GO29375@bigcity.dyn.berto.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20160519112926.GO29375@bigcity.dyn.berto.se> Sender: linux-renesas-soc-owner@vger.kernel.org To: vinod.koul@intel.com, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, iommu@lists.linux-foundation.org, hch@infradead.org, linux-arch@vger.kernel.org, geert+renesas@glider.be, arnd@arndb.de, linus.walleij@linaro.org, laurent.pinchart@ideasonboard.com, dan.j.williams@intel.com List-Id: iommu@lists.linux-foundation.org On Thu, May 19, 2016 at 01:29:26PM +0200, Niklas S=F6derlund wrote: > Hi Konrad, >=20 > Thanks for your feedback. >=20 > On 2016-05-17 10:54:45 -0400, Konrad Rzeszutek Wilk wrote: > > > =20 > > > -In some circumstances dma_map_single() and dma_map_page() will f= ail to create > > > -a mapping. A driver can check for these errors by testing the re= turned > > > -DMA address with dma_mapping_error(). A non-zero return value me= ans the mapping > > > -could not be created and the driver should take appropriate acti= on (e.g. > > > -reduce current DMA mapping usage or delay and try again later). > > > +In some circumstances dma_map_single(), dma_map_page() and dma_m= ap_resource() > > > +will fail to create a mapping. A driver can check for these erro= rs by testing > > > +the returned DMA address with dma_mapping_error(). A non-zero re= turn value > > > +means the mapping could not be created and the driver should tak= e appropriate > > > +action (e.g. reduce current DMA mapping usage or delay and try a= gain later). > >=20 > > This looks like it belongs to another patch? >=20 > No it is correct (at least intended to be in this patch). All it real= ly=20 > do is inject dma_map_resource() (which is added in this patch) as one= of=20 > the calls which return dma_addr_t should be checked for error using=20 > dma_mapping_error(). But yes the change effect all lines in the=20 > paragraph due to line wrapping. >=20 > Hum or maybe I'm misunderstanding your question. I totally missed the 'dma_map_resource' in there and just read 'dma_mapping_error'! Thanks. >=20 > --=20 > Regards, > Niklas S=F6derlund