fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
a2255df3e7bbadf7b06c76c8226a1f6f5bbc9e07Daniel Beauregard * Copyright 2009 QLogic Corporation. All rights reserved.
a2255df3e7bbadf7b06c76c8226a1f6f5bbc9e07Daniel Beauregard * Use is subject to license terms.
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * DMA memory object.
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * Container for ddi_dma_handle
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * These elements are either linked to an active dbuf or in the free list.
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * The dbuf private data when using a scatter/gather list.
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * Structure to maintain ddi_dma_handle free pool.
3fb517f786391b507780c78aabb8d98bfea9efe9James Mooretypedef struct qlt_dma_handle_pool qlt_dma_handle_pool_t;
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestmf_data_buf_t *qlt_dmem_alloc(fct_local_port_t *port, uint32_t size,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortestmf_data_buf_t *qlt_i_dmem_alloc(qlt_state_t *qlt, uint32_t size,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid qlt_dmem_free(fct_dbuf_store_t *fds, stmf_data_buf_t *dbuf);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid qlt_i_dmem_free(qlt_state_t *qlt, stmf_data_buf_t *dbuf);
3fb517f786391b507780c78aabb8d98bfea9efe9James Moorestmf_status_t qlt_dma_setup_dbuf(fct_local_port_t *port,
3fb517f786391b507780c78aabb8d98bfea9efe9James Moorevoid qlt_dma_teardown_dbuf(fct_dbuf_store_t *fds, stmf_data_buf_t *dbuf);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid qlt_dmem_dma_sync(stmf_data_buf_t *dbuf, uint_t sync_type);
3fb517f786391b507780c78aabb8d98bfea9efe9James Moore * XXX move the following into the fct layer
3fb517f786391b507780c78aabb8d98bfea9efe9James Mooreuint16_t qlt_get_cookie_count(stmf_data_buf_t *dbuf);
3fb517f786391b507780c78aabb8d98bfea9efe9James Moorevoid qlt_ddi_dma_nextcookie(stmf_data_buf_t *dbuf, ddi_dma_cookie_t *cookie_p);
3fb517f786391b507780c78aabb8d98bfea9efe9James Mooreddi_dma_cookie_t *qlt_get_cookie_array(stmf_data_buf_t *dbuf);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _QLT_DMA_H */