10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 58082SRamaswamy.Tummala@Sun.COM * Common Development and Distribution License (the "License"). 68082SRamaswamy.Tummala@Sun.COM * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*10096SSudhakar.Dindukurti@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _SYS_IB_MGT_IBDM_IBDM_IBNEX_H 270Sstevel@tonic-gate #define _SYS_IB_MGT_IBDM_IBDM_IBNEX_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate /* 300Sstevel@tonic-gate * This file contains the definitions of private interfaces 310Sstevel@tonic-gate * and data structures used between IB nexus and IBDM. 320Sstevel@tonic-gate */ 330Sstevel@tonic-gate 340Sstevel@tonic-gate #include <sys/ib/ibtl/ibti_common.h> 350Sstevel@tonic-gate #include <sys/ib/mgt/ibmf/ibmf.h> 360Sstevel@tonic-gate #include <sys/ib/mgt/ib_dm_attr.h> 370Sstevel@tonic-gate 380Sstevel@tonic-gate #ifdef __cplusplus 390Sstevel@tonic-gate extern "C" { 400Sstevel@tonic-gate #endif 410Sstevel@tonic-gate 420Sstevel@tonic-gate /* DM return status codes from private interfaces */ 430Sstevel@tonic-gate typedef enum ibdm_status_e { 440Sstevel@tonic-gate IBDM_SUCCESS = 0, 450Sstevel@tonic-gate IBDM_FAILURE = 1 460Sstevel@tonic-gate } ibdm_status_t; 470Sstevel@tonic-gate 480Sstevel@tonic-gate /* 490Sstevel@tonic-gate * IBDM events that are passed to IB nexus driver 500Sstevel@tonic-gate * NOTE: These are different from ibt_async_code_t 510Sstevel@tonic-gate */ 520Sstevel@tonic-gate typedef enum ibdm_events_e { 530Sstevel@tonic-gate IBDM_EVENT_HCA_ADDED, 540Sstevel@tonic-gate IBDM_EVENT_HCA_REMOVED, 55*10096SSudhakar.Dindukurti@Sun.COM IBDM_EVENT_IOC_PROP_UPDATE, 56*10096SSudhakar.Dindukurti@Sun.COM IBDM_EVENT_PORT_UP, 57*10096SSudhakar.Dindukurti@Sun.COM IBDM_EVENT_PORT_PKEY_CHANGE 580Sstevel@tonic-gate } ibdm_events_t; 590Sstevel@tonic-gate 600Sstevel@tonic-gate /* 610Sstevel@tonic-gate * Flags for ibdm_ibnex_get_ioc_list. 620Sstevel@tonic-gate * The flags determine the functioning of ibdm_ibnex_get_ioc_list. 630Sstevel@tonic-gate * 640Sstevel@tonic-gate * IBDM_IBNEX_NORMAL_PROBE 650Sstevel@tonic-gate * Sweep fabric and discover new GIDs only 660Sstevel@tonic-gate * This value should be same as IBNEX_PROBE_ALLOWED_FLAG 670Sstevel@tonic-gate * IBDM_IBNEX_DONOT_PROBE 680Sstevel@tonic-gate * Do not probe, just get the current ioc_list. 690Sstevel@tonic-gate * This value should be same as IBNEX_DONOT_PROBE_FLAG 700Sstevel@tonic-gate * IBDM_IBNEX_REPROBE_ALL 710Sstevel@tonic-gate * Sweep fabric, discover new GIDs. For GIDs 720Sstevel@tonic-gate * discovered before, reprobe the IOCs on it. 730Sstevel@tonic-gate */ 740Sstevel@tonic-gate typedef enum ibdm_ibnex_get_ioclist_mtd_e { 750Sstevel@tonic-gate IBDM_IBNEX_NORMAL_PROBE, 760Sstevel@tonic-gate IBDM_IBNEX_DONOT_PROBE, 770Sstevel@tonic-gate IBDM_IBNEX_REPROBE_ALL 780Sstevel@tonic-gate } ibdm_ibnex_get_ioclist_mtd_t; 790Sstevel@tonic-gate 800Sstevel@tonic-gate 810Sstevel@tonic-gate /* 820Sstevel@tonic-gate * Private data structure called from IBDM timeout handler 830Sstevel@tonic-gate */ 840Sstevel@tonic-gate typedef struct ibdm_timeout_cb_args_s { 850Sstevel@tonic-gate struct ibdm_dp_gidinfo_s *cb_gid_info; 860Sstevel@tonic-gate int cb_req_type; 870Sstevel@tonic-gate int cb_ioc_num; /* IOC# */ 880Sstevel@tonic-gate int cb_retry_count; 890Sstevel@tonic-gate int cb_srvents_start; 900Sstevel@tonic-gate int cb_srvents_end; 910Sstevel@tonic-gate } ibdm_timeout_cb_args_t; 920Sstevel@tonic-gate 930Sstevel@tonic-gate /* 940Sstevel@tonic-gate * Service entry structure 950Sstevel@tonic-gate */ 960Sstevel@tonic-gate typedef struct ibdm_srvents_info_s { 970Sstevel@tonic-gate int se_state; 980Sstevel@tonic-gate ib_dm_srv_t se_attr; 990Sstevel@tonic-gate timeout_id_t se_timeout_id; /* IBDM specific */ 1000Sstevel@tonic-gate ibdm_timeout_cb_args_t se_cb_args; 1010Sstevel@tonic-gate } ibdm_srvents_info_t; 1020Sstevel@tonic-gate 1030Sstevel@tonic-gate /* values for "se_state" */ 1040Sstevel@tonic-gate #define IBDM_SE_VALID 0x1 1050Sstevel@tonic-gate #define IBDM_SE_INVALID 0x0 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate 1080Sstevel@tonic-gate /* I/O Controller information */ 1090Sstevel@tonic-gate typedef struct ibdm_ioc_info_s { 1100Sstevel@tonic-gate ib_dm_ioc_ctrl_profile_t ioc_profile; 1110Sstevel@tonic-gate int ioc_state; 1120Sstevel@tonic-gate ibdm_srvents_info_t *ioc_serv; 1130Sstevel@tonic-gate struct ibdm_gid_s *ioc_gid_list; 1140Sstevel@tonic-gate uint_t ioc_nportgids; 1150Sstevel@tonic-gate ib_guid_t ioc_iou_guid; 1160Sstevel@tonic-gate timeout_id_t ioc_timeout_id; 1170Sstevel@tonic-gate timeout_id_t ioc_dc_timeout_id; 1180Sstevel@tonic-gate boolean_t ioc_dc_valid; 1190Sstevel@tonic-gate boolean_t ioc_iou_dc_valid; 1200Sstevel@tonic-gate ibdm_timeout_cb_args_t ioc_cb_args; 1210Sstevel@tonic-gate ibdm_timeout_cb_args_t ioc_dc_cb_args; 1220Sstevel@tonic-gate ib_guid_t ioc_nodeguid; 1230Sstevel@tonic-gate uint16_t ioc_diagcode; 1240Sstevel@tonic-gate uint16_t ioc_iou_diagcode; 1250Sstevel@tonic-gate uint16_t ioc_diagdeviceid; 1260Sstevel@tonic-gate struct ibdm_iou_info_s *ioc_iou_info; 1270Sstevel@tonic-gate struct ibdm_ioc_info_s *ioc_next; 1280Sstevel@tonic-gate 1290Sstevel@tonic-gate /* Previous fields for reprobe */ 1300Sstevel@tonic-gate ibdm_srvents_info_t *ioc_prev_serv; 1310Sstevel@tonic-gate struct ibdm_gid_s *ioc_prev_gid_list; 1320Sstevel@tonic-gate uint8_t ioc_prev_serv_cnt; 1330Sstevel@tonic-gate uint_t ioc_prev_nportgids; 1340Sstevel@tonic-gate 1350Sstevel@tonic-gate /* Flag indicating which IOC info has changed */ 1360Sstevel@tonic-gate ibt_prop_update_payload_t ioc_info_updated; 1370Sstevel@tonic-gate 1380Sstevel@tonic-gate /* 1390Sstevel@tonic-gate * List of HCAs through which IOC is accessible 1400Sstevel@tonic-gate * This field will be initialized in ibdm_ibnex_probe_ioc 1410Sstevel@tonic-gate * and ibdm_get_ioc_list for all IOCs in the fabric. 1420Sstevel@tonic-gate * 1430Sstevel@tonic-gate * HCAs could have been added or deleted from the list, 1440Sstevel@tonic-gate * on calls to ibdm_ibnex_get_ioc_list & ibdm_ibnex_probe_ioc. 1450Sstevel@tonic-gate * 1460Sstevel@tonic-gate * Updates to HCAs in the list will be reported by 1470Sstevel@tonic-gate * IBDM_EVENT_HCA_DOWN and IBDM_EVENT_IOC_HCA_UNREACHABLE events 1480Sstevel@tonic-gate * in the IBDM<->IBDM callback. 1490Sstevel@tonic-gate * 1500Sstevel@tonic-gate * IOC not visible to the host system(because all HCAs cannot 1510Sstevel@tonic-gate * reach the IOC) will be reported in the same manner as TCA 1520Sstevel@tonic-gate * ports getting to 0 (using IOC_PROP_UPDATE event). 1530Sstevel@tonic-gate */ 1540Sstevel@tonic-gate struct ibdm_hca_list_s *ioc_hca_list; 1550Sstevel@tonic-gate 1560Sstevel@tonic-gate } ibdm_ioc_info_t; 1570Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Serialized access by cv", 1580Sstevel@tonic-gate ibdm_ioc_info_s::ioc_next)) 1590Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Unique per copy of ibdm_ioc_info_t", 1600Sstevel@tonic-gate ibdm_ioc_info_s::ioc_info_updated)) 1610Sstevel@tonic-gate _NOTE(DATA_READABLE_WITHOUT_LOCK(ibdm_ioc_info_s::ioc_dc_valid)) 1620Sstevel@tonic-gate 1630Sstevel@tonic-gate /* values for "ioc_state */ 1640Sstevel@tonic-gate #define IBDM_IOC_STATE_PROBE_SUCCESS 0x0 1650Sstevel@tonic-gate #define IBDM_IOC_STATE_PROBE_INVALID 0x1 1660Sstevel@tonic-gate #define IBDM_IOC_STATE_PROBE_FAILED 0x2 1670Sstevel@tonic-gate #define IBDM_IOC_STATE_REPROBE_PROGRESS 0x4 1680Sstevel@tonic-gate 1690Sstevel@tonic-gate /* I/O Unit Information */ 1700Sstevel@tonic-gate typedef struct ibdm_iou_info_s { 1710Sstevel@tonic-gate ib_dm_io_unitinfo_t iou_info; 1720Sstevel@tonic-gate ibdm_ioc_info_t *iou_ioc_info; 1730Sstevel@tonic-gate ib_guid_t iou_guid; 1740Sstevel@tonic-gate boolean_t iou_dc_valid; 1750Sstevel@tonic-gate uint16_t iou_diagcode; 1760Sstevel@tonic-gate int iou_niocs_probe_in_progress; 1770Sstevel@tonic-gate } ibdm_iou_info_t; 1780Sstevel@tonic-gate 1790Sstevel@tonic-gate 1800Sstevel@tonic-gate /* P_Key table related info */ 1810Sstevel@tonic-gate typedef struct ibdm_pkey_tbl_s { 1820Sstevel@tonic-gate ib_pkey_t pt_pkey; /* P_Key value */ 1830Sstevel@tonic-gate ibmf_qp_handle_t pt_qp_hdl; /* QP handle */ 1840Sstevel@tonic-gate } ibdm_pkey_tbl_t; 1850Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Serialized access by cv", ibdm_pkey_tbl_s)) 1860Sstevel@tonic-gate 1870Sstevel@tonic-gate 1880Sstevel@tonic-gate /* 1890Sstevel@tonic-gate * Port Attributes structure 1900Sstevel@tonic-gate */ 1910Sstevel@tonic-gate typedef struct ibdm_port_attr_s { 1920Sstevel@tonic-gate ibdm_pkey_tbl_t *pa_pkey_tbl; 1930Sstevel@tonic-gate ib_guid_t pa_hca_guid; 1940Sstevel@tonic-gate ib_guid_t pa_port_guid; 1950Sstevel@tonic-gate uint16_t pa_npkeys; 1960Sstevel@tonic-gate ibmf_handle_t pa_ibmf_hdl; 1970Sstevel@tonic-gate ib_sn_prefix_t pa_sn_prefix; 1980Sstevel@tonic-gate uint16_t pa_port_num; 1990Sstevel@tonic-gate uint32_t pa_vendorid; 2000Sstevel@tonic-gate uint32_t pa_productid; 2010Sstevel@tonic-gate uint32_t pa_dev_version; 2020Sstevel@tonic-gate ibt_port_state_t pa_state; 2030Sstevel@tonic-gate ibmf_saa_handle_t pa_sa_hdl; 2040Sstevel@tonic-gate ibmf_impl_caps_t pa_ibmf_caps; 2050Sstevel@tonic-gate ibt_hca_hdl_t pa_hca_hdl; 2060Sstevel@tonic-gate } ibdm_port_attr_t; 2070Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Serialized access by cv", ibdm_port_attr_s)) 2080Sstevel@tonic-gate 2090Sstevel@tonic-gate /* 2100Sstevel@tonic-gate * HCA list structure. 2110Sstevel@tonic-gate */ 2120Sstevel@tonic-gate typedef struct ibdm_hca_list_s { 2130Sstevel@tonic-gate ibdm_port_attr_t *hl_port_attr; /* port attributes */ 2140Sstevel@tonic-gate struct ibdm_hca_list_s *hl_next; /* ptr to next list */ 2150Sstevel@tonic-gate ib_guid_t hl_hca_guid; /* HCA GUID */ 2160Sstevel@tonic-gate uint32_t hl_nports; /* #ports of this HCA */ 2170Sstevel@tonic-gate uint32_t hl_nports_active; /* #ports active */ 2180Sstevel@tonic-gate time_t hl_attach_time; /* attach time */ 2190Sstevel@tonic-gate ibt_hca_hdl_t hl_hca_hdl; /* HCA handle */ 2200Sstevel@tonic-gate ibdm_port_attr_t *hl_hca_port_attr; /* Dummy Port Attr */ 2210Sstevel@tonic-gate /* for HCA node */ 2220Sstevel@tonic-gate } ibdm_hca_list_t; 2230Sstevel@tonic-gate _NOTE(SCHEME_PROTECTS_DATA("Serialized access by cv", ibdm_hca_list_s)) 2240Sstevel@tonic-gate 2250Sstevel@tonic-gate /* 2260Sstevel@tonic-gate * The DM callback definitions 2270Sstevel@tonic-gate * 2280Sstevel@tonic-gate * ibdm_callback_t 2290Sstevel@tonic-gate * Pointer to DM callback function 2300Sstevel@tonic-gate * IBDM notifies IB nexus of ibdm_event_t using this callback. 2310Sstevel@tonic-gate * Arguments 2320Sstevel@tonic-gate * arg : The value of "arg" depends on the "event" 2330Sstevel@tonic-gate * IBDM_EVENT_CREATE_HCA_NODE (pointer to HCA GUID) 2340Sstevel@tonic-gate * IBDM_EVENT_REMOVE_HCA_NODE (pointer to HCA GUID) 2350Sstevel@tonic-gate * IBDM_EVENT_IOC_PROP_UPDATE (ibdm_ioc_info_t *) 2360Sstevel@tonic-gate * 2370Sstevel@tonic-gate * event : ibdm_event_t values 2380Sstevel@tonic-gate * 2390Sstevel@tonic-gate * Returns : None 2400Sstevel@tonic-gate * 2410Sstevel@tonic-gate */ 2420Sstevel@tonic-gate typedef void (*ibdm_callback_t)(void *arg, ibdm_events_t event); 2430Sstevel@tonic-gate 2440Sstevel@tonic-gate 2450Sstevel@tonic-gate /* 2460Sstevel@tonic-gate * DM interface functions 2470Sstevel@tonic-gate */ 2480Sstevel@tonic-gate 2490Sstevel@tonic-gate /* 2500Sstevel@tonic-gate * ibdm_ibnex_register_callback 2510Sstevel@tonic-gate * Register the IB nexus IBDM callback routine 2520Sstevel@tonic-gate * 2530Sstevel@tonic-gate * Arguments : IB nexus IBDM callback routine 2540Sstevel@tonic-gate * Return Values : None 2550Sstevel@tonic-gate */ 2560Sstevel@tonic-gate void ibdm_ibnex_register_callback(ibdm_callback_t cb); 2570Sstevel@tonic-gate 2580Sstevel@tonic-gate /* 2590Sstevel@tonic-gate * ibdm_ibnex_unregister_callback 2600Sstevel@tonic-gate * Unregister IB nexus DM callback with IBDM 2610Sstevel@tonic-gate * 2620Sstevel@tonic-gate * Arguments : None 2630Sstevel@tonic-gate * Return Values : None 2640Sstevel@tonic-gate */ 2650Sstevel@tonic-gate void ibdm_ibnex_unregister_callback(); 2660Sstevel@tonic-gate 2670Sstevel@tonic-gate 2680Sstevel@tonic-gate /* 2690Sstevel@tonic-gate * PORT devices handling interfaces. 2700Sstevel@tonic-gate * 2710Sstevel@tonic-gate * ibdm_ibnex_probe_hcaport 2720Sstevel@tonic-gate * Probes the HCA port. If found, returns the port attributes. 2730Sstevel@tonic-gate * Caller is responsible for freeing the memory for the port 2740Sstevel@tonic-gate * attribute structure by calling ibdm_ibnex_free_port_attr() 2750Sstevel@tonic-gate * 2760Sstevel@tonic-gate * Arguments : GUID of the HCA and port number 2770Sstevel@tonic-gate * Return Values : ibdm_port_attr_t on SUCCESS, NULL on FAILURE. 2780Sstevel@tonic-gate */ 2790Sstevel@tonic-gate ibdm_port_attr_t *ibdm_ibnex_probe_hcaport(ib_guid_t, uint8_t); 2800Sstevel@tonic-gate 2810Sstevel@tonic-gate /* 2820Sstevel@tonic-gate * ibdm_ibnex_get_port_attrs 2830Sstevel@tonic-gate * Scans the HCA ports for a matching port_guid. If found, 2840Sstevel@tonic-gate * returns the port attributes. 2850Sstevel@tonic-gate * Caller is responsible for freeing the memory for the port 2860Sstevel@tonic-gate * attribute structure by calling ibdm_ibnex_free_port_attr() 2870Sstevel@tonic-gate * 2880Sstevel@tonic-gate * Arguments : GUID of the port 2890Sstevel@tonic-gate * Return Values : ibdm_port_attr_t on SUCCESS, NULL on FAILURE. 2900Sstevel@tonic-gate */ 2910Sstevel@tonic-gate ibdm_port_attr_t *ibdm_ibnex_get_port_attrs(ib_guid_t); 2920Sstevel@tonic-gate 2930Sstevel@tonic-gate /* 2940Sstevel@tonic-gate * ibdm_ibnex_free_port_attr() 2950Sstevel@tonic-gate * Deallocates the memory from ibnex_get_dip_from_port_guid() and 2960Sstevel@tonic-gate * ibdm_ibnex_get_port_attrs() functions. 2970Sstevel@tonic-gate */ 2980Sstevel@tonic-gate void ibdm_ibnex_free_port_attr(ibdm_port_attr_t *); 2990Sstevel@tonic-gate 3000Sstevel@tonic-gate 3010Sstevel@tonic-gate /* 3020Sstevel@tonic-gate * IOC devices handling interfaces. 3030Sstevel@tonic-gate * 3040Sstevel@tonic-gate * ibdm_ibnex_probe_ioc 3050Sstevel@tonic-gate * Probes the IOC device on the fabric. If found, allocates and 3060Sstevel@tonic-gate * returns pointer to the ibdm_ioc_info_t. Caller is responsible 3070Sstevel@tonic-gate * to free the memory for the ioc attribute structure by calling 3080Sstevel@tonic-gate * ibdm_ibnex_free_ioc_list. 3090Sstevel@tonic-gate * 3100Sstevel@tonic-gate * Arguments : 3110Sstevel@tonic-gate * GUID of the IOU and GUID of the IOC 3120Sstevel@tonic-gate * reprobe_flag - Set if IOC information has to be reprobed. 3130Sstevel@tonic-gate * Return Values : ibdm_ioc_info_t on SUCCESS, NULL on FAILURE. 3140Sstevel@tonic-gate */ 3150Sstevel@tonic-gate ibdm_ioc_info_t *ibdm_ibnex_probe_ioc(ib_guid_t iou_guid, ib_guid_t ioc_guid, 3160Sstevel@tonic-gate int reprobe_flag); 3170Sstevel@tonic-gate 3180Sstevel@tonic-gate /* 3190Sstevel@tonic-gate * ibdm_ibnex_get_ioc_count 3200Sstevel@tonic-gate * Returns number of IOCs currently discovered in the fabric. 3210Sstevel@tonic-gate * Arguments : NONE 3220Sstevel@tonic-gate * Return Values : number of IOCs seen 3230Sstevel@tonic-gate */ 3240Sstevel@tonic-gate int ibdm_ibnex_get_ioc_count(void); 3250Sstevel@tonic-gate 3260Sstevel@tonic-gate /* 3270Sstevel@tonic-gate * ibdm_ibnex_get_ioc_list 3280Sstevel@tonic-gate * Returns linked list of ibdm_ioc_info_t structures for all the 3290Sstevel@tonic-gate * IOCs present on the fabric. Caller is responsible for freeing 3300Sstevel@tonic-gate * the memory allocated for the ioc attribute structure(s) by 3310Sstevel@tonic-gate * calling ibdm_ibnex_free_ioc_list(). 3320Sstevel@tonic-gate * 3330Sstevel@tonic-gate * Arguments : list_flag : 3340Sstevel@tonic-gate * Get list according to ibdm_ibnex_get_ioclist_mtd_t defination. 3350Sstevel@tonic-gate * Return Values : IOC list based containing "ibdm_ioc_info_t"s if 3360Sstevel@tonic-gate * successful, otherwise NULL. 3370Sstevel@tonic-gate */ 3380Sstevel@tonic-gate ibdm_ioc_info_t *ibdm_ibnex_get_ioc_list(ibdm_ibnex_get_ioclist_mtd_t); 3390Sstevel@tonic-gate 3400Sstevel@tonic-gate /* 3410Sstevel@tonic-gate * ibdm_ibnex_get_ioc_info 3420Sstevel@tonic-gate * Returns pointer ibdm_ioc_info_t structures for the request 3430Sstevel@tonic-gate * "ioc_guid". Caller is responsible to free the memory by 3440Sstevel@tonic-gate * calling ibdm_ibnex_free_ioc_list() when the return value is 3450Sstevel@tonic-gate * not NULL. 3460Sstevel@tonic-gate * 3470Sstevel@tonic-gate * Arguments : GUID of the IOC 3480Sstevel@tonic-gate * Return Values : Address of kmem_alloc'ed memory if the IOC exists, 3490Sstevel@tonic-gate * otherwise NULL. 3500Sstevel@tonic-gate */ 3510Sstevel@tonic-gate ibdm_ioc_info_t *ibdm_ibnex_get_ioc_info(ib_guid_t ioc_guid); 3520Sstevel@tonic-gate 3530Sstevel@tonic-gate /* 3540Sstevel@tonic-gate * ibdm_ibnex_free_ioc_list() 3550Sstevel@tonic-gate * Deallocates the memory from ibdm_ibnex_probe_ioc(), 3560Sstevel@tonic-gate * ibdm_ibnex_get_ioc_list() and ibdm_ibnex_get_ioc_info() 3570Sstevel@tonic-gate */ 3580Sstevel@tonic-gate void ibdm_ibnex_free_ioc_list(ibdm_ioc_info_t *); 3590Sstevel@tonic-gate 3600Sstevel@tonic-gate /* 3610Sstevel@tonic-gate * HCA handling interfaces. 3620Sstevel@tonic-gate * 3630Sstevel@tonic-gate * ibdm_ibnex_get_hca_list 3640Sstevel@tonic-gate * Returns linked list of ibdm_hca_list_t structures for all 3650Sstevel@tonic-gate * the HCAs present on the fabric. Caller is responsible for 3660Sstevel@tonic-gate * freeing the memory for the hca attribute structure(s) by 3670Sstevel@tonic-gate * calling ibdm_ibnex_free_hca_list(). 3680Sstevel@tonic-gate * 3690Sstevel@tonic-gate * Arguments : "hca" contains pointer to pointer of ibdm_hca_list_t 3700Sstevel@tonic-gate * : "cnt" contains pointer to number of hca's 3710Sstevel@tonic-gate * Return Values : None 3720Sstevel@tonic-gate */ 3730Sstevel@tonic-gate void ibdm_ibnex_get_hca_list(ibdm_hca_list_t **hca, int *cnt); 3740Sstevel@tonic-gate 3750Sstevel@tonic-gate /* 3760Sstevel@tonic-gate * ibdm_ibnex_get_hca_info_by_guid 3770Sstevel@tonic-gate * Returns a linked list of ibdm_hca_list_t structure that matches the 3780Sstevel@tonic-gate * given argument. The caller is responsible for freeing the memory for 3790Sstevel@tonic-gate * the hca attribute structure by calling ibdm_ibnex_free_hca_list(). 3800Sstevel@tonic-gate * 3810Sstevel@tonic-gate * Arguments : HCA GUID 3820Sstevel@tonic-gate * Return Values : Linked list of ibdm_hca_list_t(s) 3830Sstevel@tonic-gate */ 3840Sstevel@tonic-gate ibdm_hca_list_t *ibdm_ibnex_get_hca_info_by_guid(ib_guid_t); 3850Sstevel@tonic-gate 3860Sstevel@tonic-gate /* 3870Sstevel@tonic-gate * ibdm_ibnex_free_hca_list() 3880Sstevel@tonic-gate * Deallocates the memory from ibdm_ibnex_get_hca_list() and 3890Sstevel@tonic-gate * ibdm_ibnex_get_hca_info_by_guid() functions. 3900Sstevel@tonic-gate */ 3910Sstevel@tonic-gate void ibdm_ibnex_free_hca_list(ibdm_hca_list_t *); 3920Sstevel@tonic-gate 3930Sstevel@tonic-gate /* 3940Sstevel@tonic-gate * ibdm_ibnex_update_pkey_tbls 3950Sstevel@tonic-gate * Updates the DM P_Key database. 3960Sstevel@tonic-gate * 3970Sstevel@tonic-gate * Arguments : NONE 3980Sstevel@tonic-gate * Return Values : NONE 3990Sstevel@tonic-gate */ 4000Sstevel@tonic-gate void ibdm_ibnex_update_pkey_tbls(void); 4010Sstevel@tonic-gate 4020Sstevel@tonic-gate /* 4038082SRamaswamy.Tummala@Sun.COM * ibdm_ibnex_port_settle_wait 4048082SRamaswamy.Tummala@Sun.COM * Wait until the ports come up 4050Sstevel@tonic-gate * 4068082SRamaswamy.Tummala@Sun.COM * Arguments 4078082SRamaswamy.Tummala@Sun.COM * HCA GUID and the maximum wait time since the hca instance attach 4080Sstevel@tonic-gate */ 4098082SRamaswamy.Tummala@Sun.COM void ibdm_ibnex_port_settle_wait(ib_guid_t, int); 4100Sstevel@tonic-gate 4110Sstevel@tonic-gate 4120Sstevel@tonic-gate #ifdef __cplusplus 4130Sstevel@tonic-gate } 4140Sstevel@tonic-gate #endif 4150Sstevel@tonic-gate 4160Sstevel@tonic-gate #endif /* _SYS_IB_MGT_IBDM_IBDM_IBNEX_H */ 417