Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-22 Thread Miquel Raynal
Hi Andrew, Andrew Lunn wrote on Tue, 22 Jan 2019 14:20:05 +0100: > > I am not sure to understand what is lost. On my setup ethtool shows > > that everything is fine after resume but maybe I fall into a "default" > > working case. > > Hi Miquèl > > Is the power removed from the switch? If so,

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-22 Thread Andrew Lunn
> I am not sure to understand what is lost. On my setup ethtool shows > that everything is fine after resume but maybe I fall into a "default" > working case. Hi Miquèl Is the power removed from the switch? If so, you need to restore the full switch configuration. The current code might be suffic

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-22 Thread Miquel Raynal
Hi Florian, Florian Fainelli wrote on Thu, 17 Jan 2019 10:00:46 -0800: > On 1/17/19 7:50 AM, Miquel Raynal wrote: > > Hi Andrew, Vivien, > > > > Vivien Didelot wrote on Thu, 17 Jan 2019 > > 10:46:41 -0500: > > > >> Hi, > >> > >> On Wed, 16 Jan 2019 23:23:29 +0100, Andrew Lunn wrote: > >>

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-17 Thread Vivien Didelot
On Thu, 17 Jan 2019 10:00:46 -0800, Florian Fainelli wrote: > A possible approach could be to call the port_disable, port_enable > callbacks from dsa_slave_suspend() and dsa_slave_resume(), I might have > some patches doing that already somewhere. > >>> > >>> I expect it is also

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-17 Thread Florian Fainelli
On 1/17/19 7:50 AM, Miquel Raynal wrote: > Hi Andrew, Vivien, > > Vivien Didelot wrote on Thu, 17 Jan 2019 > 10:46:41 -0500: > >> Hi, >> >> On Wed, 16 Jan 2019 23:23:29 +0100, Andrew Lunn wrote: >>> Hi Florian >>> A possible approach could be to call the port_disable, port_enable c

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-17 Thread Miquel Raynal
Hi Andrew, Vivien, Vivien Didelot wrote on Thu, 17 Jan 2019 10:46:41 -0500: > Hi, > > On Wed, 16 Jan 2019 23:23:29 +0100, Andrew Lunn wrote: > > Hi Florian > > > > > A possible approach could be to call the port_disable, port_enable > > > callbacks from dsa_slave_suspend() and dsa_slave_res

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-17 Thread Vivien Didelot
Hi, On Wed, 16 Jan 2019 23:23:29 +0100, Andrew Lunn wrote: > Hi Florian > > > A possible approach could be to call the port_disable, port_enable > > callbacks from dsa_slave_suspend() and dsa_slave_resume(), I might have > > some patches doing that already somewhere. > > I expect it is also on

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-16 Thread Andrew Lunn
Hi Florian > A possible approach could be to call the port_disable, port_enable > callbacks from dsa_slave_suspend() and dsa_slave_resume(), I might have > some patches doing that already somewhere. I expect it is also on Viviens TODO list, since this really could be in the core. Andrew

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-16 Thread Florian Fainelli
On 1/16/19 7:56 AM, Andrew Lunn wrote: > On Wed, Jan 16, 2019 at 04:34:19PM +0100, Miquel Raynal wrote: >> Bring S2RAM support to the mv88e6xxx DSA driver. >> >> The content of the *_irq_poll() helper is moved in *_do_irq_poll() so >> that that the function can be called from the ->resume() callbac

Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-16 Thread Andrew Lunn
On Wed, Jan 16, 2019 at 04:34:19PM +0100, Miquel Raynal wrote: > Bring S2RAM support to the mv88e6xxx DSA driver. > > The content of the *_irq_poll() helper is moved in *_do_irq_poll() so > that that the function can be called from the ->resume() callback > without using the *work pointer. > > +s

[PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume callbacks

2019-01-16 Thread Miquel Raynal
Bring S2RAM support to the mv88e6xxx DSA driver. The content of the *_irq_poll() helper is moved in *_do_irq_poll() so that that the function can be called from the ->resume() callback without using the *work pointer. Signed-off-by: Miquel Raynal --- drivers/net/dsa/mv88e6xxx/chip.c | 52 ++