Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2448380pxb; Thu, 11 Feb 2021 12:37:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbDTG1rrRNTCa5SjRG09c5DylzH0pOh1SdY2CtqNanatGdWbvRxFJP7qHGwf7YeHY8mrfG X-Received: by 2002:aa7:cac6:: with SMTP id l6mr10224699edt.357.1613075858344; Thu, 11 Feb 2021 12:37:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613075858; cv=none; d=google.com; s=arc-20160816; b=Gx9TjxUExU5waPtoTjMEXsPStTIMyrfLMnqLaY6eHoTRJDd7Tg8bUwYNm3Xc7ZoFQy 3HL1rmBOGpO/DxDFS3VrhdYQr2Ca/WzsQETk6eNGHvEfIWCc+at2tvC9SuQpik4klI5b 4B7IvhTOFalQNxUY6rjBruOCQCZR6P/0tG6DJect94rQgYpctBlKsdMrB5BnThSFbskq 3+mAVPkiOgVDt+r4qO2qYS9F9tHResWUK19RCZMU/hrEnR9USQytDuVOR8KQUffa5AfD i+wckpxD79BWUZ2duoTYLjDZLgDcC+NaF66t4/xEcTK1x0fhEYASoVMI76vEy7RVbH/N wIEw== 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=jtiCWYLkZ/qFeJRleowfexBkO+hePX1B/a8Y/YrG4CI=; b=iu5+GtRaxlVwYDobQdym/QdaaZTmrMrC12uFoc8xAwm/ABA9Uvp867Tt0tQNm23IgP g2JWhqrpgCDOqf6igJMAYnlZIWaMnbn9+NGk0Fb50IQLi8MAxklLvt8185q6idsg1scF 1+/inyKe2DYTgJS5DzAvJP0/neBwHrdnoths1qTyd+DCuD+P/kpoTgs4Xt9AQaxEm93U yo1y4mnLMlZwGicQ7rchKkjUUgTohqA3uXNvHKk8gZ88pXa7APijc9QDIUCIQ3j0aM3E Sj2UYggp7LUD7PyZo8Phk3RFitHkYIql9o2XftBfTtMBDbAZTLNKPaLLZEOCpbCxzmLX q1Fg== 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 cz11si4262493edb.175.2021.02.11.12.37.14; Thu, 11 Feb 2021 12:37:38 -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 S230206AbhBKUfh (ORCPT + 99 others); Thu, 11 Feb 2021 15:35:37 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:32892 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbhBKUfb (ORCPT ); Thu, 11 Feb 2021 15:35:31 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id BFD321C0B8A; Thu, 11 Feb 2021 21:34:31 +0100 (CET) Date: Thu, 11 Feb 2021 21:34:31 +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: <20210211203430.GA8510@amd> References: <7976f7df-c22f-d444-c910-b0462b3d7f61@gmail.com> <20210114102508.GO1551@shell.armlinux.org.uk> <56366231-4a1f-48c3-bc29-6421ed834bdf@gmail.com> <20210211121701.GA31708@amd> <0ac6414e-b785-1f82-94a2-9aa26b357d02@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <0ac6414e-b785-1f82-94a2-9aa26b357d02@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2021-02-11 13:36:16, Heiner Kallweit wrote: > On 11.02.2021 13:17, Pavel Machek wrote: > > On Thu 2021-01-14 12:05:21, Heiner Kallweit wrote: > >> On 14.01.2021 11:41, Claudiu.Beznea@microchip.com wrote: > >>> > >>> > >>> 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. > >>> > >>> In the patch I proposed in this thread the restoring is done in PHY d= river. > >>> Do you think I should continue the investigation and check if somethi= ng > >>> should be done from the phylib itself? > >>> > >> 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: > >=20 > > Power to some devices can be cut during s2ram, yes. > >=20 > Thanks for the confirmation. >=20 > >> - 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 > >=20 > > You'll often have same implementation, yes. > >=20 >=20 > If resume and restore both have to assume that power was cut off, > then they have to fully re-initialize the device. Therefore it's still > not clear to me when you would have differing implementations for both > callbacks. Full re-init is easiest way, yes. But restore had different Linux kernel already booting on device, and maybe touching the hardware, and resume may or may not cut power to all devices. So yes they can be different. Regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAmAllNYACgkQMOfwapXb+vKKKwCeOJD/Y9x0bzJ0MCwFogtjpIS0 Vp8An3BO6zNGlPXqApDmQl2M87YN/7FM =zSCl -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--