Lines Matching defs:hca

404  *	hca		- hca info
412 * - Associates an hca to a port.
417 umad_init_port_info(const umad_hca_info_t *hca, umad_port_info_t *port)
419 port->port_hca = hca;
428 * hca - hca info
437 * - For every port associated with this hca destory the mutex assicated
439 * - Closes hca handle and resets the GUID
442 umad_release_hca_info(umad_hca_info_t *hca)
450 if (hca->hca_ports) {
451 for (j = 0; j < hca->hca_nports; j++) {
452 port = &(hca->hca_ports[j]);
456 kmem_free(hca->hca_ports, hca->hca_nports *
458 hca->hca_ports = NULL;
460 if (hca->hca_handle) {
462 rc = ibt_close_hca(hca->hca_handle);
469 (void) ibt_close_hca(hca->hca_handle);
471 hca->hca_handle = 0;
474 hca->hca_guid = 0;
483 * hca handle associated with this hca
493 * - It calls ibt_open_hca to get handle associated wit this hca
494 * - Determines how many port this hca has by calling ibt_query_hca
495 * - Allocates space for each port associated with this hca.
496 * - For every port it calls umad_init_port_info with the hca port
502 umad_init_hca_info(const umad_info_t *info, umad_hca_info_t *hca)
508 rc = ibt_open_hca(info->info_clnt_hdl, hca->hca_guid, &hca->hca_handle);
512 rc = ibt_query_hca(hca->hca_handle, &hca->hca_attr);
516 hca->hca_nports = hca->hca_attr.hca_nports;
518 hca->hca_ports =
519 kmem_zalloc(sizeof (umad_port_info_t) * hca->hca_nports, KM_SLEEP);
522 for (j = 0; j < hca->hca_nports; j++) {
523 port = &hca->hca_ports[j];
524 umad_init_port_info(hca, port);
535 umad_release_hca_info(hca);
555 * - Calls ibt_get_hca_list to get hca count
556 * - Allocates each hca and associate it with umad_info structure
557 * - For every hca it assign GUID which was returned by ibt_get_hca_list
571 umad_hca_info_t *hca;
594 hca = &info->info_hcas[i];
596 /* Note: A non zero guid means the hca has been allocated. */
597 hca->hca_guid = hca_guids[i];
599 rc = umad_init_hca_info(info, hca);
611 hca = &info->info_hcas[i];
613 if (hca->hca_guid)
614 umad_release_hca_info(hca);
663 umad_hca_info_t *hca = &info->info_hcas[i];
665 if (! hca->hca_guid)
668 for (j = 0; j < hca->hca_nports; j++) {
669 umad_port_info_t *port = &hca->hca_ports[j];
704 umad_release_hca_info(hca);
826 umad_hca_info_t hca;
863 hca = info->info_hcas[i];
864 for (j = 0; j < hca.hca_nports; j++) {
868 umad_port_info_t *port = &hca.hca_ports[j];
890 "vendor-id", hca.hca_attr.hca_vendor_id);
894 "device-id", hca.hca_attr.hca_device_id);
898 "hca-instance", i);
927 "vendor-id", hca.hca_attr.hca_vendor_id);
931 "device-id", hca.hca_attr.hca_device_id);
935 "hca-instance", i);
1151 const umad_hca_info_t *hca = port->port_hca;
1246 reg_info.ir_ci_guid = hca->hca_guid;
1383 * a new user context and connect it to the hca info. Return the new
1394 umad_hca_info_t *hca;
1422 hca = &info->info_hcas[node_id];
1423 port = &hca->hca_ports[port_num];
1440 rc = ibt_modify_port(hca->hca_handle, port->port_num,
1522 umad_hca_info_t *hca;
1535 hca = &info->info_hcas[node_id];
1536 port = &hca->hca_ports[port_num];
1541 (void) ibt_modify_port(hca->hca_handle, port->port_num,