6811333 Remove prom_printf() message in emlxs driver
[opensolaris.git] / usr / src / uts / common / sys / raidioctl.h
blobf08daa440c30cd5c3292734b649669d122916044
1 /*
2 * CDDL HEADER START
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
7 * with the License.
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]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_RAIDIOCTL_H
28 #define _SYS_RAIDIOCTL_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
37 * map ioctls
39 #define RAID_IOC (('R' << 16) | ('D' << 8))
40 #define RAID_GETCONFIG (RAID_IOC|1) /* Get raid information */
41 #define RAID_CREATE (RAID_IOC|2) /* Create raid mirror */
42 #define RAID_DELETE (RAID_IOC|3) /* Delete raid mirror */
43 #define RAID_UPDATEFW (RAID_IOC|4) /* Update IOC firmware */
44 #define RAID_GETDEVID (RAID_IOC|5) /* Retrieve devid of chip */
45 #define RAID_NUMVOLUMES (RAID_IOC|6) /* Retrieve max RAID volumes */
48 * define raid status flags
50 #define RAID_FLAG_ENABLED 0x01
51 #define RAID_FLAG_QUIESCED 0x02
52 #define RAID_FLAG_RESYNCING 0x04
53 #define RAID_STATE_OPTIMAL 0x00
54 #define RAID_STATE_DEGRADED 0x01
55 #define RAID_STATE_FAILED 0x02
58 * define disk status flags
60 #define RAID_DISKSTATUS_GOOD 0x0
61 #define RAID_DISKSTATUS_FAILED 0x1
62 #define RAID_DISKSTATUS_MISSING 0x2
65 * maximum number of disks allowed in a raid volume
67 #define RAID_MAXDISKS 32
69 typedef struct raid_config {
70 int targetid;
71 uint8_t state;
72 uint8_t flags;
73 int raid_level;
74 int ndisks;
75 int disk[RAID_MAXDISKS];
76 int diskstatus[RAID_MAXDISKS];
77 diskaddr_t raid_capacity;
78 int unitid;
79 } raid_config_t;
82 * Defines for type
84 #define FW_TYPE_UCODE 0x1;
85 #define FW_TYPE_FCODE 0x2;
87 typedef struct update_flash {
88 caddr_t ptrbuffer;
89 uint_t size;
90 uint8_t type;
91 } update_flash_t;
93 #if defined(_SYSCALL32)
94 typedef struct update_flash_32 {
95 caddr32_t ptrbuffer;
96 uint32_t size;
97 uint8_t type;
98 } update_flash_32_t;
99 #endif
101 #ifdef __cplusplus
103 #endif
105 #endif /* _SYS_RAIDIOCTL_H */