Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp331131ima; Fri, 1 Feb 2019 04:07:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN7t8/H0EBimi/N3sDdN9esKU0sMEMSjc16tx4eLtWgMEELMbaGogvnX4nJ/5/+FXo0mXQRw X-Received: by 2002:a62:931a:: with SMTP id b26mr40804736pfe.65.1549022831150; Fri, 01 Feb 2019 04:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549022831; cv=none; d=google.com; s=arc-20160816; b=Ola/ThhrROQWNfwsIbbtB3mY5kHngkWhvWBwfO1nyubd+B/MY90jvLzBAVAgytjqBC Uv2H4drbpfsfAFANKioT1L+UmrHdvY4h9h1lt9iu+vxI3WAgoHh2fiDWU08bFyq92RXo EUfO2jhKhcGAVvzdkl/RsgX2faq06EgN0UNFqdg0zzVJzs8l800z8MGj74ylEpmJuKhe HF84nk9jgCBqSm319Mosx3xNqeqW7cqkReCJrvxMkvzn9799Y9pcIvxavjsJ4VouN2u+ AQp7iVHsdcBMYoJ4xCI81G7gr4Wi2zac3Hq5wP/ghlraERqhKUyxkkVRG1XjAFLOC7HP mm6g== 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=Qkw4InkKPiJoq4ehZGChaz+Lsn4NO+16x8k/qqIdq1s=; b=czf7GzeM8mHMRQP6kX8ieXHcNRDws4WyoWuCPgGLutd1Cu0Ap7nq828PBo0yqgEosN n5iP30SSffMiBaDpi8bZ54A9tDCzDz7WnRSbzLOKwz030ajbXXOLFsOAlKa2HxvbmBtb rnlzJcTfymVPmMXbdNrp6k4aqANlhDq9M/6KVNPIAIKbqNF/0RKUub1n5fgVztq94Svc kmN5dqQGKaR30pbccRayG1Fu8G/JMN6H2SGayx/dX4xeKCltbXr5bCbCWaWYWIRassO6 4Og49P+brpLgY6EHqFTpnvFkUVrf/OGQj16avmZnxxl1j0/zmvOxjxjshBGAUUoLDh2d szPA== 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 e66si7589234plb.107.2019.02.01.04.06.14; Fri, 01 Feb 2019 04:07:11 -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 S1730064AbfBALB0 convert rfc822-to-8bit (ORCPT + 99 others); Fri, 1 Feb 2019 06:01:26 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53571 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728627AbfBALBZ (ORCPT ); Fri, 1 Feb 2019 06:01:25 -0500 X-Originating-IP: 90.88.147.226 Received: from xps13 (aaubervilliers-681-1-27-226.w90-88.abo.wanadoo.fr [90.88.147.226]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 87EE56000A; Fri, 1 Feb 2019 11:01:20 +0000 (UTC) Date: Fri, 1 Feb 2019 12:01:19 +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: <20190201120119.752e7ed6@xps13> In-Reply-To: <20190130194608.GB28098@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> <20190130104606.31639abb@xps13> <20190130194608.GB28098@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, Vivien Didelot wrote on Wed, 30 Jan 2019 19:46:08 -0500: > Hi Miquèl, > > On Wed, 30 Jan 2019 10:46:06 +0100, Miquel Raynal 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. > > Actually can you show me the crash that is happening? Sure, here it is: http://code.bulix.org/swwb11-569137 Actually it is a silent crash but the platform never resumes. I am pretty sure this is due to the kthread_queue_delayed_work() loop which might access registers before it is allowed to do so. In my proposal I just canceled it at suspend and restarted it at resume. Next week I will send a patch to refuse the suspend as you both suggested and if people want to suspend, they will have to remove the switch support. Thanks, Miquèl