Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:08:48 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:10:08 +0100
commit06e4b77b7d828baf975159189e62afe0282903aa (patch)
tree5730127243eed5e07e9409db3f6855d7ab52f965
parentc6cf52a1c639e002d8840a40e7cb2f97bf60cdcc (diff)
net: phylink: Fix phylink_dbg() macro (bsc#1154353).
-rw-r--r--patches.suse/net-phylink-Fix-phylink_dbg-macro.patch47
-rw-r--r--series.conf1
2 files changed, 48 insertions, 0 deletions
diff --git a/patches.suse/net-phylink-Fix-phylink_dbg-macro.patch b/patches.suse/net-phylink-Fix-phylink_dbg-macro.patch
new file mode 100644
index 0000000000..fbe9f1f665
--- /dev/null
+++ b/patches.suse/net-phylink-Fix-phylink_dbg-macro.patch
@@ -0,0 +1,47 @@
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 31 Oct 2019 15:42:26 -0700
+Subject: net: phylink: Fix phylink_dbg() macro
+Patch-mainline: v5.4-rc6
+Git-commit: 9d68db5092c5fac99fccfdeab3f04df0b27d1762
+References: bsc#1154353
+
+The phylink_dbg() macro does not follow dynamic debug or defined(DEBUG)
+and as a result, it spams the kernel log since a PR_DEBUG level is
+currently used. Fix it to be defined appropriately whether
+CONFIG_DYNAMIC_DEBUG or defined(DEBUG) are set.
+
+Fixes: 17091180b152 ("net: phylink: Add phylink_{printk, err, warn, info, dbg} macros")
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/net/phy/phylink.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+--- a/drivers/net/phy/phylink.c
++++ b/drivers/net/phy/phylink.c
+@@ -87,8 +87,24 @@ struct phylink {
+ phylink_printk(KERN_WARNING, pl, fmt, ##__VA_ARGS__)
+ #define phylink_info(pl, fmt, ...) \
+ phylink_printk(KERN_INFO, pl, fmt, ##__VA_ARGS__)
++#if defined(CONFIG_DYNAMIC_DEBUG)
+ #define phylink_dbg(pl, fmt, ...) \
++do { \
++ if ((pl)->config->type == PHYLINK_NETDEV) \
++ netdev_dbg((pl)->netdev, fmt, ##__VA_ARGS__); \
++ else if ((pl)->config->type == PHYLINK_DEV) \
++ dev_dbg((pl)->dev, fmt, ##__VA_ARGS__); \
++} while (0)
++#elif defined(DEBUG)
++#define phylink_dbg(pl, fmt, ...) \
+ phylink_printk(KERN_DEBUG, pl, fmt, ##__VA_ARGS__)
++#else
++#define phylink_dbg(pl, fmt, ...) \
++({ \
++ if (0) \
++ phylink_printk(KERN_DEBUG, pl, fmt, ##__VA_ARGS__); \
++})
++#endif
+
+ /**
+ * phylink_set_port_modes() - set the port type modes in the ethtool mask
diff --git a/series.conf b/series.conf
index a8de3f8a23..9bc2b8b11a 100644
--- a/series.conf
+++ b/series.conf
@@ -2897,6 +2897,7 @@
patches.suse/e1000-fix-memory-leaks.patch
patches.suse/ixgbe-Remove-duplicate-clear_bit-call.patch
patches.suse/inet-stop-leaking-jiffies-on-the-wire.patch
+ patches.suse/net-phylink-Fix-phylink_dbg-macro.patch
patches.suse/powerpc-powernv-Fix-CPU-idle-to-be-called-with-IRQs-.patch
patches.suse/scsi-qla2xxx-fixup-incorrect-usage-of-host_byte.patch
patches.suse/scsi-lpfc-Check-queue-pointer-before-use.patch