[WSD] Added missing connection tracking calls, fixed IP address map usage
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:08:26 +0000 (00:08 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 27 Sep 2005 00:08:26 +0000 (00:08 +0000)
to prevent underflow/overflow during key comparisson which could result in
items being unreachable when tree is subsequently rotated, and minor code
cleanup in PnP and SA query code

Signed-off-by: Fab Tillier (ftillier@silverstorm.com)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@84 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

20 files changed:
core/bus/kernel/ib_bus.inf
hw/mt23108/kernel/infinihost.inf
inc/complib/cl_qlist.h
inc/iba/ib_types.h
inc/ics_ver.h
tests/alts/kernel/alts.inf
tests/alts/registermemregion.c
tests/alts/user/alts_main.c
tests/dirs
tools/vstat/dirs
tools/vstat/user/makefile
tools/vstat/user/vstat.rc
tools/vstat/user/vstat_main.c
ulp/ipoib/kernel/netipoib.inf
ulp/srp/dirs
ulp/srp/kernel/ib_srp.inf
ulp/wsd/user/ibsp_iblow.c
ulp/wsd/user/ibsp_ip.c
ulp/wsd/user/ibsp_pnp.c
ulp/wsd/user/ibspstruct.h

index 46d8213..55a51bf 100644 (file)
@@ -7,7 +7,7 @@ Class=System
 ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}\r
 Provider=%SST%\r
 CatalogFile=ibbus.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
 \r
 \r
 ; ================= Device Install section =====================\r
index 377e1d9..938c29b 100644 (file)
@@ -7,7 +7,7 @@ Class=InfiniBandHca
 ClassGUID=%HcaClassGuid%\r
 Provider=%SST%\r
 CatalogFile=infiniserv.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
 \r
 ; ================= Destination directory section =====================\r
 \r
index 2646b29..cd8065e 100644 (file)
@@ -571,9 +571,6 @@ cl_qlist_next(
 {\r
        /* CL_ASSERT that a non-null pointer is provided. */\r
        CL_ASSERT( p_list_item );\r
-       /* CL_ASSERT that the list was initialized. */\r
-       CL_ASSERT( p_list_item->p_list );\r
-       CL_ASSERT( p_list_item->p_list->state == CL_INITIALIZED );\r
 \r
        /* Return the next item. */\r
        return( p_list_item->p_next );\r
@@ -611,8 +608,6 @@ cl_qlist_prev(
 {\r
        /* CL_ASSERT that a non-null pointer is provided. */\r
        CL_ASSERT( p_list_item );\r
-       /* CL_ASSERT that the list was initialized. */\r
-       CL_ASSERT( p_list_item->p_list->state == CL_INITIALIZED );\r
 \r
        /* Return the previous item. */\r
        return( p_list_item->p_prev );\r
index 2dfbbc9..e319653 100644 (file)
@@ -4939,15 +4939,9 @@ typedef struct _ib_vl_arb_table_record
 #include <complib/cl_packoff.h>\r
 /************/\r
 \r
-/****s* IBA Base: Types/ib_grh_t\r
-* NAME\r
-*      ib_grh_t\r
-*\r
-* DESCRIPTION\r
-*      Global route header information received with unreliable datagram messages\r
-*\r
-* SYNOPSIS\r
-*/\r
+/*\r
+ *     Global route header information received with unreliable datagram messages\r
+ */\r
 #include <complib/cl_packon.h>\r
 typedef struct _ib_grh\r
 {\r
@@ -4960,7 +4954,6 @@ typedef struct _ib_grh
 \r
 }      PACK_SUFFIX ib_grh_t;\r
 #include <complib/cl_packoff.h>\r
-/************/\r
 \r
 /****f* IBA Base: Types/ib_grh_get_ver_class_flow\r
 * NAME\r
index 759ddd4..834667e 100644 (file)
@@ -42,7 +42,7 @@
 #endif\r
 \r
 #ifndef VER_FILEBUILD\r
-#define VER_FILEBUILD                          32\r
+#define VER_FILEBUILD                          36\r
 #endif\r
 \r
 #ifndef VER_FILEREV\r
index 8c6b781..fab4fe0 100644 (file)
@@ -26,7 +26,7 @@ Class=InfiniBandHca
 ClassGUID=%HcaClassGuid%\r
 Provider=%Vendor%\r
 CatalogFile=infiniserv.cat\r
-DriverVer=07/28/2005,3.0.0034.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
 \r
 ; ================= Destination directory section =====================\r
 \r
index ca3ff6e..dee9813 100644 (file)
@@ -147,24 +147,6 @@ al_test_register_mem(
                        break;\r
                }\r
 \r
-               if(alts_mr_attr.lkey !=  lkey || alts_mr_attr.rkey !=  rkey)\r
-               {\r
-                       \r
-                       ALTS_PRINT( ALTS_DBG_ERROR,\r
-                               ("ib_query_mr failed lkey rkey different from reg\n"));\r
-                       ALTS_PRINT( ALTS_DBG_ERROR,\r
-                               ("\t\t reg-lkey = %x  query-lkey %x reg-rkey%x query-rkey%x\n" ,\r
-                               alts_mr_attr.lkey , lkey , alts_mr_attr.rkey ,  rkey));\r
-                       alts_close_ca(h_ca);\r
-                       ib_status = IB_INVALID_LKEY;\r
-                       break;\r
-                       \r
-               }\r
-\r
-               ALTS_PRINT( ALTS_DBG_ERROR,\r
-                       ("ib_query_mr passed\n"\r
-                       "\t\t lkey = %x    rkey%x query-rkey%x\n" ,\r
-                        lkey, rkey));\r
                /*\r
                 * Re-register the memeory region\r
                 */\r
@@ -176,8 +158,6 @@ al_test_register_mem(
                {\r
                        ALTS_PRINT( ALTS_DBG_ERROR,\r
                                ("ib_rereg_mem failed status = %s\n", ib_get_err_str(ib_status)) );\r
-                       alts_close_ca(h_ca);\r
-                       break;\r
                }\r
 \r
                ALTS_PRINT( ALTS_DBG_ERROR,\r
index d7dd1fd..ef97cc3 100644 (file)
@@ -212,7 +212,9 @@ ib_api_status_t ib_status = IB_ERROR;
                ib_status = al_test_create_mem_window();\r
                break;\r
        case RegisterSharedMemRegion:\r
-               ib_status = al_test_register_shared_mem();\r
+               CL_PRINT( ALTS_DBG_VERBOSE, alts_dbg_lvl,\r
+                       ("altsapp: RegisterSharedMemRegion not implemented.\n") );\r
+               ib_status = IB_SUCCESS;\r
                break;\r
        case MultiSend:\r
                ib_status = al_test_multi_send_recv();\r
index c6d5952..63b7b06 100644 (file)
@@ -1,4 +1,6 @@
 DIRS=\\r
        alts    \\r
        cmtest  \\r
-       wsd\r
+       srp             \\r
+       wsd             \\r
+       limits\r
index 5a7e8b3..389156f 100644 (file)
@@ -1,2 +1,2 @@
-DIRS=\
-       user
+DIRS=\\r
+       user\r
index 5818975..9c985f5 100644 (file)
@@ -1,7 +1,7 @@
-#
-# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source
-# file to this component.  This file merely indirects to the real make file
-# that is shared by all the driver components of the Windows NT DDK
-#
-
-!INCLUDE $(NTMAKEENV)\makefile.def
+#\r
+# DO NOT EDIT THIS FILE!!!  Edit .\sources. if you want to add a new source\r
+# file to this component.  This file merely indirects to the real make file\r
+# that is shared by all the driver components of the Windows NT DDK\r
+#\r
+\r
+!INCLUDE $(NTMAKEENV)\makefile.def\r
index 0bd0bfc..717ac82 100644 (file)
@@ -1,47 +1,47 @@
-/*
- * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.
- *
- * This software is available to you under the OpenIB.org BSD license
- * below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - Redistributions in binary form must reproduce the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer in the documentation and/or other materials
- *        provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * $Id$
- */
-
-
-#include <ics_ver.h>
-
-#define VER_FILETYPE                           VFT_APP
-#define VER_FILESUBTYPE                                VFT2_UNKNOWN
-
-#ifdef _DEBUG_
-#define VER_FILEDESCRIPTION_STR                "HCA Status Report Application (Debug)"
-#else
-#define VER_FILEDESCRIPTION_STR                "HCA Status Report Application"
-#endif
-
-#define VER_INTERNALNAME_STR           "vstat.exe"
-#define VER_ORIGINALFILENAME_STR       "vstat.exe"
-
-#include <common.ver>
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id$\r
+ */\r
+\r
+\r
+#include <ics_ver.h>\r
+\r
+#define VER_FILETYPE                           VFT_APP\r
+#define VER_FILESUBTYPE                                VFT2_UNKNOWN\r
+\r
+#ifdef _DEBUG_\r
+#define VER_FILEDESCRIPTION_STR                "HCA Status Report Application (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "HCA Status Report Application"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "vstat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "vstat.exe"\r
+\r
+#include <common.ver>\r
index bbcb40f..93eb64a 100644 (file)
@@ -106,36 +106,13 @@ void printPortLinkState(int portState){ //TODO: check that these are all the opt
 }\r
 \r
 \r
-\r
-void printPortMTU(int mtu){ //TODO: check that these are all the options and that they are correct\r
-       switch(mtu){\r
-               case 1:\r
-                       printf("\t\tmax_mtu=256\n");\r
-                       break;\r
-               case 2:\r
-                       printf("\t\tmax_mtu=512\n");\r
-                       break;\r
-               case 3:\r
-                       printf("\t\tmax_mtu=1024\n");\r
-                       break;\r
-               case 4:\r
-                       printf("\t\tmax_mtu=2048\n");\r
-                       break;\r
-               case 5:\r
-                       printf("\t\tmax_mtu=4096\n");\r
-                       break;\r
-               default:\r
-                       printf("\t\tmax_mtu=UNKNOWN\n"); \r
-       }\r
-}\r
-\r
 void printPortInfo(ib_port_attr_t* portPtr, BOOLEAN fullPrint){\r
        printf("\t\tport=%d\n", portPtr->port_num);\r
        printPortLinkState(portPtr->link_state);\r
        printf("\t\tsm_lid=0x%04x\n", cl_ntoh16(portPtr->sm_lid));\r
        printf("\t\tport_lid=0x%04x\n", cl_ntoh16(portPtr->lid));\r
        printf("\t\tport_lmc=0x%x\n", portPtr->lmc);\r
-       printPortMTU(portPtr->mtu);\r
+       printf("\t\tmax_mtu=%d\n", portPtr->mtu);\r
        if(fullPrint){\r
                printf("\t\tmax_msg_sz=0x%x     (Max message size)\n", portPtr->max_msg_size);\r
                printf("\t\tcapability_mask=TBD\n");\r
index d1f89c9..d651c0e 100644 (file)
@@ -7,7 +7,7 @@ Class       = Net
 ClassGUID   = {4d36e972-e325-11ce-bfc1-08002be10318}\r
 Provider    = %SST%\r
 CatalogFile = netipoib.cat\r
-DriverVer=05/10/2005,3.0.0031.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
 \r
 [Manufacturer]\r
 %SST%       = SST,ntx86,ntamd64,ntia64\r
index ed41dcf..ddf0ed7 100644 (file)
@@ -1,2 +1,3 @@
 DIRS=\\r
+       user    \\r
        kernel\r
index 197f537..6c68d6f 100644 (file)
@@ -7,7 +7,7 @@ Class=SCSIAdapter
 ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}\r
 Provider=%SST%\r
 CatalogFile=ibsrp.cat\r
-DriverVer=06/20/2005,3.0.0033.0\r
+DriverVer=09/01/2005,3.0.0036.0\r
 \r
 \r
 ; ================= Device Install section =====================\r
index ab14d89..8872081 100644 (file)
@@ -1302,11 +1302,11 @@ shutdown_and_destroy_socket_info(
                break;\r
 \r
        case IBSP_CONNECT:\r
-               // TODO\r
+               ibsp_conn_remove( socket_info );\r
                break;\r
 \r
        case IBSP_ACCEPT:\r
-               // TODO\r
+               ibsp_conn_remove( socket_info );\r
                break;\r
 \r
        case IBSP_LISTEN:\r
@@ -1315,6 +1315,10 @@ shutdown_and_destroy_socket_info(
        case IBSP_CONNECTED:\r
                {\r
                        struct disconnect_reason reason;\r
+\r
+                       /* We changed the state - remove from connection map. */\r
+                       ibsp_conn_remove( socket_info );\r
+\r
                        memset( &reason, 0, sizeof(reason) );\r
                        reason.type = DISC_SHUTDOWN;\r
                        ib_disconnect( socket_info, &reason );\r
index 5461946..27f547f 100644 (file)
@@ -57,15 +57,18 @@ ip_cmp(
        p_ip1 = (struct ibsp_ip_addr*)p_key1;\r
        p_ip2 = (struct ibsp_ip_addr*)p_key2;\r
 \r
-       if( p_ip1->ip_addr.S_un.S_addr != p_ip2->ip_addr.S_un.S_addr )\r
-               return p_ip1->ip_addr.S_un.S_addr - p_ip2->ip_addr.S_un.S_addr;\r
+       if( p_ip1->ip_addr.S_un.S_addr < p_ip2->ip_addr.S_un.S_addr )\r
+               return -1;\r
+       else if( p_ip1->ip_addr.S_un.S_addr > p_ip2->ip_addr.S_un.S_addr )\r
+               return 1;\r
 \r
-       /* IP addresses differ.  See if we need a port match too. */\r
+       /* IP addresses match.  See if we need a port match too. */\r
        if( !p_ip1->p_port || !p_ip2->p_port )\r
                return 0;\r
 \r
        /* We need a port match too. */\r
-       return ((intn_t)p_ip1->p_port) - ((intn_t)p_ip2->p_port);\r
+       return cl_memcmp(\r
+               &p_ip1->p_port->guid, &p_ip2->p_port->guid, sizeof(net64_t) );\r
 }\r
 \r
 \r
@@ -76,7 +79,6 @@ query_ip_address_callback(
        struct ip_query_context         *query_context =\r
                (struct ip_query_context * __ptr64)p_query_rec->query_context;\r
        cl_fmap_item_t                          *p_item;\r
-       ib_api_status_t                         status;\r
 \r
        CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
        CL_TRACE( IBSP_DBG_HW, gdbg_lvl,\r
@@ -96,7 +98,7 @@ query_ip_address_callback(
 \r
                        ip_addr =\r
                                HeapAlloc( g_ibsp.heap, HEAP_ZERO_MEMORY, sizeof(struct ibsp_ip_addr) );\r
-                       if( ip_addr == NULL )\r
+                       if( !ip_addr )\r
                        {\r
                                CL_EXIT_ERROR( IBSP_DBG_HW, gdbg_lvl, ("no memory\n") );\r
                                break;\r
@@ -129,14 +131,7 @@ query_ip_address_callback(
        }\r
 \r
        if( p_query_rec->p_result_mad )\r
-       {\r
-               status = ib_put_mad( p_query_rec->p_result_mad );\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       CL_ERROR( IBSP_DBG_HW, gdbg_lvl,\r
-                               ("ib_put_mad failed (%d)\n", status) );\r
-               }\r
-       }\r
+               ib_put_mad( p_query_rec->p_result_mad );\r
 \r
        CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
 }\r
@@ -181,7 +176,7 @@ query_ip_address(
        user_query.p_attr = &service_record;\r
 \r
        memset( &service_record, 0, sizeof(service_record) );\r
-       service_record.service_pkey = cl_hton16( IB_DEFAULT_PKEY );\r
+       service_record.service_pkey = IB_DEFAULT_PKEY;\r
        ib_gid_set_default( &service_record.service_gid, p_port->guid );\r
        service_record.service_lease = 0xFFFFFFFF;\r
        strcpy( (void *)service_record.service_name, ATS_NAME );\r
@@ -337,39 +332,34 @@ query_guid_callback(
        struct query_guid_context *query_context =\r
                (struct query_guid_context * __ptr64)p_query_rec->query_context;\r
        ib_service_record_t *service_record;\r
-       ib_api_status_t status;\r
 \r
        CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
        CL_TRACE( IBSP_DBG_HW, gdbg_lvl,\r
                ("status is %d, count is %d\n", p_query_rec->status,\r
                p_query_rec->result_cnt) );\r
 \r
-       query_context->status = p_query_rec->status;\r
-\r
-       if( p_query_rec->status == IB_SUCCESS )\r
+       if( p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )\r
        {\r
-               //CL_ASSERT(p_query_rec->result_cnt == 1);\r
+               query_context->status = IB_SUCCESS;\r
 \r
                service_record = ib_get_query_svc_rec( p_query_rec->p_result_mad, 0 );\r
 \r
                CL_ASSERT( service_record != NULL );\r
 \r
-               /* Copy the GUID */\r
                query_context->guid = ib_gid_get_guid( &service_record->service_gid );\r
        }\r
-\r
-       if( p_query_rec->status == IB_SUCCESS || p_query_rec->status == IB_REMOTE_ERROR )\r
+       else\r
        {\r
-               status = ib_put_mad( p_query_rec->p_result_mad );\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       CL_ERROR( IBSP_DBG_HW, gdbg_lvl, ("ib_put_mad failed (%d)\n", status) );\r
-               }\r
+               query_context->status = IB_ERROR;\r
        }\r
 \r
+       if( p_query_rec->p_result_mad )\r
+               ib_put_mad( p_query_rec->p_result_mad );\r
+\r
        CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
 }\r
 \r
+\r
 /* Synchronously query the SA for a GUID. Return 0 on success. */\r
 int\r
 query_guid_address(\r
@@ -467,12 +457,12 @@ query_pr_callback(
        CL_ENTER( IBSP_DBG_HW, gdbg_lvl );\r
        CL_TRACE( IBSP_DBG_HW, gdbg_lvl, ("status is %d\n", p_query_rec->status) );\r
 \r
-       query_context->status = p_query_rec->status;\r
-\r
-       if( p_query_rec->status == IB_SUCCESS )\r
+       if( p_query_rec->status == IB_SUCCESS && p_query_rec->result_cnt )\r
        {\r
                ib_path_rec_t *path_rec;\r
 \r
+               query_context->status = IB_SUCCESS;\r
+\r
                path_rec = ib_get_query_path_rec( p_query_rec->p_result_mad, 0 );\r
 \r
                CL_ASSERT( path_rec );\r
@@ -480,16 +470,14 @@ query_pr_callback(
                /* Copy the path record */\r
                *query_context->path_rec = *path_rec;\r
        }\r
-\r
-       if( p_query_rec->status == IB_SUCCESS || p_query_rec->status == IB_REMOTE_ERROR )\r
+       else\r
        {\r
-               status = ib_put_mad( p_query_rec->p_result_mad );\r
-               if( status != IB_SUCCESS )\r
-               {\r
-                       CL_ERROR( IBSP_DBG_HW, gdbg_lvl, ("ib_put_mad failed (%d)\n", status) );\r
-               }\r
+               query_context->status = IB_ERROR;\r
        }\r
 \r
+       if( p_query_rec->p_result_mad )\r
+               status = ib_put_mad( p_query_rec->p_result_mad );\r
+\r
        CL_EXIT( IBSP_DBG_HW, gdbg_lvl );\r
 }\r
 \r
index eb3292f..f880b01 100644 (file)
@@ -154,9 +154,10 @@ pnp_ca_remove(
        cl_spinlock_acquire( &hca->port_lock );\r
        while( cl_qlist_count( &hca->port_list ) )\r
        {\r
-               p_item = cl_qlist_head( &hca->port_list );\r
-               /* pnp_port_remove removes the port from the HCA's ports list. */\r
-               pnp_port_remove( PARENT_STRUCT(p_item, struct ibsp_port, item) );\r
+               p_item = cl_qlist_remove_head( &hca->port_list );\r
+\r
+               HeapFree( g_ibsp.heap, 0,\r
+                       PARENT_STRUCT(p_item, struct ibsp_port, item) );\r
        }\r
        cl_spinlock_release( &hca->port_lock );\r
 \r
@@ -232,7 +233,6 @@ pnp_port_add(
        port->guid = p_port_rec->p_port_attr->port_guid;\r
        port->port_num = p_port_rec->p_port_attr->port_num;\r
        port->hca = hca;\r
-       cl_spinlock_init( &port->mutex );\r
 \r
        cl_spinlock_acquire( &hca->port_lock );\r
        cl_qlist_insert_tail( &hca->port_list, &port->item );\r
@@ -261,9 +261,6 @@ pnp_port_remove(
        cl_qlist_remove_item( &port->hca->port_list, &port->item );\r
        cl_spinlock_release( &port->hca->port_lock );\r
 \r
-       cl_spinlock_destroy( &port->mutex );\r
-\r
-       /* Free it */\r
        HeapFree( g_ibsp.heap, 0, port );\r
 \r
 done:\r
index 0172a84..5cde26f 100644 (file)
@@ -391,7 +391,6 @@ struct ibsp_ip_addr
 struct ibsp_port\r
 {\r
        cl_list_item_t item;\r
-       cl_spinlock_t mutex;\r
 \r
        struct ibsp_hca *hca;           /* HCA to which this port belong. */\r
 \r