mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
net: enetc: do not print error log if addr is 0
A value of 0 for addr indicates that the IEB_LBCR register does not
need to be configured, as its default value is 0. However, the driver
will print an error log if addr is 0, so this issue needs to be fixed.
Fixes: 50bfd9c06f0f ("net: enetc: set external PHY address in IERB for i.MX94 ENETC")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20251222022628.4016403-1-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
99537d5c47
commit
5939b6dbcd
@ -577,11 +577,17 @@ static int imx94_enetc_mdio_phyaddr_config(struct netc_blk_ctrl *priv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
addr = netc_get_phy_addr(np);
|
addr = netc_get_phy_addr(np);
|
||||||
if (addr <= 0) {
|
if (addr < 0) {
|
||||||
dev_err(dev, "Failed to get PHY address\n");
|
dev_err(dev, "Failed to get PHY address\n");
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The default value of LaBCR[MDIO_PHYAD_PRTAD] is 0,
|
||||||
|
* so no need to set the register.
|
||||||
|
*/
|
||||||
|
if (!addr)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (phy_mask & BIT(addr)) {
|
if (phy_mask & BIT(addr)) {
|
||||||
dev_err(dev,
|
dev_err(dev,
|
||||||
"Find same PHY address in EMDIO and ENETC node\n");
|
"Find same PHY address in EMDIO and ENETC node\n");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user