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/dev/twa/tw_cl_ioctl.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

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

Cache object: 48ccd120e2af7137e3c852e6c73e7a9e


[ 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.