[IBAL] Provide a way for kernel clients to get HCA's device object.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Sep 2006 23:07:45 +0000 (23:07 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 29 Sep 2006 23:07:45 +0000 (23:07 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@508 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/al/al_ci_ca.h
core/al/kernel/al_ci_ca.c
core/bus/kernel/bus_pnp.c
inc/kernel/iba/ib_al_ifc.h

index a7d2019..d0405ef 100644 (file)
@@ -56,6 +56,10 @@ ib_api_status_t
 create_ci_ca(\r
        IN                              al_obj_t                                        *p_parent_obj,\r
        IN              const   ci_interface_t*                         p_ci );\r
+\r
+DEVICE_OBJECT*\r
+get_ca_dev(\r
+       IN              const   ib_ca_handle_t                          h_ca );\r
 #endif\r
 \r
 \r
index 29a68bb..0ecc686 100644 (file)
@@ -507,3 +507,14 @@ ci_call(
        AL_EXIT( AL_DBG_QUERY );\r
        return status;\r
 }\r
+\r
+\r
+DEVICE_OBJECT*\r
+get_ca_dev(\r
+       IN              const   ib_ca_handle_t                          h_ca )\r
+{\r
+       ASSERT( h_ca );\r
+\r
+       ObReferenceObject( h_ca->obj.p_ci_ca->verbs.p_hca_dev );\r
+       return h_ca->obj.p_ci_ca->verbs.p_hca_dev;\r
+}
\ No newline at end of file
index 2ff55a8..9eea76c 100644 (file)
@@ -596,6 +596,7 @@ al_set_ifc(
        p_ifc->sync_destroy = ib_sync_destroy;\r
        p_ifc->open_ca = ib_open_ca;\r
        p_ifc->query_ca = ib_query_ca;\r
+       p_ifc->get_dev = get_ca_dev;\r
        p_ifc->close_ca = ib_close_ca;\r
        p_ifc->alloc_pd = ib_alloc_pd;\r
        p_ifc->dealloc_pd = ib_dealloc_pd;\r
index e3378fc..c28bc9f 100644 (file)
@@ -47,7 +47,7 @@
 *      IB resources provided by HCAs.\r
 *********/\r
 \r
-#define AL_INTERFACE_VERSION           (8)\r
+#define AL_INTERFACE_VERSION           (9)\r
 \r
 \r
 \r
@@ -70,6 +70,10 @@ typedef ib_api_status_t
                OUT                     ib_ca_attr_t* const                     p_ca_attr OPTIONAL,\r
        IN      OUT                     uint32_t* const                         p_size );\r
 \r
+typedef DEVICE_OBJECT*\r
+(*ib_pfn_get_ca_dev_t)(\r
+       IN              const   ib_ca_handle_t                          h_ca );\r
+\r
 typedef ib_api_status_t\r
 (*ib_pfn_query_ca_by_guid_t)(\r
        IN              const   ib_al_handle_t                          h_al,\r
@@ -598,6 +602,7 @@ typedef struct _ib_al_ifc
        ib_pfn_sync_destroy_t           sync_destroy;\r
        ib_pfn_open_ca_t                        open_ca;\r
        ib_pfn_query_ca_t                       query_ca;\r
+       ib_pfn_get_ca_dev_t                     get_dev;\r
        ib_pfn_close_ca_t                       close_ca;\r
        ib_pfn_alloc_pd_t                       alloc_pd;\r
        ib_pfn_dealloc_pd_t                     dealloc_pd;\r