4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
35 * Definitions for multi-host device I/O control commands
37 #define MHIOC ('M'<<8)
38 #define MHIOCENFAILFAST (MHIOC|1)
39 #define MHIOCTKOWN (MHIOC|2)
40 #define MHIOCRELEASE (MHIOC|3)
41 #define MHIOCSTATUS (MHIOC|4)
42 #define MHIOCGRP_INKEYS (MHIOC|5)
43 #define MHIOCGRP_INRESV (MHIOC|6)
44 #define MHIOCGRP_REGISTER (MHIOC|7)
45 #define MHIOCGRP_RESERVE (MHIOC|8)
46 #define MHIOCGRP_PREEMPTANDABORT (MHIOC|9)
47 #define MHIOCGRP_PREEMPT (MHIOC|10)
48 #define MHIOCGRP_CLEAR (MHIOC|11)
49 #define MHIOCGRP_REGISTERANDIGNOREKEY (MHIOC|14)
50 #define MHIOCQRESERVE (MHIOC|12)
51 #define MHIOCREREGISTERDEVID (MHIOC|13)
54 * Following is the structure to specify the delay parameters in
55 * milliseconds, via the MHIOCTKOWN ioctl.
58 int reinstate_resv_delay;
59 int min_ownership_delay;
60 int max_ownership_delay;
63 #define MHIOC_RESV_KEY_SIZE 8
64 typedef struct mhioc_resv_key {
65 uchar_t key[MHIOC_RESV_KEY_SIZE];
68 typedef struct mhioc_key_list {
71 mhioc_resv_key_t *list;
74 typedef struct mhioc_inkeys {
79 #if defined(_SYSCALL32)
80 struct mhioc_key_list32 {
86 struct mhioc_inkeys32 {
92 typedef struct mhioc_resv_desc {
96 uint32_t scope_specific_addr;
99 typedef struct mhioc_resv_desc_list {
102 mhioc_resv_desc_t *list;
103 } mhioc_resv_desc_list_t;
105 typedef struct mhioc_inresvs {
107 mhioc_resv_desc_list_t *li;
110 #if defined(_SYSCALL32)
111 struct mhioc_resv_desc_list32 {
115 } mhioc_resv_desc_list32_t;
117 typedef struct mhioc_inresvs32 {
123 typedef struct mhioc_register {
124 mhioc_resv_key_t oldkey;
125 mhioc_resv_key_t newkey;
126 boolean_t aptpl; /* True if persistent across power failures */
129 typedef struct mhioc_preemptandabort {
130 mhioc_resv_desc_t resvdesc;
131 mhioc_resv_key_t victim_key;
132 } mhioc_preemptandabort_t;
134 typedef struct mhioc_registerandignorekey {
135 mhioc_resv_key_t newkey;
136 boolean_t aptpl; /* True if persistent across power failures */
137 } mhioc_registerandignorekey_t;
140 * SCSI-3 PGR Reservation Type Codes. Codes with the _OBSOLETE suffix
141 * have been removed from the SCSI3 PGR standard.
143 #define SCSI3_RESV_READSHARED_OBSOLETE 0
144 #define SCSI3_RESV_WRITEEXCLUSIVE 1
145 #define SCSI3_RESV_READEXCLUSIVE_OBSOLETE 2
146 #define SCSI3_RESV_EXCLUSIVEACCESS 3
147 #define SCSI3_RESV_SHAREDACCESS_OBSOLETE 4
148 #define SCSI3_RESV_WRITEEXCLUSIVEREGISTRANTSONLY 5
149 #define SCSI3_RESV_EXCLUSIVEACCESSREGISTRANTSONLY 6
151 #define SCSI3_SCOPE_LOGICALUNIT 0
152 #define SCSI3_SCOPE_EXTENT_OBSOLETE 1
153 #define SCSI3_SCOPE_ELEMENT 2
159 #endif /* _SYS_MHD_H */