xref: /freebsd/contrib/ofed/libibnetdisc/chassis.h (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1 /*
2  * Copyright (c) 2004-2007 Voltaire Inc.  All rights reserved.
3  * Copyright (c) 2007 Xsigo Systems Inc.  All rights reserved.
4  *
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:
10  *
11  *     Redistribution and use in source and binary forms, with or
12  *     without modification, are permitted provided that the following
13  *     conditions are met:
14  *
15  *      - Redistributions of source code must retain the above
16  *        copyright notice, this list of conditions and the following
17  *        disclaimer.
18  *
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.
23  *
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
31  * SOFTWARE.
32  *
33  */
34 
35 #ifndef _CHASSIS_H_
36 #define _CHASSIS_H_
37 
38 #include <infiniband/ibnetdisc.h>
39 
40 #include "internal.h"
41 
42 /*========================================================*/
43 /*                CHASSIS RECOGNITION SPECIFIC DATA       */
44 /*========================================================*/
45 
46 /* Device IDs */
47 #define VTR_DEVID_IB_FC_ROUTER		0x5a00
48 #define VTR_DEVID_IB_IP_ROUTER		0x5a01
49 #define VTR_DEVID_ISR9600_SPINE		0x5a02
50 #define VTR_DEVID_ISR9600_LEAF		0x5a03
51 #define VTR_DEVID_HCA1			0x5a04
52 #define VTR_DEVID_HCA2			0x5a44
53 #define VTR_DEVID_HCA3			0x6278
54 #define VTR_DEVID_SW_6IB4		0x5a05
55 #define VTR_DEVID_ISR9024		0x5a06
56 #define VTR_DEVID_ISR9288		0x5a07
57 #define VTR_DEVID_SLB24			0x5a09
58 #define VTR_DEVID_SFB12			0x5a08
59 #define VTR_DEVID_SFB4			0x5a0b
60 #define VTR_DEVID_ISR9024_12		0x5a0c
61 #define VTR_DEVID_SLB8			0x5a0d
62 #define VTR_DEVID_RLX_SWITCH_BLADE	0x5a20
63 #define VTR_DEVID_ISR9024_DDR		0x5a31
64 #define VTR_DEVID_SFB12_DDR		0x5a32
65 #define VTR_DEVID_SFB4_DDR		0x5a33
66 #define VTR_DEVID_SLB24_DDR		0x5a34
67 #define VTR_DEVID_SFB2012		0x5a37
68 #define VTR_DEVID_SLB2024		0x5a38
69 #define VTR_DEVID_ISR2012		0x5a39
70 #define VTR_DEVID_SFB2004		0x5a40
71 #define VTR_DEVID_ISR2004		0x5a41
72 #define VTR_DEVID_SRB2004		0x5a42
73 #define VTR_DEVID_SLB4018		0x5a5b
74 #define VTR_DEVID_SFB4700		0x5a5c
75 #define VTR_DEVID_SFB4700X2		0x5a5d
76 #define VTR_DEVID_SFB4200		0x5a60
77 
78 #define MLX_DEVID_IS4			0xbd36
79 
80 /* Vendor IDs (for chassis based systems) */
81 #define VTR_VENDOR_ID			0x8f1	/* Voltaire */
82 #define MLX_VENDOR_ID			0x2c9	/* Mellanox */
83 #define TS_VENDOR_ID			0x5ad	/* Cisco */
84 #define SS_VENDOR_ID			0x66a	/* InfiniCon */
85 #define XS_VENDOR_ID			0x1397	/* Xsigo */
86 
87 enum ibnd_chassis_type {
88 	UNRESOLVED_CT, ISR9288_CT, ISR9096_CT, ISR2012_CT, ISR2004_CT,
89 	ISR4700_CT, ISR4200_CT
90 };
91 enum ibnd_chassis_slot_type { UNRESOLVED_CS, LINE_CS, SPINE_CS, SRBD_CS };
92 
93 int group_nodes(struct ibnd_fabric *fabric);
94 
95 #endif				/* _CHASSIS_H_ */
96