netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Claudiu.Beznea@microchip.com, andrew@lunn.ch,
	davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: micrel: reconfigure the phy on resume
Date: Wed, 13 Jan 2021 22:01:07 +0000	[thread overview]
Message-ID: <20210113220107.GN1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <7976f7df-c22f-d444-c910-b0462b3d7f61@gmail.com>

On Wed, Jan 13, 2021 at 10:34:53PM +0100, Heiner Kallweit wrote:
> On 13.01.2021 13:36, Claudiu.Beznea@microchip.com wrote:
> > On 13.01.2021 13:09, Heiner Kallweit wrote:
> >> On 13.01.2021 10:29, Claudiu.Beznea@microchip.com wrote:
> >>> It could enter in this mode based on request for standby or suspend-to-mem:
> >>> echo mem > /sys/power/state
> >>> echo standby > /sys/power/state

This is a standard way to enter S2R - I've used it many times in the
past on platforms that support it.

> I'm not a Linux PM expert, to me it seems your use case is somewhere in the
> middle between s2r and hibernation. I *think* the assumption with s2r is
> that one component shouldn't simply cut the power to another component,
> and the kernel has no idea about it.

When entering S2R, power can (and probably will) be cut to all system
components, certainly all components that do not support wakeup. If
the system doesn't support WoL, then that will include the ethernet
PHY.

When resuming, the responsibility is of the kernel and each driver's
.resume function to ensure that the hardware state is restored. Only
each device driver that knows the device itself can restore the state
of that device. In the case of an ethernet PHY, that is phylib and
its associated PHY driver.

One has to be a tad careful with phylib and PHYs compared to their
MAC devices in terms of the resume order - it has not been unheard
of over the years for a MAC device to be resumed before its connected
PHY has been.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2021-01-14  2:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 15:45 [PATCH] net: phy: micrel: reconfigure the phy on resume Claudiu Beznea
2021-01-08 16:10 ` Andrew Lunn
2021-01-08 16:31 ` Heiner Kallweit
2021-01-13  9:29   ` Claudiu.Beznea
2021-01-13 11:09     ` Heiner Kallweit
2021-01-13 12:36       ` Claudiu.Beznea
2021-01-13 21:34         ` Heiner Kallweit
2021-01-13 22:01           ` Russell King - ARM Linux admin [this message]
2021-01-14  7:30             ` Heiner Kallweit
2021-01-14 10:12           ` Claudiu.Beznea
2021-01-14 10:25             ` Russell King - ARM Linux admin
2021-01-14 10:41               ` Claudiu.Beznea
2021-01-14 11:05                 ` Heiner Kallweit
2021-02-11 11:18                   ` Claudiu.Beznea
2021-02-11 12:17                   ` Pavel Machek
2021-02-11 12:36                     ` Heiner Kallweit
2021-02-11 20:34                       ` Pavel Machek
2021-01-13 23:28 ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210113220107.GN1551@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).