xref: /titanic_41/usr/src/uts/common/sys/lvm/mhdx.x (revision 3db86aab554edbb4244c8d1a1c90f152eee768af)
1 %/*
2 % * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3 % * Use is subject to license terms.
4 % *
5 % * CDDL HEADER START
6 % *
7 % * The contents of this file are subject to the terms of the
8 % * Common Development and Distribution License, Version 1.0 only
9 % * (the "License").  You may not use this file except in compliance
10 % * with the License.
11 % *
12 % * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 % * or http://www.opensolaris.org/os/licensing.
14 % * See the License for the specific language governing permissions
15 % * and limitations under the License.
16 % *
17 % * When distributing Covered Code, include this CDDL HEADER in each
18 % * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 % * If applicable, add the following below this CDDL HEADER, with the
20 % * fields enclosed by brackets "[]" replaced with your own identifying
21 % * information: Portions Copyright [yyyy] [name of copyright owner]
22 % *
23 % * CDDL HEADER END
24 % */
25 %
26 %#pragma ident	"%Z%%M%	%I%	%E% SMI"
27 %
28 %/*
29 % * MH shadow structure for struct mhioctkown (sys/mhd.h)
30 % */
31 struct mhd_mhioctkown_t {
32 	int		reinstate_resv_delay;
33 	int		min_ownership_delay;
34 	int		max_ownership_delay;
35 };
36 
37 %
38 %/*
39 % * MH timeout values
40 % */
41 struct mhd_mhiargs_t {
42         int			mh_ff;
43         mhd_mhioctkown_t	mh_tk;
44 };
45 
46 %
47 %/*
48 % * controller info
49 % */
50 #ifdef RPC_HDR
51 %
52 %#define	METACTLRMAP	"/etc/lvm/md.ctlrmap"
53 %#define	META_SSA200_PID	"SSA200"
54 #endif	/* RPC_HDR */
55 enum mhd_ctlrtype_t {
56 	MHD_CTLR_GENERIC = 0,
57 	MHD_CTLR_SSA100,
58 	MHD_CTLR_SSA200
59 };
60 
61 struct mhd_cinfo_t {
62 	mhd_ctlrtype_t	mhc_ctype;	/* controller type */
63 	u_int		mhc_tray;	/* SSA100 tray */
64 	u_int		mhc_bus;	/* SSA100 bus */
65 	u_longlong_t	mhc_wwn;	/* SSA100 World Wide Name */
66 };
67 
68 %
69 %/*
70 % * unique drive identifier
71 % */
72 typedef	u_int	mhd_did_flags_t;
73 #ifdef RPC_HDR
74 %
75 %#define	MHD_DID_TIME		0x0001
76 %#define	MHD_DID_SERIAL		0x0002
77 %#define	MHD_DID_CINFO		0x0004
78 %#define	MHD_DID_DUPLICATE	0x0008
79 #endif	/* RPC_HDR */
80 typedef	char	mhd_serial_t[40];		/* SCSI VID+PID+REV+SERIAL */
81 struct mhd_drive_id_t {
82 	mhd_did_flags_t	did_flags;
83 	long		did_time;		/* vtoc timestamp (time_t) */
84 	mhd_serial_t	did_serial;		/* SCSI serial number */
85 	mhd_cinfo_t	did_cinfo;		/* controller info */
86 };
87 
88 %
89 %/*
90 % * drive identifier list
91 % */
92 struct mhd_drive_info_t {
93 	string		dif_name<>;
94 	mhd_drive_id_t	dif_id;
95 };
96 typedef	mhd_drive_info_t	mhd_drive_info_list_t<>;
97