From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: davem@davemloft.net, f.fainelli@gmail.com,
vivien.didelot@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net: dsa: change PHY error message again
Date: Tue, 8 Sep 2020 02:54:51 +0200 [thread overview]
Message-ID: <20200908005451.GA3267902@lunn.ch> (raw)
In-Reply-To: <20200907230656.1666974-1-olteanv@gmail.com>
On Tue, Sep 08, 2020 at 02:06:56AM +0300, Vladimir Oltean wrote:
> slave_dev->name is only populated at this stage if it was specified
> through a label in the device tree. However that is not mandatory.
> When it isn't, the error message looks like this:
>
> [ 5.037057] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
> [ 5.044672] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
> [ 5.052275] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
> [ 5.059877] fsl_enetc 0000:00:00.2 eth2: error -19 setting up slave PHY for eth%d
>
> which is especially confusing since the error gets printed on behalf of
> the DSA master (fsl_enetc in this case).
>
> Printing an error message that contains a valid reference to the DSA
> port's name is difficult at this point in the initialization stage, so
> at least we should print some info that is more reliable, even if less
> user-friendly. That may be the driver name and the hardware port index.
>
> After this change, the error is printed as:
>
> [ 6.051587] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 0
> [ 6.061192] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 1
> [ 6.070765] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 2
> [ 6.080324] mscc_felix 0000:00:00.5: error -19 setting up PHY for tree 0, switch 0, port 3
>
> Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2020-09-08 0:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 23:06 [PATCH v2 net-next] net: dsa: change PHY error message again Vladimir Oltean
2020-09-08 0:54 ` Andrew Lunn [this message]
2020-09-08 3:05 ` Florian Fainelli
2020-09-08 4:01 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200908005451.GA3267902@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).