The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/aac_ioctl.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
    3  *
    4  * Copyright (c) 2000 Michael Smith
    5  * Copyright (c) 2000 Scott Long
    6  * Copyright (c) 2000 BSDi
    7  * All rights reserved.
    8  *
    9  * Redistribution and use in source and binary forms, with or without
   10  * modification, are permitted provided that the following conditions
   11  * are met:
   12  * 1. Redistributions of source code must retain the above copyright
   13  *    notice, this list of conditions and the following disclaimer.
   14  * 2. Redistributions in binary form must reproduce the above copyright
   15  *    notice, this list of conditions and the following disclaimer in the
   16  *    documentation and/or other materials provided with the distribution.
   17  *
   18  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
   19  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   21  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   22  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   23  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   24  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   25  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   26  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   27  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   28  * SUCH DAMAGE.
   29  *
   30  *      $FreeBSD$
   31  */
   32 
   33 /*
   34  * Command queue statistics
   35  */
   36 #define AACQ_FREE       0
   37 #define AACQ_BIO        1
   38 #define AACQ_READY      2
   39 #define AACQ_BUSY       3
   40 #define AACQ_COUNT      4       /* total number of queues */
   41 
   42 struct aac_qstat {
   43         u_int32_t       q_length;
   44         u_int32_t       q_max;
   45 };
   46 
   47 /*
   48  * Statistics request
   49  */
   50 union aac_statrequest {
   51         u_int32_t               as_item;
   52         struct aac_qstat        as_qstat;
   53 };
   54 
   55 #define AACIO_STATS             _IOWR('T', 101, union aac_statrequest)
   56 
   57 /*
   58  * Ioctl commands likely to be submitted from a Linux management application.
   59  * These bit encodings are actually descended from Windows NT.  Ick.
   60  */
   61 
   62 #define CTL_CODE(devType, func, meth, acc) (((devType) << 16) | ((acc) << 14) | ((func) << 2) | (meth))
   63 #define METHOD_BUFFERED                 0
   64 #define METHOD_IN_DIRECT                1
   65 #define METHOD_OUT_DIRECT               2
   66 #define METHOD_NEITHER                  3
   67 #define FILE_ANY_ACCESS                 0
   68 #define FILE_READ_ACCESS                ( 0x0001 )
   69 #define FILE_WRITE_ACCESS               ( 0x0002 )
   70 #define FILE_DEVICE_CONTROLLER          0x00000004
   71 
   72 #define FSACTL_LNX_SENDFIB              CTL_CODE(FILE_DEVICE_CONTROLLER, 2050, \
   73                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   74 #define FSACTL_LNX_SEND_RAW_SRB         CTL_CODE(FILE_DEVICE_CONTROLLER, 2067, \
   75                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   76 #define FSACTL_LNX_GET_COMM_PERF_DATA   CTL_CODE(FILE_DEVICE_CONTROLLER, 2084, \
   77                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   78 #define FSACTL_LNX_OPENCLS_COMM_PERF_DATA CTL_CODE(FILE_DEVICE_CONTROLLER, \
   79                                         2085, METHOD_BUFFERED, FILE_ANY_ACCESS)
   80 #define FSACTL_LNX_OPEN_GET_ADAPTER_FIB CTL_CODE(FILE_DEVICE_CONTROLLER, 2100, \
   81                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   82 #define FSACTL_LNX_GET_NEXT_ADAPTER_FIB CTL_CODE(FILE_DEVICE_CONTROLLER, 2101, \
   83                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   84 #define FSACTL_LNX_CLOSE_GET_ADAPTER_FIB CTL_CODE(FILE_DEVICE_CONTROLLER, \
   85                                         2102, METHOD_BUFFERED, FILE_ANY_ACCESS)
   86 #define FSACTL_LNX_CLOSE_ADAPTER_CONFIG CTL_CODE(FILE_DEVICE_CONTROLLER, 2104, \
   87                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   88 #define FSACTL_LNX_OPEN_ADAPTER_CONFIG  CTL_CODE(FILE_DEVICE_CONTROLLER, 2105, \
   89                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   90 #define FSACTL_LNX_MINIPORT_REV_CHECK   CTL_CODE(FILE_DEVICE_CONTROLLER, 2107, \
   91                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   92 #define FSACTL_LNX_QUERY_ADAPTER_CONFIG CTL_CODE(FILE_DEVICE_CONTROLLER, 2113, \
   93                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   94 #define FSACTL_LNX_GET_PCI_INFO         CTL_CODE(FILE_DEVICE_CONTROLLER, 2119, \
   95                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
   96 #define FSACTL_LNX_FORCE_DELETE_DISK    CTL_CODE(FILE_DEVICE_CONTROLLER, 2120, \
   97                                         METHOD_NEITHER, FILE_ANY_ACCESS)
   98 #define FSACTL_LNX_AIF_THREAD           CTL_CODE(FILE_DEVICE_CONTROLLER, 2127, \
   99                                         METHOD_NEITHER, FILE_ANY_ACCESS)
  100 #define FSACTL_LNX_SEND_LARGE_FIB       CTL_CODE(FILE_DEVICE_CONTROLLER, 2138, \
  101                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
  102 #define FSACTL_LNX_GET_FEATURES         CTL_CODE(FILE_DEVICE_CONTROLLER, 2139, \
  103                                         METHOD_BUFFERED, FILE_ANY_ACCESS)
  104 
  105 /* Why these don't follow the previous convention, I don't know */
  106 #define FSACTL_LNX_NULL_IO_TEST         0x43
  107 #define FSACTL_LNX_SIM_IO_TEST          0x53
  108 #define FSACTL_LNX_DOWNLOAD             0x83
  109 #define FSACTL_LNX_GET_VAR              0x93
  110 #define FSACTL_LNX_SET_VAR              0xa3
  111 #define FSACTL_LNX_GET_FIBTIMES         0xb3
  112 #define FSACTL_LNX_ZERO_FIBTIMES        0xc3
  113 #define FSACTL_LNX_DELETE_DISK          0x163
  114 #define FSACTL_LNX_QUERY_DISK           0x173
  115 
  116 /* Ok, here it gets really lame */
  117 #define FSACTL_LNX_PROBE_CONTAINERS     2131    /* Just guessing */
  118 
  119 /* Do the native version of the ioctls.  Since the BSD encoding scheme
  120  * conflicts with the 'standard' AAC encoding scheme, the resulting numbers
  121  * will be different.  The '8' comes from the fact that the previous scheme
  122  * used 12 bits for the number, with the 12th bit being the only set
  123  * bit above bit 8.  Thus the value of 8, with the lower 8 bits holding the
  124  * command number.  9 is used for the odd overflow case.
  125  */
  126 #define FSACTL_SENDFIB                  _IO('8', 2)
  127 #define FSACTL_SEND_RAW_SRB             _IO('8', 19)
  128 #define FSACTL_GET_COMM_PERF_DATA       _IO('8', 36)
  129 #define FSACTL_OPENCLS_COMM_PERF_DATA   _IO('8', 37)
  130 #define FSACTL_OPEN_GET_ADAPTER_FIB     _IO('8', 52)
  131 #define FSACTL_GET_NEXT_ADAPTER_FIB     _IO('8', 53)
  132 #define FSACTL_CLOSE_GET_ADAPTER_FIB    _IO('8', 54)
  133 #define FSACTL_CLOSE_ADAPTER_CONFIG     _IO('8', 56)
  134 #define FSACTL_OPEN_ADAPTER_CONFIG      _IO('8', 57)
  135 #define FSACTL_MINIPORT_REV_CHECK       _IO('8', 59)
  136 #define FSACTL_QUERY_ADAPTER_CONFIG     _IO('8', 65)
  137 #define FSACTL_GET_PCI_INFO             _IO('8', 71)
  138 #define FSACTL_FORCE_DELETE_DISK        _IO('8', 72)
  139 #define FSACTL_AIF_THREAD               _IO('8', 79)
  140 #define FSACTL_SEND_LARGE_FIB           _IO('8', 90)
  141 #define FSACTL_GET_FEATURES             _IO('8', 91)
  142 
  143 #define FSACTL_NULL_IO_TEST             _IO('8', 67)
  144 #define FSACTL_SIM_IO_TEST              _IO('8', 83)
  145 #define FSACTL_DOWNLOAD                 _IO('8', 131)
  146 #define FSACTL_GET_VAR                  _IO('8', 147)
  147 #define FSACTL_SET_VAR                  _IO('8', 163)
  148 #define FSACTL_GET_FIBTIMES             _IO('8', 179)
  149 #define FSACTL_ZERO_FIBTIMES            _IO('8', 195)
  150 #define FSACTL_DELETE_DISK              _IO('8', 99)
  151 #define FSACTL_QUERY_DISK               _IO('9', 115)
  152 
  153 #define FSACTL_PROBE_CONTAINERS         _IO('9', 83)    /* Just guessing */
  154 
  155 #ifdef _KERNEL
  156 /*
  157  * Support for faking the "miniport" version.
  158  */
  159 struct aac_rev_check {
  160         RevComponent            callingComponent;
  161         struct FsaRevision      callingRevision;
  162 };
  163 
  164 struct aac_rev_check_resp {
  165         int                     possiblyCompatible;
  166         struct FsaRevision      adapterSWRevision;
  167 };
  168 
  169 /*
  170  * Context passed in by a consumer looking to collect an AIF.
  171  */
  172 struct get_adapter_fib_ioctl {
  173         u_int32_t       AdapterFibContext;
  174         int             Wait;
  175         caddr_t         AifFib;
  176 };
  177 
  178 #ifdef _KERNEL
  179 struct get_adapter_fib_ioctl32 {
  180         u_int32_t       AdapterFibContext;
  181         int             Wait;
  182         u_int32_t       AifFib;
  183 };
  184 #endif
  185 
  186 struct aac_query_disk {
  187         int32_t         ContainerNumber;
  188         int32_t         Bus;
  189         int32_t         Target;
  190         int32_t         Lun;
  191         u_int32_t       Valid;
  192         u_int32_t       Locked;
  193         u_int32_t       Deleted;
  194         int32_t         Instance;
  195         char            diskDeviceName[10];
  196         u_int32_t       UnMapped;
  197 };
  198 
  199 /* Features, asked from the tools to know if the driver
  200  * supports drives >2TB
  201  */
  202 typedef union {
  203         struct {
  204                 u_int32_t largeLBA  : 1;        /* disk support greater 2TB */
  205                 u_int32_t IoctlBuf  : 1;        /* ARCIOCTL call support */
  206                 u_int32_t AIFSupport: 1;        /* AIF support */
  207                 u_int32_t JBODSupport:1;        /* fw + driver support JBOD */
  208                 u_int32_t fReserved : 28;
  209         } fBits;
  210         u_int32_t fValue;
  211 } featuresState;
  212 
  213 struct aac_features {
  214         featuresState feat;
  215         u_int32_t data[31];
  216         u_int32_t reserved[32];
  217 } __packed;
  218 #endif

Cache object: fc94ca08e15c497c7bccd254c0ddb7c2


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.