From: Andrew Lunn <andrew@lunn.ch>
To: Duan Andy <fugang.duan@freescale.com>
Cc: David Miller <davem@davemloft.net>,
Cory Tusar <cory.tusar@pid1solutions.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: fec: Ensure clocks are enabled while using mdio bus
Date: Sun, 14 Jun 2015 16:41:18 +0200 [thread overview]
Message-ID: <20150614144118.GA7800@lunn.ch> (raw)
In-Reply-To: <BLUPR03MB373E1D5EADCB4753C8D0F15F5B90@BLUPR03MB373.namprd03.prod.outlook.com>
On Sun, Jun 14, 2015 at 08:07:12AM +0000, Duan Andy wrote:
> From: Andrew Lunn <andrew@lunn.ch> Sent: Friday, June 12, 2015 11:39 PM
> > To: David Miller
> > Cc: Duan Fugang-B38611; Cory Tusar; netdev; Andrew Lunn
> > Subject: [PATCH] net: fec: Ensure clocks are enabled while using mdio bus
> >
> > When a switch is attached to the mdio bus, the mdio bus can be used while
> > the interface is not open. If the clocks are not enabled, MDIO
> > reads/writes will simply time out. So enable the clocks before starting a
> > transaction, and disable them afterwards. The CCF performs reference
> > counting so the clocks will only be disabled if there are no other users.
> >
> > Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> > ---
>
> NAK the patch.
> i.MX series MDIO bus is a part of ENET controller. If the eth
> interface is not open, all clocks including MDIO bus clock are not
> enabled for power saving.
Where do you see a power saving regression in this code? It is not as
if i just unconditionally turn the clocks on. As the comment says, at
the start of an MDIO transaction, the clocks are enabled. At the end
of a transaction, they are disabled again. If you don't have a switch
connected, there will be no transactions, hence no change to power
savings.
> In general, if you want to use mdio bus net interface must be
> running status.
This is not true for a number of Ethernet devices. All those currently
used with DSA allow MDIO transactions at any time.
Andrew
next prev parent reply other threads:[~2015-06-14 14:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 15:39 [PATCH] net: fec: Ensure clocks are enabled while using mdio bus Andrew Lunn
2015-06-14 8:07 ` Duan Andy
2015-06-14 14:41 ` Andrew Lunn [this message]
2015-06-14 19:31 ` Florian Fainelli
2015-06-15 1:43 ` Duan Andy
2015-06-15 3:15 ` Andrew Lunn
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=20150614144118.GA7800@lunn.ch \
--to=andrew@lunn.ch \
--cc=cory.tusar@pid1solutions.com \
--cc=davem@davemloft.net \
--cc=fugang.duan@freescale.com \
--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).