From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752440AbbBXCaE (ORCPT ); Mon, 23 Feb 2015 21:30:04 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:56411 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752135AbbBXCaC (ORCPT ); Mon, 23 Feb 2015 21:30:02 -0500 Message-ID: <54EBE221.2000703@roeck-us.net> Date: Mon, 23 Feb 2015 18:29:53 -0800 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: David Miller CC: netdev@vger.kernel.org, andrew@lunn.ch, f.fainelli@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [RFT PATCH 1/2] net: dsa: mv88e6xxx: Add EEE support References: <1424708770-3135-1-git-send-email-linux@roeck-us.net> <20150223.171947.1925831716804927748.davem@davemloft.net> In-Reply-To: <20150223.171947.1925831716804927748.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020202.54EBE228.016C,ss=1,re=0.001,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 1 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/23/2015 02:19 PM, David Miller wrote: > From: Guenter Roeck > Date: Mon, 23 Feb 2015 08:26:09 -0800 > >> + /* Don't call phy_init_eee for now. It fails if the link is down, >> + * but that should not really be a reason to fail configuration. >> + */ > > I think there is some confusion about phy_init_eee(). > > You invoke it after a link has been established. Because programming > the MDIO registers that turn on EEE can only be done if the link > is configured in a certain way. > > If you look at stmmac, it invokes phy_init_eee() via it's adjust_link > callback passed to phy_connect(). This is basically how I would > expect it to be used, in that any time a link parameter changes we > rerun phy_init_eee() to check the link partner registers, duplex > state, etc. > > SXGBE on the other hand seems to not be using phy_init_eee() properly, > it only invokes it once per device open and that makes no sense at all > because then you're stuck with the eee state resulting from the link > state at open time. > That explains a lot. I suspect the use in bcm_sf2 and bcmgenet is also not as intended. Thanks, Guenter