svn commit: r346962 - stable/11/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Tue Apr 30 16:30:17 UTC 2019
Author: np
Date: Tue Apr 30 16:30:16 2019
New Revision: 346962
URL: https://svnweb.freebsd.org/changeset/base/346962
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/11/sys/dev/cxgbe/osdep.h
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/cxgbe/osdep.h
==============================================================================
--- stable/11/sys/dev/cxgbe/osdep.h Tue Apr 30 15:28:52 2019 (r346961)
+++ stable/11/sys/dev/cxgbe/osdep.h Tue Apr 30 16:30:16 2019 (r346962)
@@ -40,10 +40,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;
More information about the svn-src-stable
mailing list