xref: /titanic_52/usr/src/uts/common/sys/ib/clients/of/ofa_solaris.h (revision c39526b769298791ff5b0b6c5e761f49aabaeb4e)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
24  */
25 
26 /*
27  *
28  * NAME: ofa_solaris.h
29  *
30  * DESC: OFED Solaris wrapper
31  *
32  */
33 #ifndef _SYS_IB_CLIENTS_OFA_SOLARIS_H
34 #define	_SYS_IB_CLIENTS_OFA_SOLARIS_H
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #ifdef _KERNEL
41 
42 #include <sys/types.h>
43 #include <sys/byteorder.h>
44 
45 typedef struct ofv_resp_addr_t {
46 	union {
47 		uint64_t	_r_ll;
48 		uint32_t	_r_la[2];
49 	} _resp_un;
50 } ofv_resp_addr_t;
51 
52 #define	r_laddr		_resp_un._r_ll
53 #ifdef	_LONG_LONG_HTOL
54 #define	r_notused	_resp_un._r_la[0]
55 #define	r_addr		_resp_un._r_la[1]
56 #else
57 #define	r_addr		_resp_un._r_la[0]
58 #define	r_notused	_resp_un._r_la[1]
59 #endif	/* _LONG_LONG_HTOL */
60 
61 #endif /* _KERNEL */
62 
63 #ifdef __cplusplus
64 }
65 #endif
66 
67 #endif /* _SYS_IB_CLIENTS_OFA_SOLARIS_H */
68