Remove XXX_PTR64 and TO_ULONG_PTR from IPoIB
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 30 Jun 2008 18:09:25 +0000 (18:09 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 30 Jun 2008 18:09:25 +0000 (18:09 +0000)
Signed-off-by: Fab Tillier <ftillier@microsoft.com>
Acked-by: Tzachi Dar <tzachid@mellanox.co.il>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1310 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

ulp/ipoib/kernel/ipoib_adapter.c
ulp/ipoib/kernel/ipoib_adapter.h
ulp/ipoib/kernel/ipoib_endpoint.c
ulp/ipoib/kernel/ipoib_endpoint.h
ulp/ipoib/kernel/ipoib_ibat.c
ulp/ipoib/kernel/ipoib_port.c
ulp/ipoib/kernel/ipoib_port.h

index e594a35..c7d3e35 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -783,7 +784,7 @@ ipoib_reset_adapter(
        IN                              ipoib_adapter_t* const          p_adapter )\r
 {\r
        ib_api_status_t         status;\r
-       ib_pnp_handle_t VOID_PTR64              h_pnp;\r
+       ib_pnp_handle_t         h_pnp;\r
 \r
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
 \r
index dbb022b..b895b5f 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -141,8 +142,8 @@ typedef struct _ipoib_adapter
 \r
        cl_list_item_t                  entry;\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_pnp_event_t                  state;\r
        boolean_t                               hung;\r
index 465817d..d63e700 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -58,10 +59,10 @@ __endpt_free(
 \r
 static ib_api_status_t\r
 __create_mcast_av(\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
        IN                              uint8_t                                         port_num,\r
        IN                              ib_member_rec_t* const          p_member_rec,\r
-               OUT                     ib_av_handle_t* FUNC_PTR64 const                ph_av );\r
+               OUT                     ib_av_handle_t* const           ph_av );\r
 \r
 static inline ipoib_port_t*\r
 __endpt_parent(\r
@@ -112,10 +113,10 @@ ipoib_endpt_create(
 \r
 static ib_api_status_t\r
 __create_mcast_av(\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
        IN                              uint8_t                                         port_num,\r
        IN                              ib_member_rec_t* const          p_member_rec,\r
-               OUT                     ib_av_handle_t* FUNC_PTR64 const                ph_av )\r
+               OUT                     ib_av_handle_t* const           ph_av )\r
 {\r
        ib_av_attr_t    av_attr;\r
        uint32_t                flow_lbl;\r
@@ -158,7 +159,7 @@ __create_mcast_av(
 ib_api_status_t\r
 ipoib_endpt_set_mcast(\r
        IN                              ipoib_endpt_t* const            p_endpt,\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
        IN                              uint8_t                                         port_num,\r
        IN                              ib_mcast_rec_t* const           p_mcast_rec )\r
 {\r
@@ -355,7 +356,7 @@ __path_query_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_ENDPT );\r
 \r
-       p_endpt = (ipoib_endpt_t*VOID_PTR64)p_query_rec->query_context;\r
+       p_endpt = (ipoib_endpt_t*)p_query_rec->query_context;\r
        p_port = __endpt_parent( p_endpt );\r
 \r
        cl_obj_lock( &p_endpt->obj );\r
index c33b201..6887fd6 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -52,13 +53,13 @@ typedef struct _ipoib_endpt
        cl_map_item_t                   mac_item;\r
        cl_fmap_item_t                  gid_item;\r
        cl_map_item_t                   lid_item;\r
-TO_LONG_PTR(   ib_query_handle_t ,             h_query) ; \r
-TO_LONG_PTR(   ib_mcast_handle_t ,             h_mcast) ; \r
+       ib_query_handle_t               h_query;\r
+       ib_mcast_handle_t               h_mcast;\r
        mac_addr_t                              mac;\r
        ib_gid_t                                dgid;\r
        net16_t                                 dlid;\r
        net32_t                                 qpn;\r
-TO_LONG_PTR(   ib_av_handle_t ,                        h_av) ; \r
+       ib_av_handle_t                  h_av;\r
        boolean_t                               expired;\r
        ib_al_ifc_t                             *p_ifc;\r
 \r
@@ -121,7 +122,7 @@ ipoib_endpt_create(
 ib_api_status_t\r
 ipoib_endpt_set_mcast(\r
        IN                              ipoib_endpt_t* const            p_endpt,\r
-       IN                              ib_pd_handle_t FUNC_PTR64                               h_pd,\r
+       IN                              ib_pd_handle_t                          h_pd,\r
        IN                              uint8_t                                         port_num,\r
        IN                              ib_mcast_rec_t* const           p_mcast_rec );\r
 \r
index 06c568a..e162765 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -546,25 +547,25 @@ __ipoib_dispatch(
 \r
        switch( pIoStack->Parameters.DeviceIoControl.IoControlCode )\r
        {\r
-       case IOCTL_IBAT_PORTS: //check_done, fixed print_ips\r
+       case IOCTL_IBAT_PORTS:\r
                IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,\r
                        ("IOCTL_IBAT_PORTS received\n") );\r
                status = __ibat_get_ports( pIrp, pIoStack );\r
                break;\r
 \r
-       case IOCTL_IBAT_IP_ADDRESSES: //check_done, fixed query_ip_address,CProvider::QueryAddressList,print_ips\r
+       case IOCTL_IBAT_IP_ADDRESSES:\r
                IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,\r
                        ("IOCTL_IBAT_IP_ADDRESSES received\n" ));\r
                status = __ibat_get_ips( pIrp, pIoStack );\r
                break;\r
 \r
-       case IOCTL_IBAT_MAC_TO_GID: //check_done, fixed remote_ip, SdpArp::DestPortGidFromMac\r
+       case IOCTL_IBAT_MAC_TO_GID:\r
                IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,\r
                        ("IOCTL_IBAT_MAC_TO_GID received\n" ));\r
                status = __ibat_mac_to_gid( pIrp, pIoStack );\r
                break;\r
 \r
-       case IOCTL_IBAT_IP_TO_PORT: //check_done, fixed CProvider::OpenAdapter\r
+       case IOCTL_IBAT_IP_TO_PORT:\r
                IPOIB_PRINT(TRACE_LEVEL_INFORMATION, IPOIB_DBG_IOCTL,\r
                        ("IOCTL_IBAT_IP_TO_PORT received\n" ));\r
                status = __ibat_ip_to_port( pIrp, pIoStack );\r
index 5855cfa..4c2091b 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
@@ -208,7 +209,7 @@ __recv_mgr_repost(
 \r
 static void\r
 __recv_cb(\r
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,\r
+       IN              const   ib_cq_handle_t                          h_cq,\r
        IN                              void                                            *cq_context );\r
 \r
 static void\r
@@ -321,7 +322,7 @@ __process_failed_send(
 \r
 static void\r
 __send_cb(\r
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,\r
+       IN              const   ib_cq_handle_t                          h_cq,\r
        IN                              void                                            *cq_context );\r
 \r
 \r
@@ -1582,7 +1583,7 @@ ipoib_return_packet(
 \r
 static void\r
 __recv_cb(\r
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,\r
+       IN              const   ib_cq_handle_t                          h_cq,\r
        IN                              void                                            *cq_context )\r
 {\r
        ipoib_port_t            *p_port;\r
@@ -3933,7 +3934,7 @@ ipoib_port_resume(
 \r
 static void\r
 __send_cb(\r
-       IN              const   ib_cq_handle_t FUNC_PTR64                               h_cq,\r
+       IN              const   ib_cq_handle_t                          h_cq,\r
        IN                              void                                            *cq_context )\r
 {\r
        ipoib_port_t            *p_port;\r
@@ -4826,7 +4827,7 @@ __port_info_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)p_query_rec->query_context;\r
+       p_port = (ipoib_port_t*)p_query_rec->query_context;\r
 \r
        cl_obj_lock( &p_port->obj );\r
        p_port->ib_mgr.h_query = NULL;\r
@@ -4983,7 +4984,7 @@ __bcast_get_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)p_query_rec->query_context;\r
+       p_port = (ipoib_port_t*)p_query_rec->query_context;\r
 \r
        cl_obj_lock( &p_port->obj );\r
        p_port->ib_mgr.h_query = NULL;\r
@@ -5256,7 +5257,7 @@ __bcast_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)p_mcast_rec->mcast_context;\r
+       p_port = (ipoib_port_t*)p_mcast_rec->mcast_context;\r
 \r
        cl_obj_lock( &p_port->obj );\r
        if( p_port->state != IB_QPS_INIT )\r
@@ -5376,7 +5377,7 @@ __qp_event(
 {\r
        UNUSED_PARAM( p_event_rec );\r
        CL_ASSERT( p_event_rec->context );\r
-       ((ipoib_port_t* VOID_PTR64)p_event_rec->context)->p_adapter->hung = TRUE;\r
+       ((ipoib_port_t*)p_event_rec->context)->p_adapter->hung = TRUE;\r
 }\r
 \r
 \r
@@ -5386,7 +5387,7 @@ __cq_event(
 {\r
        UNUSED_PARAM( p_event_rec );\r
        CL_ASSERT( p_event_rec->context );\r
-       ((ipoib_port_t* VOID_PTR64)p_event_rec->context)->p_adapter->hung = TRUE;\r
+       ((ipoib_port_t*)p_event_rec->context)->p_adapter->hung = TRUE;\r
 }\r
 \r
 \r
@@ -5575,7 +5576,7 @@ __mcast_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_MCAST );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)p_mcast_rec->mcast_context;\r
+       p_port = (ipoib_port_t*)p_mcast_rec->mcast_context;\r
 \r
        cl_obj_lock( &p_port->obj );\r
        if( p_port->state != IB_QPS_RTS )\r
@@ -5675,7 +5676,7 @@ ipoib_leave_mcast_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_MCAST );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)context;\r
+       p_port = (ipoib_port_t*)context;\r
 \r
        IPOIB_PRINT( TRACE_LEVEL_VERBOSE, IPOIB_DBG_MCAST,("p_port->mcast_cnt = %d\n", p_port->mcast_cnt));\r
        \r
@@ -5703,7 +5704,7 @@ __leave_error_mcast_cb(
 \r
        IPOIB_ENTER( IPOIB_DBG_MCAST );\r
 \r
-       p_port = (ipoib_port_t* VOID_PTR64)context;\r
+       p_port = (ipoib_port_t*)context;\r
 \r
        ipoib_port_deref( p_port, ref_leave_mcast);\r
        IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION, IPOIB_DBG_MCAST,\r
index 0018d9b..04ecd1c 100644 (file)
@@ -1,6 +1,7 @@
 /*\r
  * Copyright (c) 2005 SilverStorm Technologies.  All rights reserved.\r
  * Copyright (c) 2006 Mellanox Technologies.  All rights reserved.\r
+ * Portions Copyright (c) 2008 Microsoft Corporation.  All rights reserved.\r
  *\r
  * This software is available to you under the OpenIB.org BSD license\r
  * below:\r
 \r
 typedef struct _ipoib_ib_mgr\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_cq_handle_t ,                        h_recv_cq) ; \r
-TO_LONG_PTR(   ib_cq_handle_t ,                        h_send_cq) ; \r
-TO_LONG_PTR(   ib_qp_handle_t ,                        h_qp) ; \r
-TO_LONG_PTR(   ib_query_handle_t ,             h_query) ; \r
+       ib_ca_handle_t                  h_ca;\r
+       ib_pd_handle_t                  h_pd;\r
+       ib_cq_handle_t                  h_recv_cq;\r
+       ib_cq_handle_t                  h_send_cq;\r
+       ib_qp_handle_t                  h_qp;\r
+       ib_query_handle_t               h_query;\r
        net32_t                                 qpn;\r
 \r
-TO_LONG_PTR(   ib_mr_handle_t ,                        h_mr) ; \r
+       ib_mr_handle_t                  h_mr;\r
        net32_t                                 lkey;\r
 \r
        uint8_t                                 rate;\r