13062Scindi /* 23062Scindi * CDDL HEADER START 33062Scindi * 43062Scindi * The contents of this file are subject to the terms of the 53062Scindi * Common Development and Distribution License (the "License"). 63062Scindi * You may not use this file except in compliance with the License. 73062Scindi * 83062Scindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93062Scindi * or http://www.opensolaris.org/os/licensing. 103062Scindi * See the License for the specific language governing permissions 113062Scindi * and limitations under the License. 123062Scindi * 133062Scindi * When distributing Covered Code, include this CDDL HEADER in each 143062Scindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153062Scindi * If applicable, add the following below this CDDL HEADER, with the 163062Scindi * fields enclosed by brackets "[]" replaced with your own identifying 173062Scindi * information: Portions Copyright [yyyy] [name of copyright owner] 183062Scindi * 193062Scindi * CDDL HEADER END 203062Scindi */ 213062Scindi 223062Scindi /* 23*12054SStephen.Hanson@Sun.COM * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 243062Scindi */ 253062Scindi 263062Scindi #ifndef _DID_H 273062Scindi #define _DID_H 283062Scindi 293062Scindi #include <sys/pci.h> 303062Scindi #include <fm/topo_mod.h> 313062Scindi #include <libdevinfo.h> 323062Scindi #include <libnvpair.h> 333062Scindi 343062Scindi #ifdef __cplusplus 353062Scindi extern "C" { 363062Scindi #endif 373062Scindi 383062Scindi typedef struct did did_t; 393062Scindi 403062Scindi extern did_t *did_create(topo_mod_t *, di_node_t, int, int, int, 413062Scindi int); 423062Scindi extern did_t *did_find(topo_mod_t *, di_node_t); 433062Scindi extern did_t *did_hash_lookup(topo_mod_t *, di_node_t); 443062Scindi extern void did_hash_insert(topo_mod_t *, di_node_t, did_t *); 453062Scindi extern void did_hash_fini(topo_mod_t *); 463062Scindi extern int did_hash_init(topo_mod_t *); 473062Scindi extern void did_link_set(topo_mod_t *, tnode_t *, did_t *); 483062Scindi extern void did_setspecific(topo_mod_t *, void *); 493062Scindi 503062Scindi extern topo_mod_t *did_mod(did_t *); 513062Scindi extern di_node_t did_dinode(did_t *); 523062Scindi extern void did_BDF(did_t *, int *, int *, int *); 533062Scindi extern void did_markrc(did_t *); 548216STarik.Soydan@Sun.COM extern const char *did_physlot_name(did_t *, int); 553062Scindi extern int did_board(did_t *); 563062Scindi extern int did_bridge(did_t *); 573062Scindi extern int did_rc(did_t *); 588216STarik.Soydan@Sun.COM extern int did_physlot(did_t *); 598216STarik.Soydan@Sun.COM extern int did_physlot_exists(did_t *); 608216STarik.Soydan@Sun.COM extern char *did_slot_label_get(did_t *); 618216STarik.Soydan@Sun.COM extern void did_slot_label_set(did_t *, char *); 623062Scindi extern int did_excap(did_t *); 637987SErwin.Tsaur@Sun.COM extern void did_excap_set(did_t *, int); 648216STarik.Soydan@Sun.COM 653062Scindi extern int did_bdf(did_t *); 663062Scindi extern did_t *did_link_get(did_t *); 673062Scindi extern did_t *did_chain_get(did_t *); 683062Scindi extern void did_destroy(did_t *); 693062Scindi extern void did_hold(did_t *); 703062Scindi extern void did_did_link_set(did_t *, did_t *); 713062Scindi extern void did_did_chain_set(did_t *, did_t *); 723062Scindi extern void did_rele(did_t *); 733895Szx143588 extern void did_settnode(did_t *, tnode_t *); 743895Szx143588 extern tnode_t *did_gettnode(did_t *); 753062Scindi 763062Scindi #ifdef __cplusplus 773062Scindi } 783062Scindi #endif 793062Scindi 803062Scindi #endif /* _DID_H */ 81