Print this page
OS-1996 mpt_sas: allow physical topology enumeration in libtopo
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/fm/topo/modules/common/disk/disk.h
+++ new/usr/src/lib/fm/topo/modules/common/disk/disk.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 */
25 +/*
26 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
27 + */
25 28
26 29 #ifndef _DISK_H
27 30 #define _DISK_H
28 31
29 32 #include <fm/topo_mod.h>
30 33 #include <libdevinfo.h>
31 34
32 35 #ifdef __cplusplus
33 36 extern "C" {
34 37 #endif
35 38
36 39 /* Topo plugin version */
37 40 #define DISK_VERSION TOPO_VERSION
38 41
39 42 /* Max. number of devices for thumper */
40 43 #define DEVID_MAX 48
41 44
42 45 /* Properties added to the "storage" pgroup: */
43 46 #define TOPO_PGROUP_STORAGE "storage"
44 47 #define TOPO_STORAGE_LOGICAL_DISK_NAME "logical-disk"
45 48 #define TOPO_STORAGE_MODEL "model"
46 49 #define TOPO_STORAGE_MANUFACTURER "manufacturer"
↓ open down ↓ |
12 lines elided |
↑ open up ↑ |
47 50 #define TOPO_STORAGE_SERIAL_NUM "serial-number"
48 51 #define TOPO_STORAGE_FIRMWARE_REV "firmware-revision"
49 52 #define TOPO_STORAGE_CAPACITY "capacity-in-bytes"
50 53
51 54 /*
52 55 * Properties for binding group: The binding group required in platform
53 56 * specific xml that describes 'bay' nodes containing internal disks.
54 57 */
55 58 #define TOPO_PGROUP_BINDING "binding"
56 59 #define TOPO_BINDING_OCCUPANT "occupant-path"
60 +#define TOPO_BINDING_DRIVER "driver"
61 +
62 +/*
63 + * The binding group required in platform specific xml that describes 'bay'
64 + * nodes containing disks attached to an HBA using the 'mpt_sas' driver.
65 + */
66 +#define TOPO_BINDING_DEVCTL "devctl"
67 +#define TOPO_BINDING_ENCLOSURE "enclosure"
68 +#define TOPO_BINDING_SLOT "slot"
57 69
58 70 /*
59 71 * device node information.
60 72 */
61 73 typedef struct dev_di_node {
62 74 topo_list_t ddn_list; /* list of devices */
63 75
64 76 /* the following two fields are always defined */
65 77 char *ddn_devid; /* devid of device */
66 78 char *ddn_dpath; /* path to devinfo (may be vhci) */
67 79 char **ddn_ppath; /* physical path to device (phci) */
68 80 /*
69 81 * the ppath count also indicates number of target port and
70 82 * possible number of attached port and bridge port.
71 83 */
72 84 int ddn_ppath_count;
73 85
74 86 char *ddn_lpath; /* logical path (public /dev name) */
75 87
76 88 char *ddn_mfg; /* misc information about device */
77 89 char *ddn_model;
78 90 char *ddn_serial;
79 91 char *ddn_firm;
80 92 char *ddn_cap;
81 93 uchar_t ddn_dtype; /* scsi inquiry device type. */
82 94
83 95 char **ddn_target_port; /* target-port devinfo prop */
84 96 char **ddn_attached_port; /* attached-port devinfo prop */
85 97 char **ddn_bridge_port; /* bridge-port devinfo prop */
86 98 } dev_di_node_t;
87 99
88 100 struct topo_list;
89 101
90 102 /* Methods shared with the ses module (disk_common.c) */
91 103 extern int dev_list_gather(topo_mod_t *, struct topo_list *);
92 104 extern void dev_list_free(topo_mod_t *, struct topo_list *);
93 105 extern int disk_declare_non_enumerated(topo_mod_t *, tnode_t *, tnode_t **);
94 106 extern int disk_declare_path(topo_mod_t *, tnode_t *,
95 107 struct topo_list *, const char *);
96 108 extern int disk_declare_addr(topo_mod_t *, tnode_t *,
97 109 struct topo_list *, const char *, tnode_t **);
98 110 extern char *disk_auth_clean(topo_mod_t *, const char *);
99 111
100 112 #ifdef __cplusplus
101 113 }
102 114 #endif
103 115
104 116 #endif /* _DISK_H */
↓ open down ↓ |
38 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX