xref: /illumos-gate/usr/src/cmd/luxadm/hot.h (revision fcf3ce44)
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  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * PHOTON CONFIGURATION MANAGER
28  * Common definitions
29  */
30 
31 /*
32  * I18N message number ranges
33  *  This file: 13000 - 13499
34  *  Shared common messages: 1 - 1999
35  */
36 
37 #ifndef	_HOT_H
38 #define	_HOT_H
39 
40 
41 
42 
43 /*
44  * Include any headers you depend on.
45  */
46 
47 #ifdef	__cplusplus
48 extern "C" {
49 #endif
50 
51 
52 #define	NODE_CREATION_TIME	60	/* # seconds */
53 /*
54  * Version 0.16 of the SES firmware powers up disks in front/back pairs.
55  * However, the first disk inserted is usually spun up by itself, so
56  * we need to calculate a timeout for 22/2 + 1 = 12 disks.
57  *
58  * Measured times are about 40s/disk for a total of 40*12=8 min total
59  * The timeout assumes 10s/iteration or 4*12*10=8 min
60  */
61 #define	PHOTON_SPINUP_TIMEOUT	(4*12)
62 #define	PHOTON_SPINUP_DELAY	10
63 
64 #define	QLC_LIP_DELAY		17
65 
66 #define		TARGET_ID(box_id, f_r, slot)    \
67 		((box_id | ((f_r == 'f' ? 0 : 1) << 4)) | (slot + 2))
68 
69 #define		NEWER(time1, time2) 	(time1.tv_sec > time2.tv_sec)
70 
71 extern	int	Options;
72 
73 
74 #ifdef	__cplusplus
75 }
76 #endif
77 
78 #endif	/* _HOT_H */
79