From: "Daniel González Cabanelas" <dgcbueu@gmail.com>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>,
netdev@vger.kernel.org, davem@davemloft.net,
thomas.petazzoni@bootlin.com
Subject: Re: [PATCH] net: mvneta: only do WoL speed down if the PHY is valid
Date: Thu, 21 May 2020 17:55:19 +0200 [thread overview]
Message-ID: <CABwr4_vdWWRBMXeK9uGLnuK++9uuM_FBygypv_2PhCRnsOEcEA@mail.gmail.com> (raw)
In-Reply-To: <20200521152656.GU1551@shell.armlinux.org.uk>
Thanks for the comments.
I'll look for a better approach.
Regards
Daniel
El jue., 21 may. 2020 a las 17:27, Russell King - ARM Linux admin
(<linux@armlinux.org.uk>) escribió:
>
> On Thu, May 21, 2020 at 05:19:16PM +0200, Andrew Lunn wrote:
> > > drivers/net/ethernet/marvell/mvneta.c | 7 ++++---
> > > 1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > > index 41d2a0eac..f9170bc93 100644
> > > --- a/drivers/net/ethernet/marvell/mvneta.c
> > > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > > @@ -3567,8 +3567,9 @@ static void mvneta_start_dev(struct mvneta_port *pp)
> > >
> > > phylink_start(pp->phylink);
> > >
> > > - /* We may have called phy_speed_down before */
> > > - phy_speed_up(pp->dev->phydev);
> > > + if(pp->dev->phydev)
> > > + /* We may have called phy_speed_down before */
> > > + phy_speed_up(pp->dev->phydev);
> >
> > I don't think it is as simple as this. You should not really be mixing
> > phy_ and phylink_ calls within one driver. You might of noticed there
> > are no other phy_ calls in this driver. So ideally you want to add
> > phylink_ calls which do the right thing.
>
> And... what is mvneta doing getting the phydev? I removed all that
> code when converting it to phylink, since the idea with phylink is
> that the PHY is the responsibility of phylink not the network driver.
>
> I hope the patch adding pp->dev->phydev hasn't been merged as it's
> almost certainly wrong.
>
> --
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 424kbps up
next prev parent reply other threads:[~2020-05-21 15:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 14:19 [PATCH] net: mvneta: only do WoL speed down if the PHY is valid Daniel González Cabanelas
2020-05-21 15:19 ` Andrew Lunn
2020-05-21 15:26 ` Russell King - ARM Linux admin
2020-05-21 15:55 ` Andrew Lunn
2020-05-21 18:20 ` Russell King - ARM Linux admin
2020-05-22 23:10 ` David Miller
2020-05-21 15:55 ` Daniel González Cabanelas [this message]
2020-06-05 9:49 ` Russell King - ARM Linux admin
2020-06-07 0:25 ` Daniel González Cabanelas
2020-06-24 9:29 ` Russell King - ARM Linux admin
2020-05-21 15:55 ` Florian Fainelli
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=CABwr4_vdWWRBMXeK9uGLnuK++9uuM_FBygypv_2PhCRnsOEcEA@mail.gmail.com \
--to=dgcbueu@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.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).