[IBAL] The current connection establishment code will return STATUS_HOST_UNREACHABLE...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 2 Jul 2008 12:48:17 +0000 (12:48 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 2 Jul 2008 12:48:17 +0000 (12:48 +0000)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1325 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/kernel/al_ndi_cm.c

index da6a35f..d23d92c 100644 (file)
@@ -962,7 +962,16 @@ err_irp_complete:
        h_qp->p_irp_que->state = NDI_CM_IDLE;   \r
        /* the IRP "has" 2 QP references, taken in __ndi_ats_query */\r
        if ( h_ioctl )\r
-               __ndi_complete_irp( h_qp, h_ioctl, STATUS_HOST_UNREACHABLE );\r
+    {\r
+        if( p_query_rec->status == IB_TIMEOUT )\r
+        {\r
+                       __ndi_complete_irp( h_qp, h_ioctl, STATUS_TIMEOUT );\r
+        }\r
+        else\r
+        {\r
+                       __ndi_complete_irp( h_qp, h_ioctl, STATUS_HOST_UNREACHABLE );\r
+        }\r
+    }\r
        deref_al_obj( &h_qp->obj );     /* release IRP SA reference */\r
 \r
 exit:  \r
@@ -1043,9 +1052,18 @@ __ndi_ats_query_cb(
        h_ioctl = IoCsqRemoveNextIrp( &h_qp->p_irp_que->csq, NULL );\r
        if( !h_ioctl || p_query_rec->status != IB_SUCCESS || !p_query_rec->result_cnt )\r
        {\r
+        NTSTATUS status;\r
+        if( p_query_rec->status == IB_TIMEOUT )\r
+        {\r
+            status = STATUS_TIMEOUT;\r
+        }\r
+        else\r
+        {\r
+            status = STATUS_HOST_UNREACHABLE;\r
+        }\r
                h_qp->p_irp_que->state = NDI_CM_IDLE; \r
                if ( h_ioctl )\r
-                       __ndi_complete_irp( h_qp, h_ioctl, STATUS_HOST_UNREACHABLE );\r
+                       __ndi_complete_irp( h_qp, h_ioctl, status );\r
                deref_al_obj( &h_qp->obj );     /* release IRP SA reference */\r
                cl_free( p_req );\r
                goto exit;              /* ATS request failed */\r