Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2016 14:50:14 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Jared McNeill <jmcneill@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r302592 - head/sys/arm/allwinner
Message-ID:  <1468270214.72182.126.camel@freebsd.org>
In-Reply-To: <201607112014.u6BKEpbH057588@repo.freebsd.org>
References:  <201607112014.u6BKEpbH057588@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2016-07-11 at 20:14 +0000, Jared McNeill wrote:
> Author: jmcneill
> Date: Mon Jul 11 20:14:50 2016
> New Revision: 302592
> URL: https://svnweb.freebsd.org/changeset/base/302592
> 
> Log:
>   Return early from bus_dmamap_load callback if the error indicator
> is set.
>   
>   Reviewed by:	andrew, manu
> 
> Modified:
>   head/sys/arm/allwinner/a10_mmc.c
> 
> Modified: head/sys/arm/allwinner/a10_mmc.c
> =====================================================================
> =========
> --- head/sys/arm/allwinner/a10_mmc.c	Mon Jul 11 20:13:46 2016	
> (r302591)
> +++ head/sys/arm/allwinner/a10_mmc.c	Mon Jul 11 20:14:50 2016	
> (r302592)
> @@ -364,6 +364,10 @@ a10_dma_cb(void *arg, bus_dma_segment_t 
>  
>  	sc = (struct a10_mmc_softc *)arg;
>  	sc->a10_dma_map_err = err;
> +
> +	if (err)
> +		return;
> +
>  	dma_desc = sc->a10_dma_desc;
>  	/* Note nsegs is guaranteed to be zero if err is non-zero.
> */
>  	for (i = 0; i < nsegs; i++) {
> 

The comment about nsegs g'teed to be zero is now rather moot.  That
comment may have been copied from code I wrote long ago.  I think the
comment is true of the armv4/6 implementations, but it doesn't appear
to be a g'tee made by the busdma manpage.

-- Ian




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