LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Harini Katakam <harinik@xilinx.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Harini Katakam <harini.katakam@xilinx.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	David Miller <davem@davemloft.net>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Simek <michal.simek@xilinx.com>,
	Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Subject: Re: [PATCH 3/4] net: macb: Add pm runtime support
Date: Wed, 31 Oct 2018 20:40:25 +0530	[thread overview]
Message-ID: <CAFcVECKg4u5t9=TOJ1omVJ=8ves_yvzcDZZA_-bE4OAv96cymg@mail.gmail.com> (raw)
In-Reply-To: <20181031145400.GH20889@lunn.ch>

Hi Andrew,
On Wed, Oct 31, 2018 at 8:24 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Oct 31, 2018 at 09:10:22AM +0530, Harini Katakam wrote:
> > From: Harini Katakam <harinik@xilinx.com>
> >
> > Add runtime pm functions and move clock handling there.
> > If device is suspended and not a wake device, then return from
> > mdio read/write functions without performing any action because
> > the clocks are not active.
> >
> > Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> > Signed-off-by: Harini Katakam <harinik@xilinx.com>
> > ---
> > Changes from RFC:
> > Updated pm get sync/put sync calls.
> > Removed unecessary clk up in mdio helpers.
>
> This last bit has me worried.
>
> The MDIO bus is a shared bus with a life of its own.  You can have
> multiple PHYs and switches on it. The PHYs can for a different
> Ethernet MAC. Switch drivers will expect to be able to address the
> switch when the interface is down.
>
> The FEC driver did something similar for a while. I had to make MDIO
> read/write runtime PM aware, otherwise i could not access the Ethernet
> switch hanging of its MDIO bus.

Yes, I understand. But I thought I'd handle it when we have a separate
MDIO bus driver. As of now, with macb, I do not see a way, for ex.,
for MAC1 to access MDIO0 when MAC0 is suspended.
However, I will work a bit more on this solution.

With the clk up, I've noticed that there is atleast one PHY status poll
that ends up bringing the clock up after the MAC has been suspended.
Of course phy is supended immediately after that but it just delays
this full power down process.

Regards,
Harini

  reply	other threads:[~2018-10-31 15:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  3:40 [PATCH 0/4] Macb power management support for ZynqMP Harini Katakam
2018-10-31  3:40 ` [PATCH 1/4] net: macb: Check MDIO state before read/write and use timeouts Harini Katakam
2018-10-31 13:48   ` Andrew Lunn
2018-10-31 13:50     ` Harini Katakam
2018-10-31  3:40 ` [PATCH 2/4] net: macb: Support clock management for tsu_clk Harini Katakam
2018-10-31  3:40 ` [PATCH 3/4] net: macb: Add pm runtime support Harini Katakam
2018-10-31 14:54   ` Andrew Lunn
2018-10-31 15:10     ` Harini Katakam [this message]
2018-10-31 15:47       ` Andrew Lunn
2018-10-31 15:50         ` Harini Katakam
2018-10-31  3:40 ` [PATCH 4/4] net: macb: Add support for suspend/resume with full power down Harini Katakam
2018-10-31 14:58   ` Andrew Lunn
2018-10-31 15:01     ` Harini Katakam
2018-10-31 16:10   ` Claudiu.Beznea
2018-10-31 16:56     ` Harini Katakam

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='CAFcVECKg4u5t9=TOJ1omVJ=8ves_yvzcDZZA_-bE4OAv96cymg@mail.gmail.com' \
    --to=harinik@xilinx.com \
    --cc=andrew@lunn.ch \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=harini.katakam@xilinx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=shubhrajyoti.datta@xilinx.com \
    --subject='Re: [PATCH 3/4] net: macb: Add pm runtime support' \
    /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

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).