Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:05:50 -0000
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345614 - stable/12/sys/dev/cxgbe
Message-ID:  <201903272155.x2RLtbVe057179@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Wed Mar 27 21:55:36 2019
New Revision: 345614
URL: https://svnweb.freebsd.org/changeset/base/345614

Log:
  MFC r343539:
  
  cxgbe(4): Add adapter information to messages logged by the OS-agnostic
  code in t4_hw.c.
  
  Sponsored by:	Chelsio Communications

Modified:
  stable/12/sys/dev/cxgbe/osdep.h
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/osdep.h
==============================================================================
--- stable/12/sys/dev/cxgbe/osdep.h	Wed Mar 27 21:53:44 2019	(r345613)
+++ stable/12/sys/dev/cxgbe/osdep.h	Wed Mar 27 21:55:36 2019	(r345614)
@@ -42,10 +42,14 @@
 #include <sys/syslog.h>
 #include <dev/pci/pcireg.h>
 
-#define CH_ERR(adap, fmt, ...) log(LOG_ERR, fmt, ##__VA_ARGS__)
-#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__)
-#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, fmt, ##__VA_ARGS__)
-#define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, fmt, ##__VA_ARGS__)
+#define CH_ERR(adap, fmt, ...) log(LOG_ERR, "%s: " fmt, \
+    device_get_nameunit(adap->dev), ##__VA_ARGS__)
+#define CH_WARN(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \
+    device_get_nameunit(adap->dev), ##__VA_ARGS__)
+#define CH_ALERT(adap, fmt, ...) log(LOG_ALERT, "%s: " fmt, \
+    device_get_nameunit(adap->dev), ##__VA_ARGS__)
+#define CH_WARN_RATELIMIT(adap, fmt, ...) log(LOG_WARNING, "%s: " fmt, \
+    device_get_nameunit(adap->dev), ##__VA_ARGS__)
 
 #ifndef LINUX_TYPES_DEFINED
 typedef int8_t  s8;





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903272155.x2RLtbVe057179>