1542 ibtl_hca_devinfo_t *hca_devp; /* HCA Dev Info */
1543
1544 IBTF_DPRINTF_L3(ibtf_hca, "ibt_index2pkey_byguid(%llX, %d, %d)",
1545 hca_guid, port_num, pkey_ix);
1546
1547 mutex_enter(&ibtl_clnt_list_mutex);
1548 hca_devp = ibtl_get_hcadevinfo(hca_guid);
1549 if (hca_devp == NULL) {
1550 IBTF_DPRINTF_L2(ibtf_hca, "ibt_index2pkey_byguid: "
1551 "Invalid HCA GUID 0x%llx", hca_guid);
1552 mutex_exit(&ibtl_clnt_list_mutex);
1553 return (IBT_HCA_INVALID);
1554 }
1555 retval = ibtl_index2pkey(hca_devp, port_num, pkey_ix, pkey);
1556 mutex_exit(&ibtl_clnt_list_mutex);
1557
1558 return (retval);
1559 }
1560
1561
1562 _NOTE(SCHEME_PROTECTS_DATA("client managed", ibtl_hca_s::ha_clnt_private))
1563
1564 /*
1565 * Function:
1566 * ibt_set_hca_private
1567 * Input:
1568 * hca_hdl The ibt_hca_hdl_t of the opened HCA.
1569 * clnt_private The client private data.
1570 * Output:
1571 * none.
1572 * Returns:
1573 * none
1574 * Description:
1575 * Sets the client private data.
1576 */
1577 void
1578 ibt_set_hca_private(ibt_hca_hdl_t hca_hdl, void *clnt_private)
1579 {
1580 hca_hdl->ha_clnt_private = clnt_private;
1581 }
1582
1583
|
1542 ibtl_hca_devinfo_t *hca_devp; /* HCA Dev Info */
1543
1544 IBTF_DPRINTF_L3(ibtf_hca, "ibt_index2pkey_byguid(%llX, %d, %d)",
1545 hca_guid, port_num, pkey_ix);
1546
1547 mutex_enter(&ibtl_clnt_list_mutex);
1548 hca_devp = ibtl_get_hcadevinfo(hca_guid);
1549 if (hca_devp == NULL) {
1550 IBTF_DPRINTF_L2(ibtf_hca, "ibt_index2pkey_byguid: "
1551 "Invalid HCA GUID 0x%llx", hca_guid);
1552 mutex_exit(&ibtl_clnt_list_mutex);
1553 return (IBT_HCA_INVALID);
1554 }
1555 retval = ibtl_index2pkey(hca_devp, port_num, pkey_ix, pkey);
1556 mutex_exit(&ibtl_clnt_list_mutex);
1557
1558 return (retval);
1559 }
1560
1561
1562 /*
1563 * Function:
1564 * ibt_set_hca_private
1565 * Input:
1566 * hca_hdl The ibt_hca_hdl_t of the opened HCA.
1567 * clnt_private The client private data.
1568 * Output:
1569 * none.
1570 * Returns:
1571 * none
1572 * Description:
1573 * Sets the client private data.
1574 */
1575 void
1576 ibt_set_hca_private(ibt_hca_hdl_t hca_hdl, void *clnt_private)
1577 {
1578 hca_hdl->ha_clnt_private = clnt_private;
1579 }
1580
1581
|