dma-attrs.h revision 289644
11590Srgrimes/*-
21590Srgrimes * Copyright (c) 2010 Isilon Systems, Inc.
31590Srgrimes * Copyright (c) 2010 iX Systems, Inc.
41590Srgrimes * Copyright (c) 2010 Panasas, Inc.
51590Srgrimes * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
61590Srgrimes * All rights reserved.
71590Srgrimes *
81590Srgrimes * Redistribution and use in source and binary forms, with or without
91590Srgrimes * modification, are permitted provided that the following conditions
101590Srgrimes * are met:
111590Srgrimes * 1. Redistributions of source code must retain the above copyright
121590Srgrimes *    notice unmodified, this list of conditions, and the following
131590Srgrimes *    disclaimer.
141590Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
151590Srgrimes *    notice, this list of conditions and the following disclaimer in the
161590Srgrimes *    documentation and/or other materials provided with the distribution.
171590Srgrimes *
181590Srgrimes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
191590Srgrimes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
201590Srgrimes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
211590Srgrimes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
221590Srgrimes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
231590Srgrimes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
241590Srgrimes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
251590Srgrimes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
261590Srgrimes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
271590Srgrimes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
281590Srgrimes *
291590Srgrimes * $FreeBSD: head/sys/ofed/include/linux/dma-attrs.h 289644 2015-10-20 19:08:26Z hselasky $
301590Srgrimes */
311590Srgrimes#ifndef	_LINUX_DMA_ATTR_H_
321590Srgrimes#define	_LINUX_DMA_ATTR_H_
331590Srgrimes
341590Srgrimesenum dma_attr { DMA_ATTR_WRITE_BARRIER, DMA_ATTR_WEAK_ORDERING, DMA_ATTR_MAX, };
351590Srgrimes
361590Srgrimes#define __DMA_ATTRS_LONGS BITS_TO_LONGS(DMA_ATTR_MAX)
3787628Sdwmalone
3887628Sdwmalonestruct dma_attrs {
3987628Sdwmalone	unsigned long flags;
4087628Sdwmalone};
4187628Sdwmalone
4287628Sdwmalone#define DEFINE_DMA_ATTRS(x) struct dma_attrs x = { }
4387231Smarkm
4487231Smarkmstatic inline void
4587231Smarkminit_dma_attrs(struct dma_attrs *attrs)
4667189Sbrian{
471590Srgrimes	attrs->flags = 0;
481590Srgrimes}
491590Srgrimes
501590Srgrimes#endif	/* _LINUX_DMA_ATTR_H_ */
511590Srgrimes