From: <Nicolas.Ferre@microchip.com>
To: <mparab@cadence.com>, <andrew@lunn.ch>,
<antoine.tenart@bootlin.com>, <f.fainelli@gmail.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
<hkallweit1@gmail.com>, <linux-kernel@vger.kernel.org>,
<dkangude@cadence.com>, <pthombar@cadence.com>,
<a.fatoum@pengutronix.de>, <brad.mouring@ni.com>,
<rmk+kernel@armlinux.org.uk>
Subject: Re: [PATCH 1/3] net: macb: fix for fixed-link mode
Date: Wed, 27 Nov 2019 18:02:25 +0000 [thread overview]
Message-ID: <e53eb865-6886-e7b6-3f4e-1ec40d38c7de@microchip.com> (raw)
In-Reply-To: <1574759380-102986-1-git-send-email-mparab@cadence.com>
On 26/11/2019 at 10:09, Milind Parab wrote:
> This patch fix the issue with fixed link mode in macb.
I would need more context here. What needs to be fixed?
I think we had several attempts, at the phylib days, to have this part
of the driver behave correctly, so providing us more insight will help
understand what is going wrong now.
For instance, is it related to the patch that converts the driver to the
phylink interface done by this patch in net-next "net: macb: convert to
phylink"?
> Signed-off-by: Milind Parab <mparab@cadence.com>
> ---
> drivers/net/ethernet/cadence/macb_main.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index d5ae2e1e0b0e..5e6d27d33d43 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -617,15 +617,11 @@ static int macb_phylink_connect(struct macb *bp)
> struct phy_device *phydev;
> int ret;
>
> - if (bp->pdev->dev.of_node &&
> - of_parse_phandle(bp->pdev->dev.of_node, "phy-handle", 0)) {
You mean we don't need to parse this phandle anymore because it's better
handled by phylink_of_phy_connect() below that takes care of the
fixed-link case?
If yes, then telling it in commit message is worth it...
> + if (bp->pdev->dev.of_node)
> ret = phylink_of_phy_connect(bp->phylink, bp->pdev->dev.of_node,
> 0);
> - if (ret) {
> - netdev_err(dev, "Could not attach PHY (%d)\n", ret);
> - return ret;
> - }
> - } else {
> +
> + if ((!bp->pdev->dev.of_node || ret == -ENODEV) && bp->mii_bus) {
> phydev = phy_find_first(bp->mii_bus);
> if (!phydev) {
> netdev_err(dev, "no PHY found\n");
> @@ -635,7 +631,7 @@ static int macb_phylink_connect(struct macb *bp)
> /* attach the mac to the phy */
> ret = phylink_connect_phy(bp->phylink, phydev);
> if (ret) {
> - netdev_err(dev, "Could not attach to PHY (%d)\n", ret);
> + netdev_err(dev, "Could not attach to PHY\n");
Why modifying this?
> return ret;
> }
> }
> --
> 2.17.1
>
Best regards,
Nicolas
--
Nicolas Ferre
next prev parent reply other threads:[~2019-11-27 18:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 9:09 [PATCH 0/3] net: macb: cover letter Milind Parab
2019-11-26 9:09 ` [PATCH 1/3] net: macb: fix for fixed-link mode Milind Parab
2019-11-26 14:30 ` Andrew Lunn
2019-11-27 18:02 ` Nicolas.Ferre [this message]
2019-11-28 6:50 ` Milind Parab
2019-11-26 9:09 ` [PATCH 2/3] net: macb: add support for C45 MDIO read/write Milind Parab
2019-11-26 14:37 ` Andrew Lunn
2019-11-27 18:31 ` Nicolas.Ferre
2019-11-27 18:51 ` Andrew Lunn
2019-11-28 8:29 ` Milind Parab
2019-11-28 14:52 ` Andrew Lunn
2019-11-29 10:02 ` Milind Parab
2019-11-26 9:09 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
2019-11-26 18:09 ` [PATCH 0/3] net: macb: cover letter David Miller
-- strict thread matches above, loose matches on Subject: below --
2019-12-09 11:13 [PATCH 0/3] net: macb: fix for fixed link, support for c45 mdio and 10G Milind Parab
2019-12-09 11:14 ` [PATCH 1/3] net: macb: fix for fixed-link mode Milind Parab
2019-12-09 11:26 ` Russell King - ARM Linux admin
2019-12-10 9:14 ` Milind Parab
2019-12-10 11:38 ` Russell King - ARM Linux admin
2019-12-11 8:21 ` Milind Parab
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=e53eb865-6886-e7b6-3f4e-1ec40d38c7de@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=a.fatoum@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=antoine.tenart@bootlin.com \
--cc=brad.mouring@ni.com \
--cc=davem@davemloft.net \
--cc=dkangude@cadence.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mparab@cadence.com \
--cc=netdev@vger.kernel.org \
--cc=pthombar@cadence.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).