reschedule hearbeat messages if other control Queue send is not completed, typo in...
authoraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 10 Oct 2006 12:54:26 +0000 (12:54 +0000)
committeraestrin <aestrin@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 10 Oct 2006 12:54:26 +0000 (12:54 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@517 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/inic/kernel/netvnic.inf
ulp/inic/kernel/vnic_debug.h
ulp/inic/kernel/vnic_driver.c
ulp/inic/kernel/vnic_viport.c

index a4f72d3..803fdee 100644 (file)
@@ -6,7 +6,7 @@ Signature="$Windows NT$"
 Class=Net\r
 ClassGUID={4d36e972-e325-11ce-bfc1-08002be10318}\r
 Provider=%Inf_Provider%\r
-DriverVer=01/12/2006,3.0.0039.0\r
+DriverVer=10/09/2006,3.2.0047.0\r
 \r
 [ControlFlags]\r
 ExcludeFromSelect = IBA\V00066aP00000030\r
@@ -80,7 +80,7 @@ AddService = vnic,%SPSVCINST_ASSOCSERVICE%,VNIC.ServiceInstall,VNIC.EventLogInst
 vnic.sys\r
 \r
 [VNIC.AddReg]\r
-HKR, Ndi,                       Service,    0, "ipoib"\r
+HKR, Ndi,                       Service,    0, "vnic"\r
 HKR, Ndi\Interfaces,            UpperRange, 0, "ndis5"\r
 HKR, Ndi\Interfaces,            LowerRange, 0, "ethernet"\r
 \r
index 62e7f1d..ea1dad7 100644 (file)
@@ -66,8 +66,8 @@ extern uint32_t               g_vnic_dbg_lvl;
 #define VNIC_DBG_ERROR         CL_DBG_ERROR\r
 #define VNIC_DBG_ALL           CL_DBG_ALL\r
 \r
-#define VNIC_DEBUG_FLAGS ( VNIC_DBG_ERROR /*| VNIC_DBG_WARN |  VNIC_DBG_INFO | VNIC_DBG_FUNC | VNIC_DBG_OID | VNIC_DBG_VIPORT | VNIC_DBG_CTRL | VNIC_DBG_DATA */)\r
-\r
+//#define VNIC_DEBUG_FLAGS ( VNIC_DBG_ERROR | VNIC_DBG_WARN |  VNIC_DBG_INFO | VNIC_DBG_FUNC | VNIC_DBG_OID | VNIC_DBG_VIPORT | VNIC_DBG_CTRL | VNIC_DBG_DATA | VNIC_DBG_IB)\r
+#define VNIC_DEBUG_FLAGS ( VNIC_DBG_ERROR | VNIC_DBG_WARN |    VNIC_DBG_INFO )\r
 /* Enter and exit macros automatically add VNIC_DBG_FUNC bit */\r
 #define VNIC_ENTER( lvl )      \\r
        CL_ENTER( (lvl | VNIC_DBG_FUNC), g_vnic_dbg_lvl )\r
index 67ecbb9..7dd3335 100644 (file)
@@ -1233,7 +1233,7 @@ vnic_reset(
        UNREFERENCED_PARAMETER( adapter_context );\r
 \r
        VNIC_EXIT( VNIC_DBG_INIT );\r
-       return NDIS_STATUS_NOT_RESETTABLE;\r
+       return NDIS_STATUS_SUCCESS;\r
 }\r
 \r
 \r
index 388f685..02be3cf 100644 (file)
@@ -654,8 +654,15 @@ viport_timeout(
        if( p_viport && p_viport->data.connected )\r
        {\r
                // TODO: What about send failure?\r
-               control_heartbeatReq( &p_viport->control,\r
-                                               p_viport->port_config.hbTimeout );\r
+               if( !p_viport->control.reqOutstanding )\r
+               {\r
+                       control_heartbeatReq( &p_viport->control,\r
+                                                       p_viport->port_config.hbTimeout );\r
+               }\r
+               else\r
+               {       /* send WQE is taken, send heartbeat later */\r
+                       viport_timer( p_viport, p_viport->port_config.hbInterval );\r
+               }\r
        }\r
 }\r
 \r
@@ -923,6 +930,12 @@ _viport_process_query(
        if( !InterlockedCompareExchange( &p_viport->updates, 0, 0 ) )\r
        {\r
                VNIC_TRACE_EXIT( VNIC_DBG_VIPORT, ("No updates.\n") );\r
+               /*  now can restart heartbeats */\r
+               if( !p_viport->timerActive &&\r
+                       p_viport->port_config.hbInterval )\r
+               {\r
+                       viport_timer( p_viport, p_viport->port_config.hbInterval );\r
+               }\r
                return NDIS_STATUS_SUCCESS;\r
        }\r
 \r
@@ -935,6 +948,8 @@ _viport_process_query(
        {\r
                status = NDIS_STATUS_PENDING;\r
        }\r
+       /* stop heartbeat timer to serve another query */\r
+       viport_timerStop( p_viport );\r
 \r
        // Handle update bits one at a time.\r
        if( p_viport->updates & NEED_ADDRESS_CONFIG )\r