summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorpramodbg <none@none>2006-05-01 09:29:46 -0700
committerpramodbg <none@none>2006-05-01 09:29:46 -0700
commitcd7e9b9fc16a5fd29b2d6c579f255ea16d27a0e9 (patch)
tree87c2a2517eab9850e30b48107c841a2aba62521c /usr/src
parentf30b2760421a84d971ec11b48541a3988ccd623d (diff)
downloadillumos-gate-cd7e9b9fc16a5fd29b2d6c579f255ea16d27a0e9.tar.gz
6410508 IBDM blocks with an IB HCA dip held, causing prtconf and cfgadm to hang
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c b/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c
index 066c70f286..7113f0e019 100644
--- a/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c
+++ b/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c
@@ -6090,6 +6090,16 @@ static void
ibdm_delete_gidinfo(ibdm_dp_gidinfo_t *gidinfo)
{
ibdm_ioc_info_t *ioc_list;
+ int in_gidlist = 0;
+
+ /*
+ * Check if gidinfo has been inserted into the
+ * ibdm_dp_gidlist_head list. gl_next or gl_prev
+ * != NULL, if gidinfo is the list.
+ */
+ if (gidinfo->gl_prev != NULL ||
+ gidinfo->gl_next != NULL)
+ in_gidlist = 1;
ioc_list = ibdm_update_ioc_gidlist(gidinfo, 0);
@@ -6104,16 +6114,19 @@ ibdm_delete_gidinfo(ibdm_dp_gidinfo_t *gidinfo)
(void) ibdm_free_iou_info(gidinfo);
mutex_exit(&gidinfo->gl_mutex);
}
- if (gidinfo->gl_prev != NULL)
- gidinfo->gl_prev->gl_next = gidinfo->gl_next;
- if (gidinfo->gl_next != NULL)
- gidinfo->gl_next->gl_prev = gidinfo->gl_prev;
- if (gidinfo == ibdm.ibdm_dp_gidlist_head)
- ibdm.ibdm_dp_gidlist_head = gidinfo->gl_next;
- if (gidinfo == ibdm.ibdm_dp_gidlist_tail)
- ibdm.ibdm_dp_gidlist_tail = gidinfo->gl_prev;
- ibdm.ibdm_ngids--;
+ if (in_gidlist) {
+ if (gidinfo->gl_prev != NULL)
+ gidinfo->gl_prev->gl_next = gidinfo->gl_next;
+ if (gidinfo->gl_next != NULL)
+ gidinfo->gl_next->gl_prev = gidinfo->gl_prev;
+
+ if (gidinfo == ibdm.ibdm_dp_gidlist_head)
+ ibdm.ibdm_dp_gidlist_head = gidinfo->gl_next;
+ if (gidinfo == ibdm.ibdm_dp_gidlist_tail)
+ ibdm.ibdm_dp_gidlist_tail = gidinfo->gl_prev;
+ ibdm.ibdm_ngids--;
+ }
mutex_exit(&ibdm.ibdm_mutex);
mutex_destroy(&gidinfo->gl_mutex);