xref: /titanic_50/usr/src/uts/common/sys/sunmdi.h (revision 4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5ee28b439Scm136836  * Common Development and Distribution License (the "License").
6ee28b439Scm136836  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
2255e592a2SRandall Ralphs  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef	_SYS_SUNMDI_H
277c478bd9Sstevel@tonic-gate #define	_SYS_SUNMDI_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate /*
307c478bd9Sstevel@tonic-gate  * Multiplexed I/O global include
317c478bd9Sstevel@tonic-gate  */
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate #include <sys/note.h>
347c478bd9Sstevel@tonic-gate #include <sys/esunddi.h>
357c478bd9Sstevel@tonic-gate #include <sys/sunddi.h>
367c478bd9Sstevel@tonic-gate #include <sys/ddipropdefs.h>
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
397c478bd9Sstevel@tonic-gate extern "C" {
407c478bd9Sstevel@tonic-gate #endif
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate /*
437c478bd9Sstevel@tonic-gate  * Most MDI functions return success or failure
447c478bd9Sstevel@tonic-gate  */
457c478bd9Sstevel@tonic-gate #define	MDI_SUCCESS		0	/* Call Success */
467c478bd9Sstevel@tonic-gate #define	MDI_FAILURE		-1	/* Unspecified Error */
477c478bd9Sstevel@tonic-gate #define	MDI_NOMEM		-2	/* No resources available */
487c478bd9Sstevel@tonic-gate #define	MDI_ACCEPT		-3	/* Request accepted */
497c478bd9Sstevel@tonic-gate #define	MDI_BUSY		-4	/* Busy */
507c478bd9Sstevel@tonic-gate #define	MDI_NOPATH		-5	/* No more paths are available */
517c478bd9Sstevel@tonic-gate #define	MDI_EINVAL		-6	/* Invalid parameter */
527c478bd9Sstevel@tonic-gate #define	MDI_NOT_SUPPORTED	-8	/* Device not supported */
537c478bd9Sstevel@tonic-gate #define	MDI_DEVI_ONLINING	-9	/* Devi is onlining */
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate /*
567c478bd9Sstevel@tonic-gate  * handle to mdi_pathinfo node
577c478bd9Sstevel@tonic-gate  */
587c478bd9Sstevel@tonic-gate typedef struct x_mdi_pathinfo *mdi_pathinfo_t;
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate /*
617c478bd9Sstevel@tonic-gate  * Path info node state definitions
627c478bd9Sstevel@tonic-gate  */
637c478bd9Sstevel@tonic-gate typedef enum {
647c478bd9Sstevel@tonic-gate 	MDI_PATHINFO_STATE_INIT,
657c478bd9Sstevel@tonic-gate 	MDI_PATHINFO_STATE_ONLINE,
667c478bd9Sstevel@tonic-gate 	MDI_PATHINFO_STATE_STANDBY,
677c478bd9Sstevel@tonic-gate 	MDI_PATHINFO_STATE_FAULT,
687c478bd9Sstevel@tonic-gate 	MDI_PATHINFO_STATE_OFFLINE
697c478bd9Sstevel@tonic-gate } mdi_pathinfo_state_t;
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate /*
727c478bd9Sstevel@tonic-gate  * MDI vHCI class definitions
737c478bd9Sstevel@tonic-gate  */
747c478bd9Sstevel@tonic-gate #define	MDI_HCI_CLASS_SCSI	"scsi_vhci"
757c478bd9Sstevel@tonic-gate #define	MDI_HCI_CLASS_IB	"ib"
767c478bd9Sstevel@tonic-gate 
777c478bd9Sstevel@tonic-gate #ifdef _KERNEL
787c478bd9Sstevel@tonic-gate 
797c478bd9Sstevel@tonic-gate /*
807c478bd9Sstevel@tonic-gate  * mpxio component definitions:  Every registered component of the
817c478bd9Sstevel@tonic-gate  * mpxio system has a "mpxio-component" property attached to it.
827c478bd9Sstevel@tonic-gate  * Identify its function
837c478bd9Sstevel@tonic-gate  */
847c478bd9Sstevel@tonic-gate #define	MDI_COMPONENT_NONE	0
857c478bd9Sstevel@tonic-gate #define	MDI_COMPONENT_VHCI	0x1
867c478bd9Sstevel@tonic-gate #define	MDI_COMPONENT_PHCI	0x2
877c478bd9Sstevel@tonic-gate #define	MDI_COMPONENT_CLIENT	0x4
887c478bd9Sstevel@tonic-gate 
897c478bd9Sstevel@tonic-gate /*
90*4c06356bSdh142964  * mdi_pathinfo node state utility definitions (bits in mdi_pathinfo_state_t)
91*4c06356bSdh142964  *
92*4c06356bSdh142964  * NOTE: having mdi_pathinfo_state_t contain both state and flags is error
93*4c06356bSdh142964  * prone.  For new flags, please consider using MDI_PATHINFO_FLAG_ (and
94*4c06356bSdh142964  * moving existing EXT_STATE_MASK flags over would be good too).
957c478bd9Sstevel@tonic-gate  */
967c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_STATE_TRANSIENT			0x00010000
977c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_STATE_USER_DISABLE			0x00100000
987c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_STATE_DRV_DISABLE			0x00200000
997c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_STATE_DRV_DISABLE_TRANSIENT	0x00400000
1007c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_STATE_MASK				0x0000FFFF
1017c478bd9Sstevel@tonic-gate #define	MDI_PATHINFO_EXT_STATE_MASK			0xFFF00000
1027c478bd9Sstevel@tonic-gate 
103*4c06356bSdh142964 /*
104*4c06356bSdh142964  * mdi_pathinfo flags definitions
105*4c06356bSdh142964  */
106*4c06356bSdh142964 #define	MDI_PATHINFO_FLAGS_HIDDEN			0x00000001
107*4c06356bSdh142964 #define	MDI_PATHINFO_FLAGS_DEVICE_REMOVED		0x00000002
108*4c06356bSdh142964 
1097c478bd9Sstevel@tonic-gate #define	USER_DISABLE			1
1107c478bd9Sstevel@tonic-gate #define	DRIVER_DISABLE			2
1117c478bd9Sstevel@tonic-gate #define	DRIVER_DISABLE_TRANSIENT	3
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate /*
1157c478bd9Sstevel@tonic-gate  * Most MDI functions return success or failure
1167c478bd9Sstevel@tonic-gate  */
1177c478bd9Sstevel@tonic-gate #define	MDI_SUCCESS		0	/* Call Success			*/
1187c478bd9Sstevel@tonic-gate #define	MDI_FAILURE		-1	/* Unspecified Error		*/
1197c478bd9Sstevel@tonic-gate #define	MDI_NOMEM		-2	/* No resources available	*/
1207c478bd9Sstevel@tonic-gate #define	MDI_ACCEPT		-3	/* Request accepted		*/
1217c478bd9Sstevel@tonic-gate #define	MDI_BUSY		-4	/* Busy				*/
1227c478bd9Sstevel@tonic-gate #define	MDI_NOPATH		-5	/* No more paths are available	*/
1237c478bd9Sstevel@tonic-gate #define	MDI_EINVAL		-6	/* Invalid parameter		*/
1247c478bd9Sstevel@tonic-gate #define	MDI_NOT_SUPPORTED	-8	/* Device not supported		*/
1257c478bd9Sstevel@tonic-gate #define	MDI_DEVI_ONLINING	-9	/* Devi is onlining		*/
1267c478bd9Sstevel@tonic-gate 
1277c478bd9Sstevel@tonic-gate /*
1287c478bd9Sstevel@tonic-gate  * MDI operation vector structure definition
1297c478bd9Sstevel@tonic-gate  */
1307c478bd9Sstevel@tonic-gate #define	MDI_OPS_REV_1			1
1317c478bd9Sstevel@tonic-gate #define	MDI_OPS_REV			MDI_OPS_REV_1
1327c478bd9Sstevel@tonic-gate 
1337c478bd9Sstevel@tonic-gate #define	MDI_VHCI(dip)	(DEVI(dip)->devi_mdi_component & MDI_COMPONENT_VHCI)
1347c478bd9Sstevel@tonic-gate #define	MDI_PHCI(dip)	(DEVI(dip)->devi_mdi_component & MDI_COMPONENT_PHCI)
1357c478bd9Sstevel@tonic-gate #define	MDI_CLIENT(dip)	(DEVI(dip)->devi_mdi_component & MDI_COMPONENT_CLIENT)
1367c478bd9Sstevel@tonic-gate 
1377c478bd9Sstevel@tonic-gate /*
1387c478bd9Sstevel@tonic-gate  * MDI device hotplug notification
1397c478bd9Sstevel@tonic-gate  */
1407c478bd9Sstevel@tonic-gate int mdi_devi_online(dev_info_t *, uint_t);
1417c478bd9Sstevel@tonic-gate int mdi_devi_offline(dev_info_t *, uint_t);
1427c478bd9Sstevel@tonic-gate 
1437c478bd9Sstevel@tonic-gate /*
14425e8c5aaSvikram  * MDI path retire interfaces
14525e8c5aaSvikram  */
14625e8c5aaSvikram void mdi_phci_mark_retiring(dev_info_t *dip, char **cons_array);
14725e8c5aaSvikram void mdi_phci_retire_notify(dev_info_t *dip, int *constraint);
14825e8c5aaSvikram void mdi_phci_retire_finalize(dev_info_t *dip, int phci_only);
14925e8c5aaSvikram void mdi_phci_unretire(dev_info_t *dip);
15025e8c5aaSvikram 
15125e8c5aaSvikram /*
1525e3986cbScth  * MDI devinfo locking functions.
1535e3986cbScth  */
1545e3986cbScth void mdi_devi_enter(dev_info_t *, int *);
15555e592a2SRandall Ralphs int mdi_devi_tryenter(dev_info_t *, int *);
1565e3986cbScth void mdi_devi_exit_phci(dev_info_t *, int);
1575e3986cbScth void mdi_devi_enter_phci(dev_info_t *, int *);
1585e3986cbScth void mdi_devi_exit(dev_info_t *, int);
1595e3986cbScth 
1605e3986cbScth /*
1615e3986cbScth  * MDI device support functions.
1625e3986cbScth  */
1635e3986cbScth dev_info_t *mdi_devi_get_vdip(dev_info_t *);
1645e3986cbScth int mdi_devi_pdip_entered(dev_info_t *);
1655e3986cbScth 
1665e3986cbScth /*
1677c478bd9Sstevel@tonic-gate  * MDI component device instance attach/detach notification
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate int mdi_pre_attach(dev_info_t *, ddi_attach_cmd_t);
1707c478bd9Sstevel@tonic-gate void mdi_post_attach(dev_info_t *, ddi_attach_cmd_t, int);
1717c478bd9Sstevel@tonic-gate int mdi_pre_detach(dev_info_t *, ddi_detach_cmd_t);
1727c478bd9Sstevel@tonic-gate void mdi_post_detach(dev_info_t *, ddi_detach_cmd_t, int);
1737c478bd9Sstevel@tonic-gate 
1747c478bd9Sstevel@tonic-gate /*
1757c478bd9Sstevel@tonic-gate  * mdi_pathinfo management functions.
1767c478bd9Sstevel@tonic-gate  *
1777c478bd9Sstevel@tonic-gate  * Find, allocate and Free functions.
1787c478bd9Sstevel@tonic-gate  */
1797c478bd9Sstevel@tonic-gate mdi_pathinfo_t *mdi_pi_find(dev_info_t *, char *, char *);
1807c478bd9Sstevel@tonic-gate int mdi_pi_alloc(dev_info_t *, char *, char *, char *, int, mdi_pathinfo_t **);
1817c478bd9Sstevel@tonic-gate int mdi_pi_alloc_compatible(dev_info_t *, char *, char *, char *,
1827c478bd9Sstevel@tonic-gate 	char **, int, int, mdi_pathinfo_t **);
1837c478bd9Sstevel@tonic-gate int mdi_pi_free(mdi_pathinfo_t *, int);
1847c478bd9Sstevel@tonic-gate 
1855e3986cbScth void mdi_hold_path(mdi_pathinfo_t *);
1865e3986cbScth void mdi_rele_path(mdi_pathinfo_t *);
1875e3986cbScth 
1887c478bd9Sstevel@tonic-gate /*
1897c478bd9Sstevel@tonic-gate  * mdi_pathinfo node state change functions.
1907c478bd9Sstevel@tonic-gate  */
1917c478bd9Sstevel@tonic-gate int mdi_pi_online(mdi_pathinfo_t *, int);
1927c478bd9Sstevel@tonic-gate int mdi_pi_standby(mdi_pathinfo_t *, int);
1937c478bd9Sstevel@tonic-gate int mdi_pi_fault(mdi_pathinfo_t *, int);
1947c478bd9Sstevel@tonic-gate int mdi_pi_offline(mdi_pathinfo_t *, int);
195ee28b439Scm136836 /*
196ee28b439Scm136836  * NOTE: the next 2 interfaces will be removed once the NWS files are
197ee28b439Scm136836  * changed to use the new mdi_{enable,disable}_path interfaces
198ee28b439Scm136836  */
1997c478bd9Sstevel@tonic-gate int mdi_pi_disable(dev_info_t *, dev_info_t *, int);
2007c478bd9Sstevel@tonic-gate int mdi_pi_enable(dev_info_t *, dev_info_t *, int);
201ee28b439Scm136836 int mdi_pi_disable_path(mdi_pathinfo_t *, int);
202ee28b439Scm136836 int mdi_pi_enable_path(mdi_pathinfo_t *, int);
2037c478bd9Sstevel@tonic-gate 
204*4c06356bSdh142964 int mdi_pi_ishidden(mdi_pathinfo_t *);
205*4c06356bSdh142964 
206*4c06356bSdh142964 int mdi_pi_device_isremoved(mdi_pathinfo_t *);
207*4c06356bSdh142964 int mdi_pi_device_remove(mdi_pathinfo_t *);
208*4c06356bSdh142964 int mdi_pi_device_insert(mdi_pathinfo_t *);
209*4c06356bSdh142964 
2107c478bd9Sstevel@tonic-gate /*
2117c478bd9Sstevel@tonic-gate  * MPxIO-PM stuff
2127c478bd9Sstevel@tonic-gate  */
2137c478bd9Sstevel@tonic-gate typedef enum {
2147c478bd9Sstevel@tonic-gate 	MDI_PM_PRE_CONFIG = 0,
2157c478bd9Sstevel@tonic-gate 	MDI_PM_POST_CONFIG,
2167c478bd9Sstevel@tonic-gate 	MDI_PM_PRE_UNCONFIG,
2177c478bd9Sstevel@tonic-gate 	MDI_PM_POST_UNCONFIG,
2187c478bd9Sstevel@tonic-gate 	MDI_PM_HOLD_POWER,
2197c478bd9Sstevel@tonic-gate 	MDI_PM_RELE_POWER
2207c478bd9Sstevel@tonic-gate } mdi_pm_op_t;
2217c478bd9Sstevel@tonic-gate 
2227c478bd9Sstevel@tonic-gate int
2237c478bd9Sstevel@tonic-gate mdi_bus_power(dev_info_t *, void *, pm_bus_power_op_t, void *, void *);
2247c478bd9Sstevel@tonic-gate 
2257c478bd9Sstevel@tonic-gate int
2267c478bd9Sstevel@tonic-gate mdi_power(dev_info_t *, mdi_pm_op_t, void *, char *, int);
2277c478bd9Sstevel@tonic-gate 
2287c478bd9Sstevel@tonic-gate /*
2297c478bd9Sstevel@tonic-gate  * mdi_pathinfo node walker function.
2307c478bd9Sstevel@tonic-gate  */
2317c478bd9Sstevel@tonic-gate int mdi_component_is_vhci(dev_info_t *, const char **);
2327c478bd9Sstevel@tonic-gate int mdi_component_is_phci(dev_info_t *, const char **);
2337c478bd9Sstevel@tonic-gate int mdi_component_is_client(dev_info_t *, const char **);
2347c478bd9Sstevel@tonic-gate mdi_pathinfo_t *mdi_get_next_phci_path(dev_info_t *, mdi_pathinfo_t *);
2357c478bd9Sstevel@tonic-gate mdi_pathinfo_t *mdi_get_next_client_path(dev_info_t *, mdi_pathinfo_t *);
2367c478bd9Sstevel@tonic-gate 
2377c478bd9Sstevel@tonic-gate /*
2387c478bd9Sstevel@tonic-gate  * mdi_pathinfo node member functions
2397c478bd9Sstevel@tonic-gate  */
2407c478bd9Sstevel@tonic-gate void mdi_pi_lock(mdi_pathinfo_t *);
2417c478bd9Sstevel@tonic-gate void mdi_pi_unlock(mdi_pathinfo_t *);
2427c478bd9Sstevel@tonic-gate dev_info_t *mdi_pi_get_client(mdi_pathinfo_t *);
2437c478bd9Sstevel@tonic-gate dev_info_t *mdi_pi_get_phci(mdi_pathinfo_t *);
24455e592a2SRandall Ralphs char *mdi_pi_get_node_name(mdi_pathinfo_t *);
2457c478bd9Sstevel@tonic-gate char *mdi_pi_get_addr(mdi_pathinfo_t *);
2467c478bd9Sstevel@tonic-gate mdi_pathinfo_state_t mdi_pi_get_state(mdi_pathinfo_t *);
247*4c06356bSdh142964 uint_t mdi_pi_get_flags(mdi_pathinfo_t *);
248602ca9eaScth int mdi_pi_get_path_instance(mdi_pathinfo_t *);
249*4c06356bSdh142964 char *mdi_pi_pathname_by_instance(int);
250602ca9eaScth char *mdi_pi_pathname(mdi_pathinfo_t *);
25138c67cbdSjiang wu - Sun Microsystems - Beijing China char *mdi_pi_pathname_obp(mdi_pathinfo_t *, char *);
25238c67cbdSjiang wu - Sun Microsystems - Beijing China int mdi_pi_pathname_obp_set(mdi_pathinfo_t *, char *);
253*4c06356bSdh142964 char *mdi_pi_spathname_by_instance(int);
254*4c06356bSdh142964 char *mdi_pi_spathname(mdi_pathinfo_t *);
2557c478bd9Sstevel@tonic-gate 
2567c478bd9Sstevel@tonic-gate /*
2577c478bd9Sstevel@tonic-gate  * mdi_pathinfo Property handling functions
2587c478bd9Sstevel@tonic-gate  */
2597c478bd9Sstevel@tonic-gate int mdi_prop_remove(mdi_pathinfo_t *, char *);
2607c478bd9Sstevel@tonic-gate int mdi_prop_update_byte_array(mdi_pathinfo_t *, char *, uchar_t *, uint_t);
2617c478bd9Sstevel@tonic-gate int mdi_prop_update_int(mdi_pathinfo_t *, char *, int);
2627c478bd9Sstevel@tonic-gate int mdi_prop_update_int64(mdi_pathinfo_t *, char *, int64_t);
2637c478bd9Sstevel@tonic-gate int mdi_prop_update_int_array(mdi_pathinfo_t *, char *, int *, uint_t);
2647c478bd9Sstevel@tonic-gate int mdi_prop_update_string(mdi_pathinfo_t *, char *, char *);
2657c478bd9Sstevel@tonic-gate int mdi_prop_update_string_array(mdi_pathinfo_t *, char *, char **, uint_t);
2667c478bd9Sstevel@tonic-gate nvpair_t *mdi_pi_get_next_prop(mdi_pathinfo_t *, nvpair_t *);
2677c478bd9Sstevel@tonic-gate 
2687c478bd9Sstevel@tonic-gate int mdi_prop_lookup_byte_array(mdi_pathinfo_t *, char *, uchar_t **, uint_t *);
2697c478bd9Sstevel@tonic-gate int mdi_prop_lookup_int(mdi_pathinfo_t *, char *, int *);
2707c478bd9Sstevel@tonic-gate int mdi_prop_lookup_int64(mdi_pathinfo_t *, char *, int64_t *);
2717c478bd9Sstevel@tonic-gate int mdi_prop_lookup_int_array(mdi_pathinfo_t *, char *, int **, uint_t *);
2727c478bd9Sstevel@tonic-gate int mdi_prop_lookup_string(mdi_pathinfo_t *, char *, char **);
2737c478bd9Sstevel@tonic-gate int mdi_prop_lookup_string_array(mdi_pathinfo_t *, char *, char ***, uint_t *);
2747c478bd9Sstevel@tonic-gate int mdi_prop_free(void *);
2757c478bd9Sstevel@tonic-gate 
2767c478bd9Sstevel@tonic-gate /*
2777c478bd9Sstevel@tonic-gate  * pHCI driver instance registration/unregistration
2787c478bd9Sstevel@tonic-gate  *
2797c478bd9Sstevel@tonic-gate  * mdi_phci_register() is called by a pHCI drivers to register itself as a
2807c478bd9Sstevel@tonic-gate  * transport provider for a specific 'class' (see mdi_vhci_register() above);
2817c478bd9Sstevel@tonic-gate  * it should be called from attach(9e).
2827c478bd9Sstevel@tonic-gate  *
2837c478bd9Sstevel@tonic-gate  * mdi_phci_unregister() is called from detach(9e) to unregister a pHCI
2847c478bd9Sstevel@tonic-gate  * instance from the framework.
2857c478bd9Sstevel@tonic-gate  */
2867c478bd9Sstevel@tonic-gate int		mdi_phci_register(char *, dev_info_t *, int);
2877c478bd9Sstevel@tonic-gate int		mdi_phci_unregister(dev_info_t *, int);
2887c478bd9Sstevel@tonic-gate 
2897c478bd9Sstevel@tonic-gate /* get set phci private data */
2907c478bd9Sstevel@tonic-gate caddr_t mdi_pi_get_phci_private(mdi_pathinfo_t *);
2917c478bd9Sstevel@tonic-gate void mdi_pi_set_phci_private(mdi_pathinfo_t *, caddr_t);
2927c478bd9Sstevel@tonic-gate 
2937c478bd9Sstevel@tonic-gate int mdi_vhci_bus_config(dev_info_t *, uint_t, ddi_bus_config_op_t, void *,
2943c34adc5Sramat     dev_info_t **, char *);
2957c478bd9Sstevel@tonic-gate 
2968c4f8890Srs135747 /*
2978c4f8890Srs135747  * mdi_vhci node walker function
2988c4f8890Srs135747  */
2998c4f8890Srs135747 void mdi_walk_vhcis(int (*f)(dev_info_t *, void *), void *arg);
3008c4f8890Srs135747 
3018c4f8890Srs135747 /*
3028c4f8890Srs135747  * mdi_phci node walker function
3038c4f8890Srs135747  */
3048c4f8890Srs135747 void mdi_vhci_walk_phcis(dev_info_t *, int (*f)(dev_info_t *, void *),
3058c4f8890Srs135747     void *arg);
3068c4f8890Srs135747 
3078c4f8890Srs135747 /*
3088c4f8890Srs135747  * mdi_client node walker function
3098c4f8890Srs135747  */
3108c4f8890Srs135747 void mdi_vhci_walk_clients(dev_info_t *, int (*f)(dev_info_t *, void *),
3118c4f8890Srs135747     void *arg);
3128c4f8890Srs135747 
313f7209cf2Spramodbg /*
314f7209cf2Spramodbg  * MDI PHCI driver list helper functions
315f7209cf2Spramodbg  */
316f7209cf2Spramodbg char **mdi_get_phci_driver_list(char *vhci_class, int	*ndrivers);
317f7209cf2Spramodbg void mdi_free_phci_driver_list(char **driver_list, int ndrivers);
318f7209cf2Spramodbg 
3197c478bd9Sstevel@tonic-gate #endif /* _KERNEL */
3207c478bd9Sstevel@tonic-gate 
3217c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
3227c478bd9Sstevel@tonic-gate }
3237c478bd9Sstevel@tonic-gate #endif
3247c478bd9Sstevel@tonic-gate 
3257c478bd9Sstevel@tonic-gate #endif	/* _SYS_SUNMDI_H */
326