busdma_bounce.c (170086) | busdma_bounce.c (170564) |
---|---|
1/*- 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1997, 1998 Justin T. Gibbs. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/i386/i386/busdma_machdep.c 170086 2007-05-29 06:30:26Z yongari $"); | 28__FBSDID("$FreeBSD: head/sys/i386/i386/busdma_machdep.c 170564 2007-06-11 17:57:24Z mjacob $"); |
29 30#include <sys/param.h> 31#include <sys/kdb.h> 32#include <ddb/ddb.h> 33#include <ddb/db_output.h> 34#include <sys/systm.h> 35#include <sys/malloc.h> 36#include <sys/bus.h> --- 183 unchanged lines hidden (view full) --- 220{ 221 bus_dma_tag_t newtag; 222 int error = 0; 223 224 /* Basic sanity checking */ 225 if (boundary != 0 && boundary < maxsegsz) 226 maxsegsz = boundary; 227 | 29 30#include <sys/param.h> 31#include <sys/kdb.h> 32#include <ddb/ddb.h> 33#include <ddb/db_output.h> 34#include <sys/systm.h> 35#include <sys/malloc.h> 36#include <sys/bus.h> --- 183 unchanged lines hidden (view full) --- 220{ 221 bus_dma_tag_t newtag; 222 int error = 0; 223 224 /* Basic sanity checking */ 225 if (boundary != 0 && boundary < maxsegsz) 226 maxsegsz = boundary; 227 |
228 if (maxsegsz == 0) { 229 return (EINVAL); 230 } 231 |
|
228 /* Return a NULL tag on failure */ 229 *dmat = NULL; 230 231 newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, 232 M_ZERO | M_NOWAIT); 233 if (newtag == NULL) { 234 CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", 235 __func__, newtag, 0, error); --- 961 unchanged lines hidden --- | 232 /* Return a NULL tag on failure */ 233 *dmat = NULL; 234 235 newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_DEVBUF, 236 M_ZERO | M_NOWAIT); 237 if (newtag == NULL) { 238 CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", 239 __func__, newtag, 0, error); --- 961 unchanged lines hidden --- |