[ofw] [PATCH] Fix uncontrollable debug spew from mlx4_hca driver

Fab Tillier ftillier at microsoft.com
Tue Jan 11 22:31:22 PST 2011


The mlx4_hca driver will spew stuff to the debugger on every MAD WQE processed, which makes the debugger close to useless as any useful output is drowned out.

This patch makes it so that the debug flags are checked before generating output.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

Index: hw/mlx4/kernel/bus/drv/stat.c
===================================================================
--- hw/mlx4/kernel/bus/drv/stat.c	(revision 3068)
+++ hw/mlx4/kernel/bus/drv/stat.c	(working copy)
@@ -146,9 +146,11 @@ void st_dump_mlx_wqe(struct mlx4_dev *md
 	UNUSED_PARAM(wr);
 #endif
 	
-	mlx4_dbg(mdev, "\n\t ========== MLX WQE at %p, size %#x ==========\n",
-		wqe, size_in_dwords*4 );
-	
+	if ( mdev->pdev->p_stat_dev->flags & MLX4_MAD_TRACE_WR ) {
+		mlx4_dbg(mdev, "\n\t ========== MLX WQE at %p, size %#x ==========\n",
+			wqe, size_in_dwords*4 );
+	}
+
 	if ( mdev->pdev->p_stat_dev->flags & MLX4_MAD_TRACE_MLX_WQE_DUMP ) {
 		for ( j = 0; j < size_in_dwords; ++j ) {
 			mlx4_warn( mdev, "\t %04x:	%08x %08x %08x %08x \n", 16*j,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mlx4_dbgspew.patch
Type: application/octet-stream
Size: 768 bytes
Desc: mlx4_dbgspew.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20110112/bef8bd82/attachment.obj>


More information about the ofw mailing list