]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IPOIB_NDIS6_CM]
authorStan Smith <stan.smith@intel.com>
Mon, 1 Nov 2010 23:33:46 +0000 (23:33 +0000)
committerStan Smith <stan.smith@intel.com>
Mon, 1 Nov 2010 23:33:46 +0000 (23:33 +0000)
Fixes suggested by running prefast
 precompile.h - not all strsafe routines are in ntstrsafe.h
 mainly function declaration additions.
spacing and tabulation adjustments.
Empty line removal.

git-svn-id: svn://openib.tc.cornell.edu/gen1@2982 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_driver.cpp
trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_ibat.cpp
trunk/ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
trunk/ulp/ipoib_NDIS6_CM/kernel/precompile.h

index dd5864f57be7ce6f07a5c94d6bf4c3f6558f47b3..a1e292a207d388b6566fc2444cacb6588bb3f38d 100644 (file)
@@ -34,7 +34,6 @@
 #include "Precompile.h"\r
 \r
 \r
-\r
 #if defined(EVENT_TRACING)\r
 #ifdef offsetof\r
 #undef offsetof\r
 #include <complib/cl_init.h>\r
 #include <initguid.h>\r
 #include <iba/ipoib_ifc.h>\r
-#include "ntstrsafe.h"\r
 #include "strsafe.h"\r
 #include <offload.h>\r
 \r
-\r
-\r
 #define MAJOR_DRIVER_VERSION 2\r
 #define MINOR_DRIVER_VERSION 1\r
 \r
@@ -64,8 +60,6 @@
 PDRIVER_OBJECT                         g_p_drv_obj;\r
 \r
 \r
-\r
-\r
 static const NDIS_OID SUPPORTED_OIDS[] =\r
 {\r
        OID_GEN_SUPPORTED_LIST,\r
@@ -265,22 +259,33 @@ ipoib_create_log(
 \r
 }\r
 \r
+extern "C" DRIVER_INITIALIZE DriverEntry;\r
 \r
 extern "C"\r
 NTSTATUS\r
 DriverEntry(\r
        IN                              PDRIVER_OBJECT                          p_drv_obj,\r
        IN                              PUNICODE_STRING                         p_reg_path );\r
+#ifdef _DEBUG_\r
+#pragma NDIS_PAGEABLE_FUNCTION(DriverEntry)\r
+#endif\r
+\r
 \r
 VOID\r
 ipoib_unload(\r
        IN                              PDRIVER_OBJECT                          p_drv_obj );\r
 \r
+#ifdef _DEBUG_\r
+extern "C"\r
+#endif\r
 NDIS_STATUS\r
 ipoib_initialize_ex(\r
        IN                              NDIS_HANDLE                     h_adapter,\r
        IN                              NDIS_HANDLE             config_context,\r
        IN PNDIS_MINIPORT_INIT_PARAMETERS       MiniportInitParameters);\r
+#ifdef _DEBUG_\r
+#pragma NDIS_PAGEABLE_FUNCTION(ipoib_initialize_ex)\r
+#endif\r
 \r
 BOOLEAN\r
 ipoib_check_for_hang(\r
@@ -735,7 +740,7 @@ ipoib_get_adapter_params(
                        (sizeof(eth_hdr_t) + p_adapter->params.cm_payload_mtu);\r
        }\r
 \r
-               p_adapter->params.xfer_block_size = \r
+       p_adapter->params.xfer_block_size = \r
                        (sizeof(eth_hdr_t) + p_adapter->params.payload_mtu);\r
 \r
        NdisReadNetworkAddress( &status, (PVOID *) p_mac, p_len, h_config );\r
@@ -1029,7 +1034,7 @@ SetGenericAttributes(
        gat.Header.Revision = NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES_REVISION_1;\r
        gat.Header.Size = sizeof(NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES);\r
 \r
-       gat.MediaType =                 NdisMedium802_3;        \r
+       gat.MediaType =                 NdisMedium802_3;\r
        gat.MaxXmitLinkSpeed =  IPOIB_MEDIA_MAX_SPEED;\r
        gat.MaxRcvLinkSpeed =   IPOIB_MEDIA_MAX_SPEED;\r
        gat.XmitLinkSpeed =             NDIS_LINK_SPEED_UNKNOWN;\r
@@ -1402,10 +1407,9 @@ SetAttributes(
        ipoib_adapter_t *p_adapter,\r
        NDIS_HANDLE     h_adapter\r
        )\r
-       {\r
+{\r
        NTSTATUS Status;\r
 \r
-\r
        Status = SetDeviceRegistrationAttributes(p_adapter, h_adapter);\r
        if (Status != NDIS_STATUS_SUCCESS)\r
        {\r
@@ -2605,7 +2609,7 @@ ipoib_query_info(
                        \r
                case OID_PNP_QUERY_POWER:\r
                        IPOIB_PRINT( TRACE_LEVEL_INFORMATION,IPOIB_DBG_OID,\r
-                               ("Port %d received query for OID_TCP_TASK_OFFLOAD\n", port_num) );\r
+                               ("Port %d received query for OID_PNP_QUERY_POWER\n", port_num) );\r
                        // Status is pre-set in this routine to Success\r
                        status = NDIS_STATUS_SUCCESS; \r
                        break;\r
@@ -2666,7 +2670,7 @@ ipoib_query_info(
                IPOIB_EXIT( IPOIB_DBG_OID );\r
                return NDIS_STATUS_PENDING;\r
 }\r
-       \r
+\r
 \r
 static NDIS_STATUS\r
 ipoib_complete_query(\r
index 2053b796f4fe81c98c3d2694a58199cdf2304ebb..459129a2de782f3977b6c421969867e2abf23e60 100644 (file)
 \r
 extern PDRIVER_OBJECT                          g_p_drv_obj;\r
 \r
+static DRIVER_DISPATCH __ipoib_create;\r
 static NTSTATUS\r
 __ipoib_create(\r
        IN                              DEVICE_OBJECT* const            pDevObj,\r
        IN                              IRP* const                                      pIrp );\r
 \r
+static DRIVER_DISPATCH __ipoib_cleanup;\r
 static NTSTATUS\r
 __ipoib_cleanup(\r
        IN                              DEVICE_OBJECT* const            pDevObj,\r
        IN                              IRP* const                                      pIrp );\r
 \r
+static DRIVER_DISPATCH __ipoib_close;\r
 static NTSTATUS\r
 __ipoib_close(\r
        IN                              DEVICE_OBJECT* const            pDevObj,\r
        IN                              IRP* const                                      pIrp );\r
 \r
+static DRIVER_DISPATCH __ipoib_dispatch;\r
 static NTSTATUS\r
 __ipoib_dispatch(\r
        IN                              DEVICE_OBJECT* const            pDevObj,\r
index db092b70633e89ea1f35ac07d709483496252bcf..7a242ae5fdb35c1b386333301cdf67ddc5e55142 100644 (file)
@@ -73,7 +73,9 @@ ib_gid_t      bcast_mgid_template = {
 ipoib_port_t   *gp_ipoib_port;\r
 #endif\r
 \r
+static KDEFERRED_ROUTINE __port_mcast_garbage_dpc;\r
 static void __port_mcast_garbage_dpc(KDPC *p_gc_dpc,void *context,void *s_arg1, void *s_arg2);\r
+\r
 static void __port_do_mcast_garbage(ipoib_port_t* const        p_port );\r
 \r
 #if 0\r
@@ -1987,6 +1989,7 @@ __recv_cb_internal(
        IN                              uint32_t                                         *p_recv_cnt\r
        );\r
 \r
+static IO_WORKITEM_ROUTINE __iopoib_WorkItem;\r
 \r
 static void\r
 __iopoib_WorkItem(\r
@@ -2008,9 +2011,15 @@ __iopoib_WorkItem(
                total_recv_cnt += recv_cnt;\r
        }\r
 \r
-       if (WorkToDo) {\r
-               IoQueueWorkItem( p_port->pPoWorkItem, __iopoib_WorkItem, DelayedWorkQueue, p_port);\r
-       } else {\r
+       if (WorkToDo)\r
+       {\r
+               IoQueueWorkItem( p_port->pPoWorkItem,\r
+                                                (PIO_WORKITEM_ROUTINE) __iopoib_WorkItem,\r
+                                                DelayedWorkQueue,\r
+                                                p_port );\r
+       }\r
+       else\r
+       {\r
                // Release the reference count that was incremented when queued the work item.\r
                ipoib_port_deref( p_port, ref_recv_cb );\r
        }\r
index b331ad0004d73f0154947d762b3b8ea7f0ababb2..4aae2098e2a933685fb78dcf4f0bc4dc14af6d56 100644 (file)
 #include <complib/cl_spinlock.h>\r
 #include <complib/cl_qlist.h>\r
 #include "ipoib_debug.h"\r
-\r
-\r
 #include "ipoib_driver.h"\r
-#include "ipoib_debug.h"\r
-\r
 #include "ipoib_endpoint.h"\r
 #include "ipoib_port.h"\r
 \r
+#include <ntstrsafe.h>\r
 \r
-#include "ipoib_adapter.h"\r
-\r
-\r
-#endif __precomp_h
\ No newline at end of file
+#endif __precomp_h\r