2 * Copyright (c) 2004-2007 Voltaire Inc. All rights reserved.
3 * Copyright (c) 2007 Xsigo Systems Inc. All rights reserved.
5 * This software is available to you under a choice of one of two
6 * licenses. You may choose to be licensed under the terms of the GNU
7 * General Public License (GPL) Version 2, available from the file
8 * COPYING in the main directory of this source tree, or the
9 * OpenIB.org BSD license below:
11 * Redistribution and use in source and binary forms, with or
12 * without modification, are permitted provided that the following
15 * - Redistributions of source code must retain the above
16 * copyright notice, this list of conditions and the following
19 * - Redistributions in binary form must reproduce the above
20 * copyright notice, this list of conditions and the following
21 * disclaimer in the documentation and/or other materials
22 * provided with the distribution.
24 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38 /*========================================================*/
39 /* FABRIC SCANNER SPECIFIC DATA */
40 /*========================================================*/
42 #define SPINES_MAX_NUM 12
43 #define LINES_MAX_NUM 36
45 typedef struct ChassisList ChassisList;
46 typedef struct AllChassisList AllChassisList;
53 int nodecount; /* used for grouping by SystemImageGUID */
54 Node *spinenode[SPINES_MAX_NUM + 1];
55 Node *linenode[LINES_MAX_NUM + 1];
58 struct AllChassisList {
64 /*========================================================*/
65 /* CHASSIS RECOGNITION SPECIFIC DATA */
66 /*========================================================*/
69 #define VTR_DEVID_IB_FC_ROUTER 0x5a00
70 #define VTR_DEVID_IB_IP_ROUTER 0x5a01
71 #define VTR_DEVID_ISR9600_SPINE 0x5a02
72 #define VTR_DEVID_ISR9600_LEAF 0x5a03
73 #define VTR_DEVID_HCA1 0x5a04
74 #define VTR_DEVID_HCA2 0x5a44
75 #define VTR_DEVID_HCA3 0x6278
76 #define VTR_DEVID_SW_6IB4 0x5a05
77 #define VTR_DEVID_ISR9024 0x5a06
78 #define VTR_DEVID_ISR9288 0x5a07
79 #define VTR_DEVID_SLB24 0x5a09
80 #define VTR_DEVID_SFB12 0x5a08
81 #define VTR_DEVID_SFB4 0x5a0b
82 #define VTR_DEVID_ISR9024_12 0x5a0c
83 #define VTR_DEVID_SLB8 0x5a0d
84 #define VTR_DEVID_RLX_SWITCH_BLADE 0x5a20
85 #define VTR_DEVID_ISR9024_DDR 0x5a31
86 #define VTR_DEVID_SFB12_DDR 0x5a32
87 #define VTR_DEVID_SFB4_DDR 0x5a33
88 #define VTR_DEVID_SLB24_DDR 0x5a34
89 #define VTR_DEVID_SFB2012 0x5a37
90 #define VTR_DEVID_SLB2024 0x5a38
91 #define VTR_DEVID_ISR2012 0x5a39
92 #define VTR_DEVID_SFB2004 0x5a40
93 #define VTR_DEVID_ISR2004 0x5a41
94 #define VTR_DEVID_SRB2004 0x5a42
96 enum ChassisType { UNRESOLVED_CT, ISR9288_CT, ISR9096_CT, ISR2012_CT, ISR2004_CT };
97 enum ChassisSlot { UNRESOLVED_CS, LINE_CS, SPINE_CS, SRBD_CS };
99 /*========================================================*/
100 /* External interface */
101 /*========================================================*/
103 ChassisList *group_nodes();
104 char *portmapstring(Port *port);
105 char *get_chassis_type(unsigned char chassistype);
106 char *get_chassis_slot(unsigned char chassisslot);
107 uint64_t get_chassis_guid(unsigned char chassisnum);
109 int is_xsigo_guid(uint64_t guid);
110 int is_xsigo_tca(uint64_t guid);
111 int is_xsigo_hca(uint64_t guid);
113 #endif /* _GROUPING_H_ */