[SRP] This patch removes XXX_PTR64 and TO_ULONG_PTR macro use from SRP.
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 29 Jun 2008 16:21:53 +0000 (16:21 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 29 Jun 2008 16:21:53 +0000 (16:21 +0000)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1306 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/srp/kernel/srp_connection.c
ulp/srp/kernel/srp_connection.h
ulp/srp/kernel/srp_data_path.c
ulp/srp/kernel/srp_data_path.h
ulp/srp/kernel/srp_descriptors.c
ulp/srp/kernel/srp_descriptors.h
ulp/srp/kernel/srp_event.c
ulp/srp/kernel/srp_hba.c
ulp/srp/kernel/srp_hba.h
ulp/srp/kernel/srp_hca.h

index 1cccb7c..5b7780f 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -286,7 +287,7 @@ void
 __srp_cm_dreq_cb(\r
        IN  ib_cm_dreq_rec_t    *p_cm_dreq_rec )\r
 {\r
-       srp_session_t   *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_dreq_rec->qp_context;\r
+       srp_session_t   *p_srp_session = (srp_session_t*)p_cm_dreq_rec->qp_context;\r
        srp_hba_t       *p_hba = p_srp_session->p_hba;\r
 \r
        SRP_ENTER( SRP_DBG_PNP );\r
@@ -336,9 +337,9 @@ void
 __srp_cm_reply_cb(\r
        IN  ib_cm_rep_rec_t     *p_cm_reply)\r
 {\r
-       srp_session_t           *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_reply->qp_context;\r
+       srp_session_t           *p_srp_session = (srp_session_t*)p_cm_reply->qp_context;\r
        srp_connection_t        *p_connection;\r
-       srp_login_rsp_t         *p_srp_login_rsp = (srp_login_rsp_t* VOID_PTR64)p_cm_reply->p_rep_pdata;\r
+       srp_login_rsp_t         *p_srp_login_rsp = (srp_login_rsp_t*)p_cm_reply->p_rep_pdata;\r
        ib_api_status_t         status;\r
        union\r
        {\r
@@ -531,9 +532,9 @@ void
 __srp_cm_rej_cb(\r
        IN  ib_cm_rej_rec_t     *p_cm_reject)\r
 {\r
-       srp_session_t       *p_srp_session = (srp_session_t* VOID_PTR64)p_cm_reject->qp_context;\r
+       srp_session_t       *p_srp_session = (srp_session_t*)p_cm_reject->qp_context;\r
        srp_connection_t    *p_connection;\r
-       srp_login_rej_t     *p_srp_login_rej = (srp_login_rej_t* VOID_PTR64)p_cm_reject->p_rej_pdata;\r
+       srp_login_rej_t     *p_srp_login_rej = (srp_login_rej_t*)p_cm_reject->p_rej_pdata;\r
        cl_status_t         cl_status;\r
 \r
        SRP_ENTER( SRP_DBG_PNP );\r
@@ -870,3 +871,4 @@ srp_free_connection(
 \r
 \r
 \r
+\r
index c3921da..982a7b8 100644 (file)
@@ -66,9 +66,9 @@ typedef struct _srp_connection
 \r
        srp_connection_state_t  state;\r
 \r
-TO_LONG_PTR(   ib_cq_handle_t ,          h_send_cq) ; \r
-TO_LONG_PTR(   ib_cq_handle_t ,          h_recv_cq) ; \r
-TO_LONG_PTR(   ib_qp_handle_t ,          h_qp) ; \r
+       ib_cq_handle_t          h_send_cq;\r
+       ib_cq_handle_t          h_recv_cq;\r
+       ib_qp_handle_t          h_qp;\r
 \r
        ib_path_rec_t           *p_path_rec;\r
        srp_ib_port_id_t                init_port_id;\r
index 4ee0ac3..f879d7f 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -80,7 +81,7 @@ __srp_map_fmr(
        net32_t                                         lkey;\r
        net32_t                                         rkey;\r
        srp_session_t                                   *p_srp_session;\r
-       mlnx_fmr_pool_el_t VOID_PTR64                   p_fmr_el;\r
+       mlnx_fmr_pool_el_t                      p_fmr_el;\r
 \r
        SRP_ENTER( SRP_DBG_DATA );\r
 \r
@@ -334,7 +335,7 @@ Set Timer to Process Send Completions - Usually bad if we get here
 */\r
 void\r
 srp_send_completion_cb(\r
-       IN      const   ib_cq_handle_t FUNC_PTR64               h_cq,\r
+       IN      const   ib_cq_handle_t          h_cq,\r
        IN                      void                            *p_context )\r
 {\r
        srp_session_t   *p_srp_session = (srp_session_t *)p_context;\r
@@ -895,7 +896,7 @@ Set Timer to Process Receive Completions - Responses to our requests
 */\r
 void\r
 srp_recv_completion_cb(\r
-       IN      const   ib_cq_handle_t FUNC_PTR64               h_cq,\r
+       IN      const   ib_cq_handle_t          h_cq,\r
        IN                      void                            *p_context )\r
 {\r
        srp_session_t   *p_srp_session = (srp_session_t *)p_context;\r
index 2c992b4..63db7be 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -54,12 +55,12 @@ typedef struct _srp_conn_info
 \r
 void\r
 srp_send_completion_cb(\r
-       IN      const   ib_cq_handle_t FUNC_PTR64               h_cq,\r
+       IN      const   ib_cq_handle_t          h_cq,\r
        IN                      void                            *p_context );\r
 \r
 void\r
 srp_recv_completion_cb(\r
-       IN      const   ib_cq_handle_t FUNC_PTR64               h_cq,\r
+       IN      const   ib_cq_handle_t          h_cq,\r
        IN                      void                            *p_context );\r
 \r
 BOOLEAN\r
index ed20740..bf07ec7 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -59,8 +60,8 @@ static ib_api_status_t
 __srp_create_recv_descriptors(\r
        IN      OUT                     srp_descriptors_t                       *p_descriptors,\r
        IN                              ib_al_ifc_t* const                      p_ifc,\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
+       IN                              ib_qp_handle_t                          h_qp,\r
        IN                              net32_t                                         lkey)\r
 {\r
        ib_api_status_t         status = IB_SUCCESS;\r
@@ -104,7 +105,7 @@ __srp_create_recv_descriptors(
        for ( i = 0; i < p_descriptors->recv_descriptor_count; i++ )\r
        {\r
                p_descriptor->wr.p_next = NULL;\r
-               p_descriptor->wr.wr_id = (uint64_t)((void* VOID_PTR64)p_descriptor);\r
+               p_descriptor->wr.wr_id = (ULONG_PTR)p_descriptor;\r
                p_descriptor->wr.num_ds = 1;\r
                p_descriptor->wr.ds_array = p_descriptor->ds;\r
 \r
@@ -151,8 +152,8 @@ srp_init_descriptors(
        IN                              uint32_t                                        recv_descriptor_count,\r
        IN                              uint32_t                                        recv_data_segment_size,\r
        IN                              ib_al_ifc_t* const                      p_ifc,\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
+       IN                              ib_qp_handle_t                          h_qp,\r
        IN                              net32_t                                         lkey)\r
 {\r
        ib_api_status_t status;\r
index 9fc130d..00cbe1a 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -58,7 +59,7 @@ typedef struct _srp_send_descriptor
        ib_send_wr_t                            wr;\r
        uint64_t                                        tag;\r
        SCSI_REQUEST_BLOCK              *p_srb;\r
-TO_LONG_PTR(   mlnx_fmr_pool_el_t ,            p_fmr_el) ; \r
+       mlnx_fmr_pool_el_t              p_fmr_el;\r
        ib_local_ds_t                           ds[SRP_NUM_SGE];\r
        /* must be the last*/\r
        uint8_t                                 data_segment[SRP_MAX_IU_SIZE];\r
@@ -95,8 +96,8 @@ srp_init_descriptors(
        IN                              uint32_t                                        recv_descriptor_count,\r
        IN                              uint32_t                                        recv_data_segment_size,\r
        IN                              ib_al_ifc_t* const                      p_ifc,\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
-       IN                              ib_qp_handle_t FUNC_PTR64                               h_qp,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
+       IN                              ib_qp_handle_t                          h_qp,\r
        IN                              net32_t                                         lkey);\r
 \r
 ib_api_status_t\r
index 93afa02..be1c2ad 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -52,7 +53,7 @@ void
 srp_async_event_handler_cb(\r
        IN  ib_async_event_rec_t    *p_event_rec )\r
 {\r
-       srp_session_t   *p_srp_session = (srp_session_t * VOID_PTR64)p_event_rec->context;\r
+       srp_session_t   *p_srp_session = (srp_session_t *)p_event_rec->context;\r
 \r
        SRP_ENTER( SRP_DBG_PNP );\r
 \r
index 0aeb177..049b2ea 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corp.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -899,7 +900,7 @@ __srp_pnp_cb(
        \r
        SRP_ENTER( SRP_DBG_PNP );\r
 \r
-       p_hba = (srp_hba_t* VOID_PTR64)p_pnp_rec->pnp_context;\r
+       p_hba = (srp_hba_t*)p_pnp_rec->pnp_context;\r
        p_ioc_rec = (ib_pnp_ioc_rec_t*)p_pnp_rec;\r
        p_ioc_path = (ib_pnp_ioc_path_rec_t*)p_pnp_rec;\r
 \r
index ff721ff..86d3238 100644 (file)
@@ -62,8 +62,8 @@ typedef struct _srp_hba
        /* The extension is     needed for StorPort     calls. */\r
        struct _srp_ext                 *p_ext;\r
 \r
-TO_LONG_PTR(   ib_al_handle_t ,                        h_al) ; \r
-TO_LONG_PTR(   ib_pnp_handle_t ,                       h_pnp) ; \r
+       ib_al_handle_t                  h_al;\r
+       ib_pnp_handle_t                 h_pnp;\r
 \r
        ib_al_ifc_t                             ifc;\r
        ioc_ifc_data_t                  info;\r
index 55e7850..897a3e9 100644 (file)
@@ -42,10 +42,10 @@ typedef struct _srp_hca
 {\r
        srp_hba_t                               *p_hba;\r
 \r
-TO_LONG_PTR(   ib_ca_handle_t ,                        h_ca) ; \r
-TO_LONG_PTR(   ib_pd_handle_t ,                        h_pd) ; \r
-TO_LONG_PTR(   ib_mr_handle_t ,                        h_mr) ; \r
-TO_LONG_PTR(   mlnx_fmr_pool_handle_t ,        h_fmr_pool) ; \r
+       ib_ca_handle_t                  h_ca;\r
+       ib_pd_handle_t                  h_pd;\r
+       ib_mr_handle_t                  h_mr;\r
+       mlnx_fmr_pool_handle_t  h_fmr_pool;\r
        uint32_t                                        fmr_page_size;\r
        uint32_t                                        fmr_page_shift;\r
        uint64_t                                        vaddr;\r