2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
6 * Copyright 2005-06 Adaptec, Inc.
7 * Copyright (c) 2005-06 Adaptec Inc., Achim Leubner
8 * Copyright (c) 2000 Michael Smith
9 * Copyright (c) 2000 Scott Long
10 * Copyright (c) 2000 BSDi
11 * All rights reserved.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
23 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
26 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * $FreeBSD: /repoman/r/ncvs/src/sys/sys/aac_ioctl.h,
35 * v 1.11 2004/12/09 22:20:25 scottl Exp $
49 /* Macro definitions for IOCTL function control codes */
50 #define CTL_CODE(function, method) \
51 ((4<< 16) | ((function) << 2) | (method))
53 /* Method codes for how buffers are passed for I/O and FS controls */
54 #define METHOD_BUFFERED 0
55 #define METHOD_NEITHER 3
58 #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED)
59 #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED)
60 #define FSACTL_DELETE_DISK 0x163
61 #define FSACTL_QUERY_DISK 0x173
62 #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED)
63 #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED)
64 #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED)
65 #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED)
66 #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED)
67 #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER)
68 #define FSACTL_REGISTER_FIB_SEND CTL_CODE(2136, METHOD_BUFFERED)
69 #define FSACTL_GET_CONTAINERS 2131
70 #define FSACTL_GET_VERSION_MATCHING CTL_CODE(2137, METHOD_BUFFERED)
71 #define FSACTL_SEND_LARGE_FIB CTL_CODE(2138, METHOD_BUFFERED)
72 #define FSACTL_GET_FEATURES CTL_CODE(2139, METHOD_BUFFERED)
83 struct aac_get_adapter_fib
87 uint32_t aif_fib
; /* RAID config app is 32bit */
95 struct aac_query_disk
{
104 char disk_device_name
[10];
108 struct aac_delete_disk
{
110 int32_t container_no
;
114 * The following definitions come from Adaptec:
118 uint32_t largeLBA
: 1; /* disk support greater 2TB */
119 uint32_t IoctlBuf
: 1; /* ARCIOCTL call support */
120 uint32_t AIFSupport
: 1; /* AIF support */
121 uint32_t JBODSupport
:1; /* firmware+driver both support JBOD */
122 uint32_t fReserved
: 28;
127 struct aac_features
{
130 uint32_t reserved
[32];
136 * Aligned structure definitions for variable declarations that require
139 * Normally the packed structures are defined in a way that if the initial
140 * member is aligned, then the following members will also be aligned. So
141 * we need only to make sure the packed structure, ie. the first member, is
142 * aligned to satisfy alignment requirement.
144 union aac_revision_align
{
145 struct aac_revision d
;
149 union aac_get_adapter_fib_align
{
150 struct aac_get_adapter_fib d
;
154 union aac_pci_info_align
{
155 struct aac_pci_info d
;
159 union aac_query_disk_align
{
160 struct aac_query_disk d
;
164 union aac_delete_disk_align
{
165 struct aac_delete_disk d
;
169 union aac_features_align
{
170 struct aac_features d
;
178 #endif /* _AAC_IOCTL_H_ */