1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _DM_TYPES_H 28 #define _DM_TYPES_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * Common types for the disk monitor 34 */ 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 #include <sys/types.h> 41 42 #define NSEC_PER_POLL_POSITION 250000000UL /* 0.25 of a second */ 43 44 typedef enum { 45 HPS_UNKNOWN = 0x0000, 46 HPS_ABSENT = 0x0001, 47 HPS_PRESENT = 0x0002, 48 HPS_UNCONFIGURED = 0x0003, 49 HPS_CONFIGURED = 0x0004, 50 HPS_FAULTED = 0x1000, /* This state can be OR'ed in */ 51 HPS_REPAIRED = 0x2000 52 } hotplug_state_t; 53 54 typedef struct { 55 /* 56 * Each field is the size of the corresponding field in the scsi 57 * inquiry structure + 1 byte for the terminating NUL. 58 */ 59 char manuf[9]; /* 8 characters */ 60 char model[33]; /* 32 characters to fo ATA ident$ */ 61 char rev[9]; /* 8 characters */ 62 /* 63 * SCSI Serial number is 12 bytes from the main INQUIRY 64 * page, but it may be longer in the Unit Serial Number 65 * VPD page, so save space for up to 20 bytes of it (ATA 66 * serial numbers may be up to 20-bytes long). 67 */ 68 char serial[21]; 69 uint64_t size_in_bytes; 70 } dm_fru_t; 71 72 #ifdef __cplusplus 73 } 74 #endif 75 76 #endif /* _DM_TYPES_H */ 77