lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 14 Jun 2015 16:41:18 +0200
From:	Andrew Lunn <andrew@...n.ch>
To:	Duan Andy <fugang.duan@...escale.com>
Cc:	David Miller <davem@...emloft.net>,
	Cory Tusar <cory.tusar@...1solutions.com>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: fec: Ensure clocks are enabled while using mdio bus

On Sun, Jun 14, 2015 at 08:07:12AM +0000, Duan Andy wrote:
> From: Andrew Lunn <andrew@...n.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@...n.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ