[ofw] patch: Fix WPP for mlx4 part one

Tzachi Dar tzachid at mellanox.co.il
Tue Jul 8 08:08:10 PDT 2008


This patch fixes some small issues that prevented WPP from working on
mlx4.
 
Index: mlx4/kernel/bus/core/iobuf.c
===================================================================
--- mlx4/kernel/bus/core/iobuf.c (revision 1340)
+++ mlx4/kernel/bus/core/iobuf.c (working copy)
@@ -33,6 +33,7 @@
  *
  * $Id: mt_memory.c 2020 2007-05-01 09:29:10Z leonid $
  */
+#include <mlx4_debug.h>
 #include "l2w.h"
 #include "pa_cash.h"
 #include "ib_verbs.h"
Index: mlx4/kernel/bus/core/l2w_umem.c
===================================================================
--- mlx4/kernel/bus/core/l2w_umem.c (revision 1340)
+++ mlx4/kernel/bus/core/l2w_umem.c (working copy)
@@ -1,4 +1,4 @@
-
+#include <mlx4_debug.h>
 #include "l2w.h"
 #include "ib_verbs.h"
 
Index: mlx4/kernel/bus/core/pa_cash.c
===================================================================
--- mlx4/kernel/bus/core/pa_cash.c (revision 1340)
+++ mlx4/kernel/bus/core/pa_cash.c (working copy)
@@ -32,7 +32,7 @@
  *
  * $Id: mlnx_uvp_cq.c 1611 2006-08-20 14:48:55Z sleybo $
  */
-
+#include <mlx4_debug.h>
 #include "l2w.h"
 #include "pa_cash.h"
 
Index: mlx4/kernel/bus/core/SOURCES
===================================================================
--- mlx4/kernel/bus/core/SOURCES (revision 1340)
+++ mlx4/kernel/bus/core/SOURCES (working copy)
@@ -43,7 +43,7 @@
 C_DEFINES = $(C_DEFINES) -DEVENT_TRACING
 
 RUN_WPP = $(SOURCES) -km -ext: .c .h .C .H \
- -scan:..\inc\mlx4_debug.h \
+ -scan:..\..\inc\mlx4_debug.h \
  -func:MLX4_PRINT(LEVEL,FLAGS,(MSG,...)) \
  -func:MLX4_PRINT_EXIT(LEVEL,FLAGS,(MSG,...)) 
 !ENDIF
Index: mlx4/kernel/bus/ib/cq.c
===================================================================
--- mlx4/kernel/bus/ib/cq.c (revision 1340)
+++ mlx4/kernel/bus/ib/cq.c (working copy)
@@ -29,7 +29,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
  */
-
+#include <mlx4_debug.h>
 #include "mlx4_ib.h"
 #include "cq.h"
 #include "qp.h"
Index: mlx4/kernel/bus/ib/mad.c
===================================================================
--- mlx4/kernel/bus/ib/mad.c (revision 1340)
+++ mlx4/kernel/bus/ib/mad.c (working copy)
@@ -30,6 +30,7 @@
  * SOFTWARE.
  */
 
+#include <mlx4_debug.h>
 #include "mlx4_ib.h"
 #include <ib_mad.h>
 #include <ib_smi.h>
Index: mlx4/kernel/bus/net/mlx4.h
===================================================================
--- mlx4/kernel/bus/net/mlx4.h (revision 1340)
+++ mlx4/kernel/bus/net/mlx4.h (working copy)
@@ -37,6 +37,7 @@
 #ifndef MLX4_H
 #define MLX4_H
 
+#include <mlx4_debug.h>
 #include "l2w.h"
 #include "device.h"
 #include "doorbell.h"
Index: mlx4/kernel/hca/drv.c
===================================================================
--- mlx4/kernel/hca/drv.c (revision 1340)
+++ mlx4/kernel/hca/drv.c (working copy)
@@ -35,6 +35,9 @@
 #include <wdmguid.h>
 
 #if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
 #include "drv.tmh"
 #endif 
 
@@ -652,7 +655,7 @@
 
  /* get node GUID */
  err = __get_dev_info( p_fdo, &p_fdo->hca.guid, &p_fdo->hca.hw_ver );
- if (err) {
+ if (err) {
 
   HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_LOW   ,
    ("can't get guid - ib_query_device() failed (%08X)\n", err ));
@@ -1765,7 +1768,7 @@
 
  /* get node GUID */
  err = __get_dev_info( p_fdo, &p_fdo->hca.guid, &p_fdo->hca.hw_ver );
- if (err) {
+ if (err) {
 
   HCA_PRINT(TRACE_LEVEL_ERROR   ,HCA_DBG_LOW   ,
    ("can't get guid - ib_query_device() failed (%08X)\n", err ));
Index: mlx4/kernel/hca/fw.c
===================================================================
--- mlx4/kernel/hca/fw.c (revision 1340)
+++ mlx4/kernel/hca/fw.c (working copy)
@@ -36,7 +36,7 @@
 #ifdef offsetof
 #undef offsetof
 #endif
-#include "vp.tmh"
+#include "fw.tmh"
 #endif
 
 
Index: mlx4/kernel/hca/SOURCES
===================================================================
--- mlx4/kernel/hca/SOURCES (revision 1340)
+++ mlx4/kernel/hca/SOURCES (working copy)
@@ -3,7 +3,7 @@
 TARGETTYPE=DRIVER
 
 !if $(FREEBUILD)
-#ENABLE_EVENT_TRACING=1
+ENABLE_EVENT_TRACING=1
 !else
 #ENABLE_EVENT_TRACING=1
 !endif
Index: mlx4/kernel/hca/verbs.c
===================================================================
--- mlx4/kernel/hca/verbs.c (revision 1340)
+++ mlx4/kernel/hca/verbs.c (working copy)
@@ -242,7 +242,6 @@
 // Queue pairs 
 //
 
-#if DBG
 static char *__print_qtype(enum ib_qp_type qtype)
 {
  char *str = NULL;
@@ -258,7 +257,6 @@
  }
  return str;
 }
-#endif
 
 struct ib_qp *ibv_create_qp(struct ib_pd *pd,
  struct ib_qp_init_attr *qp_init_attr,
Index: mlx4/kernel/inc/l2w.h
===================================================================
--- mlx4/kernel/inc/l2w.h (revision 1340)
+++ mlx4/kernel/inc/l2w.h (working copy)
@@ -283,7 +283,6 @@
 struct mlx4_dev;
 struct mlx4_priv;
 
-#include <mlx4_debug.h>
 #include <l2w_atomic.h>
 #include <l2w_bit.h>
 #include <l2w_bitmap.h>
Index: mlx4/kernel/inc/mlx4_debug.h
===================================================================
--- mlx4/kernel/inc/mlx4_debug.h (revision 1340)
+++ mlx4/kernel/inc/mlx4_debug.h (working copy)
@@ -33,14 +33,18 @@
 #ifndef  _MLX4_DEBUG_H_
 #define _MLX4_DEBUG_H_
 
+#include <ntddk.h>
+#define NTSTRSAFE_LIB
+#include <ntstrsafe.h>
+
+
 #include "ev_log.h"
 
-extern uint32_t  g_mlx4_dbg_level;
-extern uint32_t  g_mlx4_dbg_flags;
+extern unsigned int  g_mlx4_dbg_level;
+extern unsigned int  g_mlx4_dbg_flags;
 #define MAX_LOG_BUF_LEN  512
 extern WCHAR g_wlog_buf[ MAX_LOG_BUF_LEN ]; 
 extern UCHAR g_slog_buf[ MAX_LOG_BUF_LEN ];  
-
 static void _build_str( const char * format, ... )
 {
  NTSTATUS status;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080708/aacdca7a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlx4_wpp.patch
Type: application/octet-stream
Size: 5632 bytes
Desc: mlx4_wpp.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080708/aacdca7a/attachment.obj>


More information about the ofw mailing list