Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2096103pxb; Thu, 11 Feb 2021 04:23:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlM7VP7P6jWCXNl/+k21Glh7yTg8WqHfnlZBjpXd7IbIsPn+qBWaLoYfVHeBzjuhpl9f/D X-Received: by 2002:a17:906:3881:: with SMTP id q1mr8337133ejd.490.1613046197851; Thu, 11 Feb 2021 04:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613046197; cv=none; d=google.com; s=arc-20160816; b=oT7gg2Ymfv8ngRwEJxU61nugGnJJ5HZP4wK8qGXLTAXzOquOcTqQCJ+MuOrN6KNX5W 4blIxLGG6/a46xkC7rkKD98AcPyD8qf9ii2q6RAZlxaToygnTqHQTwQE277aMiGQjW2x yu+Cc3Uc/f9cTcXuz80LSzB/u7xAq3LJyWbHypk2h1ADBLOoxH0VVFryQiJ9qbQiUL0z vqgFt+FNPxTAIrIV94Wzzhs+HfS17DRugGSTBwJGwJ525QxhpaOVe+GL6qjp8zYZFc/9 nieoYSzJWqT4Vd471nlmEb5QH7uCanvvlSyxCerQZxJW/4HwR0qBpSfofCf6yfDat5Iq ReEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=HCOGJj9A6ielvFtBpg3IFcwX0CpX4PTQye8w45sUi6k=; b=RNBQyADM4dJdbbCRCqbZvHcAc/tNikiMSCE/O1LBDM04sLC7bHNvKdsqrzMEAvYv+R nmcj6yreRLST+iJcahGbW6nQ3+vXskBRxMSmgIEabTrgYnLMrhh3zYeYC/6d6HEk7Mqn qyvXVxvPDtR5U51gb1u7waWogudZiactHdLR+qOzkfFIyDHhfuZxOdDhGD6BgU1rClQF rgUZH3NHbckD5WIhkva22uD1fp7+XPbHCX03E4sWTd7CLl2y0lwtbZzgM9eqqTxt9T8E pPYS92sD+BMhn3SuhjWGZkhw1TrwOUZOX6O9DNN6Jq/ptZxfvORWmTc55wkwlOKHUAgw VgHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si3598670ejw.681.2021.02.11.04.22.53; Thu, 11 Feb 2021 04:23:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231872AbhBKMU2 (ORCPT + 99 others); Thu, 11 Feb 2021 07:20:28 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:36570 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231807AbhBKMSO (ORCPT ); Thu, 11 Feb 2021 07:18:14 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 7EDFD1C0B8A; Thu, 11 Feb 2021 13:17:02 +0100 (CET) Date: Thu, 11 Feb 2021 13:17:02 +0100 From: Pavel Machek To: Heiner Kallweit Cc: Claudiu.Beznea@microchip.com, linux@armlinux.org.uk, andrew@lunn.ch, davem@davemloft.net, kuba@kernel.org, rjw@rjwysocki.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH] net: phy: micrel: reconfigure the phy on resume Message-ID: <20210211121701.GA31708@amd> References: <1610120754-14331-1-git-send-email-claudiu.beznea@microchip.com> <25ec943f-ddfc-9bcd-ef30-d0baf3c6b2a2@gmail.com> <7976f7df-c22f-d444-c910-b0462b3d7f61@gmail.com> <20210114102508.GO1551@shell.armlinux.org.uk> <56366231-4a1f-48c3-bc29-6421ed834bdf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <56366231-4a1f-48c3-bc29-6421ed834bdf@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2021-01-14 12:05:21, Heiner Kallweit wrote: > On 14.01.2021 11:41, Claudiu.Beznea@microchip.com wrote: > >=20 > >=20 > > On 14.01.2021 12:25, Russell King - ARM Linux admin wrote: > >> > >> As I've said, if phylib/PHY driver is not restoring the state of the > >> PHY on resume from suspend-to-ram, then that's an issue with phylib > >> and/or the phy driver. > >=20 > > In the patch I proposed in this thread the restoring is done in PHY dri= ver. > > Do you think I should continue the investigation and check if something > > should be done from the phylib itself? > >=20 > It was the right move to approach the PM maintainers to clarify whether > the resume PM callback has to assume that power had been cut off and > it has to completely reconfigure the device. If they confirm this > understanding, then: Power to some devices can be cut during s2ram, yes. > - the general question remains why there's separate resume and restore > callbacks, and what restore is supposed to do that resume doesn't > have to do You'll often have same implementation, yes. > - it should be sufficient to use mdio_bus_phy_restore also as resume > callback (instead of changing each and every PHY driver's resume), > because we can expect that somebody cutting off power to the PHY > properly suspends the MDIO bus before If restore works with power cut and power not cut then yes, you should get away with that. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmAlID0ACgkQMOfwapXb+vIv2QCgi63lZx/G4VQq5XuwoAFXDZNf YVoAoJmUbtI7+OYCqXQ1Lww9/y/ctYcK =UH1n -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--