Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3801846yba; Tue, 9 Apr 2019 05:15:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIy77RbM1AtUUudnrrUy0b1Lp05TM9WNyM65j7ZKoXGiRASbf/BZXKigX/7fxruvLMxJkI X-Received: by 2002:a65:6107:: with SMTP id z7mr34347125pgu.313.1554812159112; Tue, 09 Apr 2019 05:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554812159; cv=none; d=google.com; s=arc-20160816; b=VAspMuBqEduI46urIIuMYOPhwaTSqhY7418+/TxgkyaTmMXaTBVxnL3AyKMsph8Rob 5dH+gbmoio4muYqDYbDPmpUNocdF5ex70A4zYu3XemJO/GPNLy9oNos9dwzWPTM267A+ Ym9iJxQz17f+ng/LuO7RcIVpX+ROM7E1V8VC/u7wTYd38D7+SXHeXCQRMzxzKWChB9po 1/Sveo3PndszG5rTM1t2xeID2Gn6a7pn6+sQPTUK6T+3gZihSEdHGG2q+mD2+78IKgcr Us1KSOIS79/wVKg//Q0ThNkgaWDpc3KgmVNwdMwmZy2KNSEjmnuQ7DWKZUX8BzowQ5SO 04SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5MD0QGE8HMnZEwh9ib4ODjfQ8egR2VR1Li2Ef+UBmAs=; b=ZqxMvAdBlxfKqWjFXcwrIKeYYV4iKFvzd5OhMyqP08wbvxiTxdm69Fl1Mwl0wvOC35 eS6uQoW3A0x8SRO04oIYTlJhQmVnD1PUArh6JZNO3FlgIfwOARZIFfwNa2+UUmLVYVJo TxdTlwI3uAFVeJnynnmK0icZ6i4TiRSpxqXjxxy3rKjxXPjyN0fCbsVFR2jyqaqKiLdf PEiIkx4kbnVv8rA/ZoNEpQ/PhvRShDNRqadX47fdtLIKWLDdcIwLtu9UrDmlBlGerA0r pCDVVd9qZrD7ktmFEifLMxmf6BgN1vLJ2PpRs9Qb37ZeFZa2ICED05tb0woLNjom9yih BcNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=PYZeGXAc; 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 i1si10882413pfr.150.2019.04.09.05.15.42; Tue, 09 Apr 2019 05:15:59 -0700 (PDT) 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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=PYZeGXAc; 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 S1727198AbfDIMPG (ORCPT + 99 others); Tue, 9 Apr 2019 08:15:06 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55091 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726535AbfDIMPF (ORCPT ); Tue, 9 Apr 2019 08:15:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5MD0QGE8HMnZEwh9ib4ODjfQ8egR2VR1Li2Ef+UBmAs=; b=PYZeGXAcN63LYcpv9rA7OuOhri mDkT1Z9Rvf9TisRXrESWeAAvb89wf3Ta63+cBtt/8+ZzH+zKQ7rOrOLogG9j6fhe0qeLK6nKaoVQl Rvdli2XzCOx0Teo/g2QQfmqccPfDVYs9sImzVtYHeih+9J/W6vCaEbpXp4c0C3b9Y4q8=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hDpeQ-000409-9B; Tue, 09 Apr 2019 14:14:54 +0200 Date: Tue, 9 Apr 2019 14:14:54 +0200 From: Andrew Lunn To: Miquel Raynal Cc: Pavel Machek , Vivien Didelot , 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 v3] net: dsa: mv88e6xxx: Prevent suspend to RAM Message-ID: <20190409121454.GB28742@lunn.ch> References: <20190205110728.11451-1-miquel.raynal@bootlin.com> <20190408215540.GA27929@amd> <20190409090643.0d8ce19a@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190409090643.0d8ce19a@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 09, 2019 at 09:06:43AM +0200, Miquel Raynal wrote: > Hi Pavel, > > Pavel Machek wrote on Mon, 8 Apr 2019 23:55:41 +0200: > > > On Tue 2019-02-05 12:07:28, Miquel Raynal wrote: > > > On one hand, the mv88e6xxx driver has a work queue called in loop > > > which will attempt register accesses after MDIO bus suspension, that > > > entirely freezes the platform during suspend. > > > > > > On the other hand, the DSA core is not ready yet to support suspend to > > > RAM operation because so far there is no way to recover reliably the > > > switch configuration. > > > > > > To avoid the kernel to freeze when suspending with a switch driven by > > > the mv88e6xxx driver, we choose to prevent the driver suspension and > > > in the same way, the whole platform. > > > > > > Signed-off-by: Miquel Raynal > > > > Could we at least do printk() so that user knows what went wrong? > > > > Debugging s2ram is usually not easy :-(. > > I suppose you will be told that suspend was refused by a driver > (probably without stating which one though). You may send a patch to add > a trace if you think it is important, as this change as already been > merged. Hi Miquel, Pavel I don't know the s2ram code at all, but this seems like a generic problem. The core should be reporting which driver returned an error, not the driver itself. Andrew