[openib-general] Opensm - osm_vendor_mlx_ts.c patches

Yael Kalka eitan at mtl001.openib.org
Tue Sep 13 02:27:31 PDT 2005


Hi Hal,

I think you forgot to add the updates on osm_vendor_mlx_ts.c.
Your branch break compilation on this file.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: osm_vendor_mlx_ts.c
===================================================================
--- osm_vendor_mlx_ts.c	(revision 3395)
+++ osm_vendor_mlx_ts.c	(working copy)
@@ -52,7 +52,7 @@
 #include <fcntl.h>
 #include <errno.h>
 
-#include <osm_vendor_api.h>
+#include <vendor/osm_vendor_api.h>
 #include <vendor/osm_vendor_mlx_transport.h>
 #include <vendor/osm_vendor_mlx_dispatcher.h>
 #include <vendor/osm_vendor_mlx_svc.h>
@@ -178,6 +178,7 @@ __osmv_TOPSPIN_receiver_thr(void* p_ctx)
 
 ib_api_status_t
 osmv_transport_init(IN osm_bind_info_t *p_info,
+                    IN uint8_t hca_idx,
                     IN char hca_id[VENDOR_HCA_MAXNAMES],
                     IN osmv_bind_obj_t *p_bo)
 {
@@ -195,7 +196,7 @@ osmv_transport_init(IN osm_bind_info_t *
 
   /* open TopSpin file device */
   /* HACK: assume last char in hostid is the HCA index */
-  sprintf(device_file, "/dev/ts_ua%s", &hca_id[strlen(hca_id) -1]);
+  sprintf(device_file, "/dev/ts_ua%s", hca_idx);
   device_fd = open(device_file, O_RDWR );
   if (device_fd < 0)
   {
@@ -348,7 +349,7 @@ osmv_transport_mad_send(IN const osm_bin
   if( ret != sizeof(ts_mad) )
   {
     osm_log( p_vend->p_log, OSM_LOG_ERROR,
-             "osm_ts_send_mad: ERR 6804: "
+             "osmv_transport_mad_send: ERR 6804: "
              "Error sending mad (%d).\n", ret );
     status = IB_ERROR;
     goto Exit;
@@ -407,7 +408,7 @@ osmv_transport_done(IN const osm_bind_ha
      it'll know that we are currently closing down, and will not handle the
      mad. */
   p_bo->magic_ptr = 0;
-  usleep(3000000);
+  /* usleep(3000000); */
 
   /* seems the only way to abort a blocking read is to make it read something */
   __osm_transport_gen_dummy_mad(p_bo);
@@ -497,7 +498,7 @@ __osmv_TOPSPIN_mad_addr_to_osm_addr(
  *  DESCRIPTION     Modifies the port info for the bound port to set the "IS_SM" bit
  *                  according to the value given (TRUE or FALSE).
  */
-#ifdef OSM_VENDOR_INTF_TS_NO_VAPI
+#if (defined(OSM_VENDOR_INTF_TS_NO_VAPI) || defined(OSM_VENDOR_INTF_TS))
 
 
 void
@@ -522,7 +523,7 @@ osm_vendor_set_sm(
   if ( ts_ioctl_ret < 0 )
   {
     osm_log( p_vend->p_log, OSM_LOG_ERROR,
-             "osm_vendor_set_sm: ERR 7312: "
+             "osm_vendor_set_sm: ERR 6805: "
              "Unable set 'IS_SM' bit to:%u in port attributes (%d).\n",
              is_sm_val, ts_ioctl_ret );
   }




More information about the general mailing list