summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c36
-rw-r--r--usr/src/uts/common/sys/ib/mgt/ibdm/ibdm_impl.h9
2 files changed, 35 insertions, 10 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 9192679419..723a781618 100644
--- a/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c
+++ b/usr/src/uts/common/io/ib/mgt/ibdm/ibdm.c
@@ -896,6 +896,7 @@ static void
ibdm_handle_hca_detach(ib_guid_t hca_guid)
{
ibdm_hca_list_t *head, *prev = NULL;
+ size_t len;
ibdm_dp_gidinfo_t *gidinfo;
IBTF_DPRINTF_L4("ibdm",
@@ -941,6 +942,11 @@ ibdm_handle_hca_detach(ib_guid_t hca_guid)
else
prev->hl_next = head->hl_next;
+ len = sizeof (ibdm_hca_list_t) +
+ (head->hl_nports *
+ sizeof (ibdm_port_attr_t));
+ kmem_free(head, len);
+
break;
}
prev = head;
@@ -4292,7 +4298,8 @@ ibdm_dup_hca_attr(ibdm_hca_list_t *in_hca)
void
ibdm_ibnex_free_hca_list(ibdm_hca_list_t *hca_list)
{
- int ii, len;
+ int ii;
+ size_t len;
ibdm_hca_list_t *temp;
ibdm_port_attr_t *port;
@@ -5980,13 +5987,26 @@ ibdm_reset_all_dgids(ibmf_saa_handle_t port_sa_hdl)
IBTF_DPRINTF_L4(ibdm_string, "\tevent_hdlr "
"checking gidinfo %p", gid_info);
- if (gid_info->gl_nodeguid != 0 &&
- gid_info->gl_sa_hdl == port_sa_hdl) {
+ if (gid_info->gl_sa_hdl == port_sa_hdl) {
IBTF_DPRINTF_L3(ibdm_string,
"\tevent_hdlr: down HCA port hdl "
"matches gid %p", gid_info);
- ibdm_reset_gidinfo(gid_info);
+ /*
+ * The non-DM GIDs can come back
+ * with a new subnet prefix, when
+ * the HCA port commes up again. To
+ * avoid issues, delete non-DM
+ * capable GIDs, if the gid was
+ * discovered using the HCA port
+ * going down. This is ensured by
+ * setting gl_disconnected to 1.
+ */
+ if (gid_info->gl_nodeguid != 0)
+ gid_info->gl_disconnected = 1;
+ else
+ ibdm_reset_gidinfo(gid_info);
+
if (gid_info->gl_disconnected) {
IBTF_DPRINTF_L3(ibdm_string,
"\tevent_hdlr: deleting"
@@ -6121,7 +6141,8 @@ ibdm_delete_gidinfo(ibdm_dp_gidinfo_t *gidinfo)
* != NULL, if gidinfo is the list.
*/
if (gidinfo->gl_prev != NULL ||
- gidinfo->gl_next != NULL)
+ gidinfo->gl_next != NULL ||
+ ibdm.ibdm_dp_gidlist_head == gidinfo)
in_gidlist = 1;
ioc_list = ibdm_update_ioc_gidlist(gidinfo, 0);
@@ -6138,6 +6159,11 @@ ibdm_delete_gidinfo(ibdm_dp_gidinfo_t *gidinfo)
mutex_exit(&gidinfo->gl_mutex);
}
+ /* Delete gl_hca_list */
+ mutex_exit(&ibdm.ibdm_mutex);
+ ibdm_delete_glhca_list(gidinfo);
+ mutex_enter(&ibdm.ibdm_mutex);
+
if (in_gidlist) {
if (gidinfo->gl_prev != NULL)
gidinfo->gl_prev->gl_next = gidinfo->gl_next;
diff --git a/usr/src/uts/common/sys/ib/mgt/ibdm/ibdm_impl.h b/usr/src/uts/common/sys/ib/mgt/ibdm/ibdm_impl.h
index 20ef36affd..9278d690bf 100644
--- a/usr/src/uts/common/sys/ib/mgt/ibdm/ibdm_impl.h
+++ b/usr/src/uts/common/sys/ib/mgt/ibdm/ibdm_impl.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -213,7 +212,7 @@ _NOTE(DATA_READABLE_WITHOUT_LOCK(ibdm_dp_gidinfo_s::{gl_ibmf_hdl gl_sa_hdl}))
* The limits are sufficient for practical configurations.
*/
#define IBDM_GID_TRANSACTIONID_SHIFT ((ulong_t)32)
-#define IBDM_GID_TRANSACTIONID_MASK 0xFFFFFFFF00000000
+#define IBDM_GID_TRANSACTIONID_MASK 0xFFFFFFFF00000000ULL
typedef struct ibdm_s {
/* Protects IBDM's critical data */