Lines Matching refs:head
4688 ibcm_mcg_list_t *head = NULL;
4696 head = ibcm_mcglist;
4698 while (head != NULL) {
4699 if ((head->ml_mgid.gid_guid == mcg_resp->MGID.gid_guid) &&
4700 (head->ml_mgid.gid_prefix == mcg_resp->MGID.gid_prefix) &&
4701 (head->ml_sgid.gid_guid == mcg_resp->PortGID.gid_guid)) {
4703 head->ml_refcnt++;
4705 head->ml_jstate |= mcg_req->JoinState;
4708 "FOUND: refcnt %d JState %X", head->ml_refcnt,
4709 head->ml_jstate);
4714 head = head->ml_next;
4753 ibcm_mcg_list_t *head, *prev;
4763 head = ibcm_mcglist;
4766 while (head != NULL) {
4767 if ((head->ml_mgid.gid_guid == mcg_req->MGID.gid_guid) &&
4768 (head->ml_mgid.gid_prefix == mcg_req->MGID.gid_prefix) &&
4769 (head->ml_sgid.gid_guid == mcg_req->PortGID.gid_guid)) {
4770 if (!(head->ml_jstate & mcg_req->JoinState)) {
4773 head->ml_jstate, mcg_req->JoinState);
4776 head->ml_refcnt--;
4778 if (head->ml_refcnt == 0) {
4779 *jstate = head->ml_jstate;
4783 if ((head == ibcm_mcglist) || (prev == NULL)) {
4784 ibcm_mcglist = head->ml_next;
4786 prev->ml_next = head->ml_next;
4790 kmem_free(head, sizeof (ibcm_mcg_list_t));
4796 prev = head;
4797 head = head->ml_next;