dm2s.h revision 25cf1a301a396c38e8adf52c15f537b80d2483f7
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER START
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * The contents of this file are subject to the terms of the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Common Development and Distribution License (the "License").
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You may not use this file except in compliance with the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * See the License for the specific language governing permissions
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * and limitations under the License.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * When distributing Covered Code, include this CDDL HEADER in each
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * If applicable, add the following below this CDDL HEADER, with the
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * fields enclosed by brackets "[]" replaced with your own identifying
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * information: Portions Copyright [yyyy] [name of copyright owner]
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * CDDL HEADER END
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Use is subject to license terms.
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#pragma ident "%Z%%M% %I% %E% SMI"
25cf1a301a396c38e8adf52c15f537b80d2483f7jlextern "C" {
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Instance structure.
25cf1a301a396c38e8adf52c15f537b80d2483f7jltypedef struct dm2s {
25cf1a301a396c38e8adf52c15f537b80d2483f7jl ddi_iblock_cookie_t ms_ibcookie; /* Interrupt block cookie */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl timeout_id_t ms_rq_timeoutid; /* Timeout id for read queue */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl timeout_id_t ms_wq_timeoutid; /* Timeout id for write queue */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl mscat_gath_t ms_sg_tx[DM2S_MAX_SG]; /* scatter-gather for Tx */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl/* ms_state flags */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#define DM2S_MB_INITED 0x00000001 /* Mailbox initialized */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#define DM2S_MB_CONN 0x00000002 /* Mailbox in connected state */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#define DM2S_MB_DISC 0x00000004 /* Mailbox is disconnected */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl/* ms_clean flags */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl * Debug levels
25cf1a301a396c38e8adf52c15f537b80d2483f7jlstatic void dm2s_dump_bytes(char *str, uint32_t total_len,
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#define DMPBYTES(s, l, n, sg) dm2s_dump_bytes(s, l, n, sg)
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#else /* DEBUG */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#define DPRINTF(f, x)
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#endif /* DEBUG */
25cf1a301a396c38e8adf52c15f537b80d2483f7jl#endif /* _DDM2S_H */