Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-02 Thread Russell King - ARM Linux
On Sat, Dec 02, 2017 at 11:08:45AM +, Yan Markman wrote: > Hi Russel > > The Grygorii has raised one Additional point (about netif_carrier_off) > I just didn't want to start before finishing the previous one. > > On ifconfig-down the mac_config() called but with LINK=0. > The config has no

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-02 Thread Russell King - ARM Linux
On Sat, Dec 02, 2017 at 11:08:45AM +, Yan Markman wrote: > Hi Russel > > The Grygorii has raised one Additional point (about netif_carrier_off) > I just didn't want to start before finishing the previous one. > > On ifconfig-down the mac_config() called but with LINK=0. > The config has no

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-02 Thread Yan Markman
nel@vger.kernel.org Subject: Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect On Fri, Dec 01, 2017 at 09:36:42AM -0800, Florian Fainelli wrote: > On 12/01/2017 09:24 AM, Russell King - ARM Linux wrote: > > On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wro

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-02 Thread Yan Markman
iquel.ray...@free-electrons.com; Nadav Haklai ; m...@semihalf.com; Stefan Chulski ; net...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect On Fri, Dec 01, 2017 at 09:36:42AM -0800, Florian Fainelli wrote: > On 12/01/20

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Russell King - ARM Linux
On Fri, Dec 01, 2017 at 09:36:42AM -0800, Florian Fainelli wrote: > On 12/01/2017 09:24 AM, Russell King - ARM Linux wrote: > > On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: > >> Hi Russell, > >> > >> On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > >>> On Thu, Nov

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Russell King - ARM Linux
On Fri, Dec 01, 2017 at 09:36:42AM -0800, Florian Fainelli wrote: > On 12/01/2017 09:24 AM, Russell King - ARM Linux wrote: > > On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: > >> Hi Russell, > >> > >> On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > >>> On Thu, Nov

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Florian Fainelli
On 12/01/2017 09:24 AM, Russell King - ARM Linux wrote: > On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: >> Hi Russell, >> >> On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: >>> On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: On Thu, Nov

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Florian Fainelli
On 12/01/2017 09:24 AM, Russell King - ARM Linux wrote: > On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: >> Hi Russell, >> >> On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: >>> On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: On Thu, Nov

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Russell King - ARM Linux
On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: > Hi Russell, > > On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > > On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: > >> On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: > >>> The

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Russell King - ARM Linux
On Fri, Dec 01, 2017 at 11:07:22AM -0600, Grygorii Strashko wrote: > Hi Russell, > > On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > > On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: > >> On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: > >>> The

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Grygorii Strashko
Hi Russell, On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: >> On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: >>> The phylink_stop is called before phylink_disconnect_phy >>> You could see in

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-12-01 Thread Grygorii Strashko
Hi Russell, On 11/30/2017 07:28 AM, Russell King - ARM Linux wrote: > On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: >> On Thu, Nov 30, 2017 at 08:51:21AM +, Yan Markman wrote: >>> The phylink_stop is called before phylink_disconnect_phy >>> You could see in

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: > On Thu, Nov 30, 2017 at 08:51:21AM +, 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); > >

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
On Thu, Nov 30, 2017 at 10:10:18AM +, Russell King - ARM Linux wrote: > On Thu, Nov 30, 2017 at 08:51:21AM +, 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); > >

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
.ray...@free-electrons.com; Nadav Haklai <nad...@marvell.com>; > m...@semihalf.com; Stefan Chulski <stef...@marvell.com>; > net...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect > > On Wed, No

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Russell King - ARM Linux
an Chulski ; > net...@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 +, Yan Markman wrote: > > The attached p21 patch doesn't change anything. &

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Yan Markman
free-electrons.com; thomas.petazz...@free-electrons.com; miquel.ray...@free-electrons.com; Nadav Haklai <nad...@marvell.com>; m...@semihalf.com; Stefan Chulski <stef...@marvell.com>; net...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: Re: [EXT] Re: [PATCH net] net: phylink:

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-30 Thread Yan Markman
.@free-electrons.com; Nadav Haklai ; m...@semihalf.com; Stefan Chulski ; net...@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 +, Yan Markman wrote: > The attached p21 patch doesn

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Russell King - ARM Linux
On Wed, Nov 29, 2017 at 09:06:56PM +, 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

Re: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Russell King - ARM Linux
On Wed, Nov 29, 2017 at 09:06:56PM +, 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

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Yan Markman
ki <stef...@marvell.com>; net...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect External Email -- On Wed, Nov 29, 2017 at 07:33:44PM +, Yan Markman w

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Yan Markman
ch; f.faine...@gmail.com; da...@davemloft.net; gregory.clem...@free-electrons.com; thomas.petazz...@free-electrons.com; miquel.ray...@free-electrons.com; Nadav Haklai ; m...@semihalf.com; Stefan Chulski ; net...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [EXT] Re: [PATCH net] net: phyli

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Russell King - ARM Linux
On Wed, Nov 29, 2017 at 07:33:44PM +, Yan Markman wrote: > Hi Russel > > On my board I have [Marvell 88E1510] phy working with STATUS-POLLING > I see some inconsistencies -- first ifconfig-up is different from furthers, > no "link is down" reports. > Please refer the behavior example below.

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Russell King - ARM Linux
On Wed, Nov 29, 2017 at 07:33:44PM +, Yan Markman wrote: > Hi Russel > > On my board I have [Marvell 88E1510] phy working with STATUS-POLLING > I see some inconsistencies -- first ifconfig-up is different from furthers, > no "link is down" reports. > Please refer the behavior example below.

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Yan Markman
ger.kernel.org; linux-kernel@vger.kernel.org Subject: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect External Email -- Oh, and lastly, please send patches to li...@armlinux.org.uk or the address I use in the s

RE: [EXT] Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-29 Thread Yan Markman
Yan Markman ; gregory.clem...@free-electrons.com; thomas.petazz...@free-electrons.com; miquel.ray...@free-electrons.com; Nadav Haklai ; m...@semihalf.com; Stefan Chulski ; net...@vger.kernel.org; linux-kernel@vger.kernel.org Subject: [EXT] Re: [PATCH net] net: phyl

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Russell, On Tue, Nov 28, 2017 at 03:56:11PM +, Russell King wrote: > Oh, and lastly, please send patches to li...@armlinux.org.uk or the > address I use in the sign-offs - sending them to r...@armlinux.org.uk > is for personal non-Linux mail only, and has resulted in _all_ of > these

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Russell, On Tue, Nov 28, 2017 at 03:56:11PM +, Russell King wrote: > Oh, and lastly, please send patches to li...@armlinux.org.uk or the > address I use in the sign-offs - sending them to r...@armlinux.org.uk > is for personal non-Linux mail only, and has resulted in _all_ of > these

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Russell King
Oh, and lastly, please send patches to li...@armlinux.org.uk or the address I use in the sign-offs - sending them to r...@armlinux.org.uk is for personal non-Linux mail only, and has resulted in _all_ of these messages ending up in my spam folder. Thanks. On Tue, Nov 28, 2017 at 03:53:17PM

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Russell King
Oh, and lastly, please send patches to li...@armlinux.org.uk or the address I use in the sign-offs - sending them to r...@armlinux.org.uk is for personal non-Linux mail only, and has resulted in _all_ of these messages ending up in my spam folder. Thanks. On Tue, Nov 28, 2017 at 03:53:17PM

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Russell King
On Tue, Nov 28, 2017 at 02:29:32PM +0100, Antoine Tenart wrote: > From: Yan Markman Hi, thanks for the patch. > When calling successively _connect, _disconnect and _connect again, if > the link configuration changed whilst being down from the phylink > perspective, the

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Russell King
On Tue, Nov 28, 2017 at 02:29:32PM +0100, Antoine Tenart wrote: > From: Yan Markman Hi, thanks for the patch. > When calling successively _connect, _disconnect and _connect again, if > the link configuration changed whilst being down from the phylink > perspective, the last _connect would stay

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Andrew, On Tue, Nov 28, 2017 at 02:56:10PM +0100, Andrew Lunn wrote: > > + /* On _disconnect, the phy state machine and phylink resolve > > +* are stopped before executing full gracefull down/reset state. > > +* The further _connect starts with incorrect init state. Let's set > > +

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
Hi Andrew, On Tue, Nov 28, 2017 at 02:56:10PM +0100, Andrew Lunn wrote: > > + /* On _disconnect, the phy state machine and phylink resolve > > +* are stopped before executing full gracefull down/reset state. > > +* The further _connect starts with incorrect init state. Let's set > > +

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Andrew Lunn
> + /* On _disconnect, the phy state machine and phylink resolve > + * are stopped before executing full gracefull down/reset state. > + * The further _connect starts with incorrect init state. Let's set > + * init values here. > + */ > + pl->phy_state.link = false; > +

Re: [PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Andrew Lunn
> + /* On _disconnect, the phy state machine and phylink resolve > + * are stopped before executing full gracefull down/reset state. > + * The further _connect starts with incorrect init state. Let's set > + * init values here. > + */ > + pl->phy_state.link = false; > +

[PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
From: Yan Markman When calling successively _connect, _disconnect and _connect again, if the link configuration changed whilst being down from the phylink perspective, the last _connect would stay in an incorrect old speed. Fixes this by setting the link configuration

[PATCH net] net: phylink: fix link state on phy-connect

2017-11-28 Thread Antoine Tenart
From: Yan Markman When calling successively _connect, _disconnect and _connect again, if the link configuration changed whilst being down from the phylink perspective, the last _connect would stay in an incorrect old speed. Fixes this by setting the link configuration parameters to an unknown