Author: np
Date: Tue Jan 29 00:49:12 2019
New Revision: 343539
URL: https://svnweb.freebsd.org/changeset/base/343539

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

Modified:
  head/sys/dev/cxgbe/osdep.h

Modified: head/sys/dev/cxgbe/osdep.h
==============================================================================
--- head/sys/dev/cxgbe/osdep.h  Mon Jan 28 21:48:04 2019        (r343538)
+++ head/sys/dev/cxgbe/osdep.h  Tue Jan 29 00:49:12 2019        (r343539)
@@ -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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to