Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: mdio: mdio-bcm-unimac: Refine incorrect clock message

In light of a81649a4efd3 ("net: mdio: mdio-bcm-unimac: Correct rate
fallback logic"), it became clear that the warning should be specific to
the MDIO controller instance, and there should be further information
provided to indicate what is wrong, whether the requested clock
frequency or the rate calculation. Clarify the message accordingly.

Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250811165921.392030-1-florian.fainelli@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Florian Fainelli and committed by
Jakub Kicinski
75f26257 b3ba7d92

+3 -1
+3 -1
drivers/net/mdio/mdio-bcm-unimac.c
··· 215 215 216 216 div = (rate / (2 * priv->clk_freq)) - 1; 217 217 if (div & ~MDIO_CLK_DIV_MASK) { 218 - pr_warn("Incorrect MDIO clock frequency, ignoring\n"); 218 + dev_warn(priv->mii_bus->parent, 219 + "Ignoring MDIO clock frequency request: %d vs. rate: %ld\n", 220 + priv->clk_freq, rate); 219 221 ret = 0; 220 222 goto out; 221 223 }