lkml.org 
[lkml]   [2017]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect
Date
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,

-----Original Message-----
From: Russell King - ARM Linux [mailto:linux@armlinux.org.uk]
Sent: Wednesday, November 29, 2017 11:21 PM
To: Yan Markman <ymarkman@marvell.com>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>; andrew@lunn.ch; f.fainelli@gmail.com; davem@davemloft.net; gregory.clement@free-electrons.com; thomas.petazzoni@free-electrons.com; miquel.raynal@free-electrons.com; Nadav Haklai <nadavh@marvell.com>; mw@semihalf.com; Stefan Chulski <stefanc@marvell.com>; netdev@vger.kernel.org; linux-kernel@vger.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

\
 
 \ /
  Last update: 2017-11-30 09:52    [W:0.144 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site