lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 22 Jan 2019 11:04:35 +0100
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Gregory Clement <gregory.clement@...tlin.com>,
        Antoine Tenart <antoine.tenart@...tlin.com>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>,
        Nadav Haklai <nadavh@...vell.com>
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Add suspend/resume
 callbacks

Hi Florian,

Florian Fainelli <f.fainelli@...il.com> 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 <vivien.didelot@...il.com> wrote on Thu, 17 Jan 2019
> > 10:46:41 -0500:
> >   
> >> Hi,
> >>
> >> On Wed, 16 Jan 2019 23:23:29 +0100, Andrew Lunn <andrew@...n.ch> 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 Viviens TODO list, since this really could be
> >>> in the core.    
> >>
> >> Indeed that is!  
> > 
> > So, shall I wait for Vivien's patches (adding port_disable/enable()
> > in dsa_slave_suspend/resume()) and keep the driver as-is or do you want
> > me to manually call port_disable/enable() from the mv88e6xxx driver?  
> 
> Up to you guys, the only thing that I an tell you is that my platform
> loses its register contents during suspend/resume, therefore you must
> make sure the driver re-applies the entire switch configuration,
> identical to how it was prior to suspend. If you need me to test
> something, please holler.

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.

When I compare with the two drivers pointed out by Andrew:
* qca8k resume callback:
	* enable ports,
	* call dsa_switch_resume().
* bcm_sf2 resume callback:
	* call dsa_switch_resume(),
	* reset the switch,
	* refresh rules (Not applicable?),
	* enable the PHYs,
	* setup the ports,
	* configure vlan (Not applicable?),
* mv88e6xxx resume callback:
	* reset the switch,
	* enable the PHYs,
	* setup the ports,
	* enable IRQs,
	* call dsa_switch_resume().

This looks pretty similar. Maybe the ports setup are set to default
values while I should save some parameters at suspend? I changed a
few parameters (like the MTU or the queue length) but they seem to be
correct across suspend cycles. Can you show a diff of what part of the
configuration is lost?

Anyway, I have little background working with switches, so I might miss
something big.


Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ