diff mbox series

net/fsl: quieten expected MDIO access failures

Message ID 20200924145645.1789724-1-jamie@nuviainc.com
State Accepted
Delegated to: David Miller
Headers show
Series net/fsl: quieten expected MDIO access failures | expand

Commit Message

Jamie Iles Sept. 24, 2020, 2:56 p.m. UTC
MDIO reads can happen during PHY probing, and printing an error with
dev_err can result in a large number of error messages during device
probe.  On a platform with a serial console this can result in
excessively long boot times in a way that looks like an infinite loop
when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
extended scanning in xgmac_mdio) we perform more scanning so there are
potentially more failures.

Reduce the logging level to dev_dbg which is consistent with the
Freescale enetc driver.

Cc: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Jamie Iles <jamie@nuviainc.com>
---
 drivers/net/ethernet/freescale/xgmac_mdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn Sept. 24, 2020, 3:04 p.m. UTC | #1
On Thu, Sep 24, 2020 at 03:56:45PM +0100, Jamie Iles wrote:
> MDIO reads can happen during PHY probing, and printing an error with
> dev_err can result in a large number of error messages during device
> probe.  On a platform with a serial console this can result in
> excessively long boot times in a way that looks like an infinite loop
> when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
> extended scanning in xgmac_mdio) we perform more scanning so there are
> potentially more failures.
> 
> Reduce the logging level to dev_dbg which is consistent with the
> Freescale enetc driver.

Hi Jamie

Does the system you are using suffer from Errata A011043?

The change does however seem reasonable.

    Andrew
Jamie Iles Sept. 24, 2020, 3:12 p.m. UTC | #2
Hi Andrew,

On Thu, Sep 24, 2020 at 05:04:53PM +0200, Andrew Lunn wrote:
> On Thu, Sep 24, 2020 at 03:56:45PM +0100, Jamie Iles wrote:
> > MDIO reads can happen during PHY probing, and printing an error with
> > dev_err can result in a large number of error messages during device
> > probe.  On a platform with a serial console this can result in
> > excessively long boot times in a way that looks like an infinite loop
> > when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
> > extended scanning in xgmac_mdio) we perform more scanning so there are
> > potentially more failures.
> > 
> > Reduce the logging level to dev_dbg which is consistent with the
> > Freescale enetc driver.
> 
> Hi Jamie
> 
> Does the system you are using suffer from Errata A011043?

It's the HoneyComb SolidRun (LX2160A) and I can't find an errata list 
for that chip.  It's booting from ACPI in any case so wouldn't have that 
workaround set.

Thanks,

Jamie
Andrew Lunn Sept. 24, 2020, 3:32 p.m. UTC | #3
On Thu, Sep 24, 2020 at 03:56:45PM +0100, Jamie Iles wrote:
> MDIO reads can happen during PHY probing, and printing an error with
> dev_err can result in a large number of error messages during device
> probe.  On a platform with a serial console this can result in
> excessively long boot times in a way that looks like an infinite loop
> when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
> extended scanning in xgmac_mdio) we perform more scanning so there are
> potentially more failures.
> 
> Reduce the logging level to dev_dbg which is consistent with the
> Freescale enetc driver.
> 
> Cc: Jeremy Linton <jeremy.linton@arm.com>
> Signed-off-by: Jamie Iles <jamie@nuviainc.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Jeremy Linton Sept. 24, 2020, 3:40 p.m. UTC | #4
Hi,

On 9/24/20 10:12 AM, Jamie Iles wrote:
> Hi Andrew,
> 
> On Thu, Sep 24, 2020 at 05:04:53PM +0200, Andrew Lunn wrote:
>> On Thu, Sep 24, 2020 at 03:56:45PM +0100, Jamie Iles wrote:
>>> MDIO reads can happen during PHY probing, and printing an error with
>>> dev_err can result in a large number of error messages during device
>>> probe.  On a platform with a serial console this can result in
>>> excessively long boot times in a way that looks like an infinite loop
>>> when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
>>> extended scanning in xgmac_mdio) we perform more scanning so there are
>>> potentially more failures.
>>>
>>> Reduce the logging level to dev_dbg which is consistent with the
>>> Freescale enetc driver.
>>
>> Hi Jamie
>>
>> Does the system you are using suffer from Errata A011043?
> 
> It's the HoneyComb SolidRun (LX2160A) and I can't find an errata list
> for that chip.  It's booting from ACPI in any case so wouldn't have that
> workaround set.

I don't see those messages, but granted my firmware is a bit out of 
date. Let me upgrade it and see if I can reproduce it too.

(also +CC Calvin)
David Miller Sept. 25, 2020, 3:14 a.m. UTC | #5
From: Jamie Iles <jamie@nuviainc.com>
Date: Thu, 24 Sep 2020 15:56:45 +0100

> MDIO reads can happen during PHY probing, and printing an error with
> dev_err can result in a large number of error messages during device
> probe.  On a platform with a serial console this can result in
> excessively long boot times in a way that looks like an infinite loop
> when multiple busses are present.  Since 0f183fd151c (net/fsl: enable
> extended scanning in xgmac_mdio) we perform more scanning so there are
> potentially more failures.
> 
> Reduce the logging level to dev_dbg which is consistent with the
> Freescale enetc driver.
> 
> Cc: Jeremy Linton <jeremy.linton@arm.com>
> Signed-off-by: Jamie Iles <jamie@nuviainc.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index 98be51d8b08c..bfa2826c5545 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -229,7 +229,7 @@  static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
 	/* Return all Fs if nothing was there */
 	if ((xgmac_read32(&regs->mdio_stat, endian) & MDIO_STAT_RD_ER) &&
 	    !priv->has_a011043) {
-		dev_err(&bus->dev,
+		dev_dbg(&bus->dev,
 			"Error while reading PHY%d reg at %d.%hhu\n",
 			phy_id, dev_addr, regnum);
 		return 0xffff;