Date: Mon, 22 Sep 2014 19:42:18 +0000 (UTC) From: David C Somayajulu <davidcs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271995 - stable/9/sys/dev/bxe Message-ID: <201409221942.s8MJgIYE080379@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: davidcs Date: Mon Sep 22 19:42:18 2014 New Revision: 271995 URL: http://svnweb.freebsd.org/changeset/base/271995 Log: MFC r271728 For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message. Modified: stable/9/sys/dev/bxe/ecore_sp.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bxe/ecore_sp.h ============================================================================== --- stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:37:03 2014 (r271994) +++ stable/9/sys/dev/bxe/ecore_sp.h Mon Sep 22 19:42:18 2014 (r271995) @@ -246,14 +246,23 @@ ECORE_CRC32_LE(uint32_t seed, uint8_t *m #else +extern unsigned long bxe_debug; + +#define BXE_DEBUG_ECORE_DBG_BREAK_IF 0x01 +#define BXE_DEBUG_ECORE_BUG 0x02 +#define BXE_DEBUG_ECORE_BUG_ON 0x04 + #define ECORE_DBG_BREAK_IF(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_DBG_BREAK_IF) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #define ECORE_BUG(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_BUG) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #define ECORE_BUG_ON(exp) \ - printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); + if (bxe_debug & BXE_DEBUG_ECORE_BUG_ON) \ + printf("%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__); #endif /* #ifdef ECORE_STOP_ON_ERROR */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409221942.s8MJgIYE080379>