[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171130101018.GA10595@n2100.armlinux.org.uk>
Date: Thu, 30 Nov 2017 10:10:18 +0000
From: Russell King - ARM Linux <linux@...linux.org.uk>
To: Yan Markman <ymarkman@...vell.com>
Cc: Antoine Tenart <antoine.tenart@...e-electrons.com>,
"andrew@...n.ch" <andrew@...n.ch>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"gregory.clement@...e-electrons.com"
<gregory.clement@...e-electrons.com>,
"thomas.petazzoni@...e-electrons.com"
<thomas.petazzoni@...e-electrons.com>,
"miquel.raynal@...e-electrons.com" <miquel.raynal@...e-electrons.com>,
Nadav Haklai <nadavh@...vell.com>,
"mw@...ihalf.com" <mw@...ihalf.com>,
Stefan Chulski <stefanc@...vell.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect
On Thu, Nov 30, 2017 at 08:51:21AM +0000, Yan Markman wrote:
> The phylink_stop is called before phylink_disconnect_phy
> You could see in mvpp2.c:
>
> mvpp2_stop_dev() {
> phylink_stop(port->phylink);
> }
>
> mvpp2_stop() {
> mvpp2_stop_dev(port);
> phylink_disconnect_phy(port->phylink);
> }
>
> .ndo_stop = mvpp2_stop,
Sorry, I don't have this in mvpp2.c, so I have no visibility of what
you're working with.
What you have above looks correct, and I see no reason why the p21
patch would not have resolved your issue. The p21 patch ensures
that phylink_resolve() gets called and completes before phylink_stop()
returns. In that case, phylink_resolve() will call the mac_link_down()
method if the link is not already down. It will also print the "Link
is Down" message.
Florian has already tested this patch after encountering a similar
issue, and has reported that it solves the problem for him. I've also
tested it with mvneta, and the original mvpp2x driver on Macchiatobin.
Maybe there's something different about mvpp2, but as I have no
visibility of that driver and the modifications therein, I can't
comment further other than stating that it works for three different
implementations.
Maybe you could try and work out what's going on with the p21 patch
in your case?
> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@...linux.org.uk]
> Sent: Wednesday, November 29, 2017 11:21 PM
> To: Yan Markman <ymarkman@...vell.com>
> Cc: Antoine Tenart <antoine.tenart@...e-electrons.com>; andrew@...n.ch; f.fainelli@...il.com; davem@...emloft.net; gregory.clement@...e-electrons.com; thomas.petazzoni@...e-electrons.com; miquel.raynal@...e-electrons.com; Nadav Haklai <nadavh@...vell.com>; mw@...ihalf.com; Stefan Chulski <stefanc@...vell.com>; netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect
>
> On Wed, Nov 29, 2017 at 09:06:56PM +0000, Yan Markman wrote:
> > The attached p21 patch doesn't change anything.
> > But another one from the mail-text is good
> > void phylink_disconnect_phy(struct phylink *pl)
> > + pl->phy_state.link = false;
> >
> > There still (not for my MRVL-PP2) problem:
> > It is expected that on ifconfig-down the callback
> > pl->ops->mac_link_down(ndev, pl->link_an_mode); would be called, but
> > it isn't
>
> Are you calling phylink_stop() or are you just calling phylink_disconnect() ?
>
> You must call phylink_stop() prior to phylink_disconnect(). This probably explains why the p21 patch did nothing.
>
> --
> RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
> FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up According to speedtest.net: 8.21Mbps down 510kbps up
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
Powered by blists - more mailing lists