From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
open list <linux-kernel@vger.kernel.org>,
hkallweit1@gmail.com, bcm-kernel-feedback-list@broadcom.com,
olteanv@gmail.com, rmk+kernel@armlinux.org.uk, cphealy@gmail.com,
Jose Abreu <joabreu@synopsys.com>
Subject: Re: [PATCH net-next v2 2/2] net: phy: Add ability to debug RGMII connections
Date: Fri, 18 Oct 2019 00:11:01 +0200 [thread overview]
Message-ID: <20191017221101.GB24810@lunn.ch> (raw)
In-Reply-To: <20191017214453.18934-3-f.fainelli@gmail.com>
> If all is well, we stop iterating over all possible RGMII combinations
> and offer the one that is deemed suitable which is what an user should
> be trying by configuring the platform appropriately.
Hi Florian
This is no longer true. You now iterate over all modes.
> +int phy_rgmii_debug_probe(struct phy_device *phydev)
> +{
> + /* Now probe all modes */
> + for (i = 0; i < ARRAY_SIZE(rgmii_modes); i++) {
> + ret = phy_rgmii_probe_interface(priv, rgmii_modes[i]);
> + if (ret == 0)
> + netdev_info(ndev, "Determined \"%s\" to be correct\n",
> + phy_modes(rgmii_modes[i]));
> + }
I see two different use cases for this code.
1) Find the right mode
2) Test if the PHY driver is doing the right thing with different
modes.
You are concentrating more on the first, but i think the second is
also important. I think we can give the novice user a few more
guidelines. We can count the number of modes which work. If that count
!= 1, we know we have a driver problem. We should ask the user to
report the problem, including details of the MAC and PHY driver.
Andrew
next prev parent reply other threads:[~2019-10-17 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-17 21:44 [PATCH net-next v2 0/2] net: phy: Add ability to debug RGMII Florian Fainelli
2019-10-17 21:44 ` [PATCH net-next v2 1/2] net: phy: Use genphy_loopback() by default Florian Fainelli
2019-10-17 21:59 ` Andrew Lunn
2019-10-17 21:44 ` [PATCH net-next v2 2/2] net: phy: Add ability to debug RGMII connections Florian Fainelli
2019-10-17 22:11 ` Andrew Lunn [this message]
2019-10-17 22:14 ` Andrew Lunn
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=20191017221101.GB24810@lunn.ch \
--to=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=joabreu@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
/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).