1 /*
2 * Copyright (c) 2004-05 Applied Micro Circuits Corporation.
3 * Copyright (c) 2004-05 Vinod Kashyap
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $FreeBSD: releng/6.0/sys/dev/twa/tw_cl_ioctl.h 144966 2005-04-12 22:07:11Z vkashyap $
28 */
29
30 /*
31 * AMCC'S 3ware driver for 9000 series storage controllers.
32 *
33 * Author: Vinod Kashyap
34 */
35
36
37
38 #ifndef TW_CL_IOCTL_H
39
40 #define TW_CL_IOCTL_H
41
42
43 /*
44 * Macros and structures for Common Layer handled ioctls.
45 */
46
47
48 #define TW_CL_AEN_NOT_RETRIEVED 0x1
49 #define TW_CL_AEN_RETRIEVED 0x2
50
51 #define TW_CL_ERROR_AEN_NO_EVENTS 0x1003 /* No more events */
52 #define TW_CL_ERROR_AEN_OVERFLOW 0x1004 /* AEN overflow occurred */
53
54 #define TW_CL_ERROR_IOCTL_LOCK_NOT_HELD 0x1001 /* Not locked */
55 #define TW_CL_ERROR_IOCTL_LOCK_ALREADY_HELD 0x1002 /* Already locked */
56
57
58 #pragma pack(1)
59
60 /* Structure used to handle GET/RELEASE LOCK ioctls. */
61 struct tw_cl_lock_packet {
62 TW_UINT32 timeout_msec;
63 TW_UINT32 time_remaining_msec;
64 TW_UINT32 force_flag;
65 };
66
67
68 /* Structure used to handle GET COMPATIBILITY INFO ioctl. */
69 struct tw_cl_compatibility_packet {
70 TW_UINT8 driver_version[32];/* driver version */
71 TW_UINT16 working_srl; /* driver & firmware negotiated srl */
72 TW_UINT16 working_branch; /* branch # of the firmware that the
73 driver is compatible with */
74 TW_UINT16 working_build; /* build # of the firmware that the
75 driver is compatible with */
76 };
77
78
79 /* Driver understandable part of the ioctl packet built by the API. */
80 struct tw_cl_driver_packet {
81 TW_UINT32 control_code;
82 TW_UINT32 status;
83 TW_UINT32 unique_id;
84 TW_UINT32 sequence_id;
85 TW_UINT32 os_status;
86 TW_UINT32 buffer_length;
87 };
88
89
90 /* ioctl packet built by the API. */
91 struct tw_cl_ioctl_packet {
92 struct tw_cl_driver_packet driver_pkt;
93 TW_INT8 padding[488];
94 struct tw_cl_command_packet cmd_pkt;
95 TW_INT8 data_buf[1];
96 };
97
98 #pragma pack()
99
100
101
102 #endif /* TW_CL_IOCTL_H */
Cache object: e53989c15b5eb1c0c4861e3446929539
|