xref: /illumos-gate/usr/src/uts/common/sys/scsi/adapters/pmcs/pmcs_smhba.h (revision 4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 /*
26  * SM-HBA interfaces/definitions for PMC-S driver.
27  */
28 #ifndef _PMCS_SMHBA_H
29 #define	_PMCS_SMHBA_H
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /* Leverage definition of data_type_t in nvpair.h */
35 #include <sys/nvpair.h>
36 
37 #define	PMCS_NUM_PHYS		"num-phys"
38 #define	PMCS_NUM_PHYS_HBA	"num-phys-hba"
39 #define	PMCS_SMHBA_SUPPORTED	"sm-hba-supported"
40 #define	PMCS_DRV_VERSION	"driver-version"
41 #define	PMCS_HWARE_VERSION	"hardware-version"
42 #define	PMCS_FWARE_VERSION	"firmware-version"
43 #define	PMCS_SUPPORTED_PROTOCOL	"supported-protocol"
44 
45 #define	PMCS_MANUFACTURER	"Manufacturer"
46 #define	PMCS_SERIAL_NUMBER	"SerialNumber"
47 #define	PMCS_MODEL_NAME		"ModelName"
48 
49 /*
50  * Interfaces to add properties required for SM-HBA
51  *
52  * _add_xxx_prop() interfaces add only 1 prop that is specified in the args.
53  * _set_xxx_props() interfaces add more than 1 prop for a set of phys/devices.
54  */
55 void pmcs_smhba_add_hba_prop(pmcs_hw_t *, data_type_t, char *, void *);
56 void pmcs_smhba_add_iport_prop(pmcs_iport_t *, data_type_t, char *, void *);
57 void pmcs_smhba_add_tgt_prop(pmcs_xscsi_t *, data_type_t, char *, void *);
58 
59 void pmcs_smhba_set_scsi_device_props(pmcs_hw_t *, pmcs_phy_t *,
60     struct scsi_device *);
61 void pmcs_smhba_set_phy_props(pmcs_iport_t *);
62 
63 /*
64  * Misc routines supporting SM-HBA
65  */
66 void pmcs_smhba_log_sysevent(pmcs_hw_t *, char *, char *, pmcs_phy_t *);
67 
68 
69 #ifdef	__cplusplus
70 }
71 #endif
72 #endif	/* _PMCS_SMHBA_H */
73