1/*-
2 * Copyright (C) 2012 Emulex
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 are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
--- 22 unchanged lines hidden (view full) ---
31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
39
40/* $FreeBSD: head/sys/dev/oce/oce_util.c 247880 2013-03-06 09:53:38Z delphij $ */
41
42
43#include "oce_if.h"
44
45static void oce_dma_map_ring(void *arg,
46 bus_dma_segment_t *segs,
47 int nseg,
48 int error);
49
50/**
--- 17 unchanged lines hidden (view full) ---
68 BUS_SPACE_MAXADDR,
69 BUS_SPACE_MAXADDR,
70 NULL, NULL,
71 size, 1, size, 0, NULL, NULL, &dma->tag);
72
73 if (rc == 0) {
74 rc = bus_dmamem_alloc(dma->tag,
75 &dma->ptr,
76 BUS_DMA_NOWAIT | BUS_DMA_COHERENT |
77 BUS_DMA_ZERO,
78 &dma->map);
79 }
80
81 dma->paddr = 0;
82 if (rc == 0) {
83 rc = bus_dmamap_load(dma->tag,
84 dma->map,
85 dma->ptr,
--- 186 unchanged lines hidden ---
2 * Copyright (C) 2012 Emulex
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 are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice,
--- 22 unchanged lines hidden (view full) ---
31 * Contact Information:
32 * freebsd-drivers@emulex.com
33 *
34 * Emulex
35 * 3333 Susan Street
36 * Costa Mesa, CA 92626
37 */
38
39
40/* $FreeBSD: head/sys/dev/oce/oce_util.c 247880 2013-03-06 09:53:38Z delphij $ */
41
42
43#include "oce_if.h"
44
45static void oce_dma_map_ring(void *arg,
46 bus_dma_segment_t *segs,
47 int nseg,
48 int error);
49
50/**
--- 17 unchanged lines hidden (view full) ---
68 BUS_SPACE_MAXADDR,
69 BUS_SPACE_MAXADDR,
70 NULL, NULL,
71 size, 1, size, 0, NULL, NULL, &dma->tag);
72
73 if (rc == 0) {
74 rc = bus_dmamem_alloc(dma->tag,
75 &dma->ptr,
76 BUS_DMA_NOWAIT | BUS_DMA_COHERENT |
77 BUS_DMA_ZERO,
78 &dma->map);
79 }
80
81 dma->paddr = 0;
82 if (rc == 0) {
83 rc = bus_dmamap_load(dma->tag,
84 dma->map,
85 dma->ptr,
--- 186 unchanged lines hidden ---