Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5689472imu; Wed, 30 Jan 2019 01:47:49 -0800 (PST) X-Google-Smtp-Source: AHgI3IZJHeTV75jR5WZIAH4XbRvo9tuwQyt+obaHjYY1p/oqK4pyTsyNp8dTksBLnyfQtJ2PTgem X-Received: by 2002:a63:2222:: with SMTP id i34mr1356557pgi.83.1548841669032; Wed, 30 Jan 2019 01:47:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548841669; cv=none; d=google.com; s=arc-20160816; b=Xei+FgiG0W7J7yA1aVXQg7V66X9DOYOI6g69k4TajbxekuCUMtSnG4I87B4tHToAab ctc+D+faJWM2S55iE1XqH8Zb33CRj+1T1QYtRdPa9zQypBmWTZc7If+GmBPSdaX724zR n7uAmThtTJkGQe4nf1brFf4zeI5DiGHgfOuaSTiLKfFLFTr/4jYS3VZehjdsNw9Hvxcw cW2986WUNGtkqVMpB8T+/C0utxhB5eblaJ6H48PKtJuKDtyMZDlXczqlEF/alX7iPrne vXQUSeM042IAp9BliB18/avifNBiU2BzkZrS9xpQyAA8agPImD7kszMKpsiSyAlj2RmU /17w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=DqYAZ9KyAs8YcY+gRiJSqSkxKIeyiR+7/eRRRHHRLNM=; b=hvL41GPhB4hp954ZJ5F6HMaL6xqiX0/6GDkIhWIBqxPXFoZpQ3EgTrQatSIv6IbslN Rv5AL+9tfjsUAknOBMfkiJxkgT+LqTmbJFOBSsp7n8EeSMBrVQ5GOUwjedQ9qdLVFtIs JRMFzHMAVD/+BH3jHB8SjRjW9GZgjAshm+7un37OolAVHAoOUWqakv3f3zfhtTs3z4WG 1BT+UUVqJpI7S8l2WwwR6lzfiDq4OFqZvA36UnnmQLBCkKxNQWca3VDWDohK6BbftNMU p1pRHrjXwIUI9SzIMoMLIsCsmcLc4j65/ZXGG5hUoptVLT4WcYMCO9n57YEIBq4e1yQe k3AA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k5si1066372plt.111.2019.01.30.01.47.33; Wed, 30 Jan 2019 01:47:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730405AbfA3JqM convert rfc822-to-8bit (ORCPT + 99 others); Wed, 30 Jan 2019 04:46:12 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:60355 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726406AbfA3JqL (ORCPT ); Wed, 30 Jan 2019 04:46:11 -0500 Received: from xps13 (aaubervilliers-681-1-27-226.w90-88.abo.wanadoo.fr [90.88.147.226]) (Authenticated sender: miquel.raynal@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id B1D82100007; Wed, 30 Jan 2019 09:46:07 +0000 (UTC) Date: Wed, 30 Jan 2019 10:46:06 +0100 From: Miquel Raynal To: Vivien Didelot Cc: Andrew Lunn , Florian Fainelli , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Gregory Clement , Antoine Tenart , Maxime Chevallier , Nadav Haklai Subject: Re: [PATCH net-next v2 1/2] net: dsa: mv88e6xxx: Save switch rules Message-ID: <20190130104606.31639abb@xps13> In-Reply-To: <20190129104613.GC20920@t480s.localdomain> References: <20190125095507.29334-1-miquel.raynal@bootlin.com> <20190125095507.29334-2-miquel.raynal@bootlin.com> <20190128152456.212ae5ac@xps13> <20190128144417.GG4765@lunn.ch> <20190128165749.6abf2dc4@xps13> <20190128174246.GD28759@lunn.ch> <20190129100117.5ef6774c@xps13> <20190129145157.GK4765@lunn.ch> <20190129104613.GC20920@t480s.localdomain> Organization: Bootlin X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vivien & Andrew, Vivien Didelot wrote on Tue, 29 Jan 2019 10:46:13 -0500: > Hi Miquèl, > > On Tue, 29 Jan 2019 15:51:57 +0100, Andrew Lunn wrote: > > > > Today, there is no S2RAM support for switches. First, I proposed to add > > > suspend/resume callbacks to the mv88e6xxx driver - just enough to avoid > > > crashing the kernel. > > > > Then i would suggest the mv88e6xxx refuses the suspend. Actually that > > probably is the first correct step. We don't have suspend support, so > > stop the suspend happening, so preventing the kernel crash. > > I am not confortable with adding support for S2RAM in mv88e6xxx yet because > as it was explained, we are aware of much complicated scenarios out there > to pretend that DSA /partly/ supports suspend-resume. The prefered approach > for the moment is to keep things simple and not supporting this feature yet, > especially at the mv88e6xxx driver level. > > However crashing is unacceptable so I'm backing Andrew's point here, please > submit a fix to prevent the suspend (and crash) for the moment. > > Sorry if you felt that your work is being delayed, it is much appreciated! Thanks for the more detailed explanation, I got your point and I better understand your reluctance. So your proposal is to refuse suspending when using a mv88e6xxx switch. What about the current situation where suspending is allowed, but all the configuration gone? As long as all the ports are disabled during suspend, it should not hurt anything, right? Plus, this is what the bcm_sf2 and qca8k drivers are doing. I can even add an error message in the resume path to warn about this drawback. Thanks, Miquèl