[HW] Pass IRP_MN_QUERY_INTERFACE IRP down the stack.
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 12 Apr 2009 08:02:51 +0000 (08:02 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 12 Apr 2009 08:02:51 +0000 (08:02 +0000)
This patch changes the HCA driver to pass any IRP_MN_QUERY_INTERFACE IRP down the stack if the interface is supported, after setting the IRP status to STATUS_SUCCESS.  The bottom-most driver will complete the IRP without changing the status.

Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2093 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

hw/mlx4/kernel/hca/drv.c
hw/mthca/kernel/hca_pnp.c

index cb4d757..4af4c9e 100644 (file)
@@ -1328,7 +1328,14 @@ hca_query_interface(
                &GUID_RDMA_INTERFACE_VERBS ) )\r
        {\r
                status = __query_ci_ifc( p_dev_obj, p_io_stack );\r
-               *p_action = IrpComplete;\r
+               if( !NT_SUCCESS( status ) )\r
+               {\r
+                       *p_action = IrpComplete;\r
+               }\r
+               else\r
+               {\r
+                       *p_action = IrpSkip;\r
+               }\r
        }\r
        else\r
        {\r
index 054086a..1488a74 100644 (file)
@@ -912,7 +912,14 @@ hca_query_interface(
                &GUID_RDMA_INTERFACE_VERBS ) )\r
        {\r
                status = __query_ci_ifc( p_dev_obj, p_io_stack );\r
-               *p_action = IrpComplete;\r
+               if( !NT_SUCCESS( status ) )\r
+               {\r
+                       *p_action = IrpComplete;\r
+               }\r
+               else\r
+               {\r
+                       *p_action = IrpSkip;\r
+               }\r
        }\r
        else\r
        {\r