From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754098AbcKPPi4 (ORCPT ); Wed, 16 Nov 2016 10:38:56 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36451 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753937AbcKPPiz (ORCPT ); Wed, 16 Nov 2016 10:38:55 -0500 Message-ID: <1479310731.17538.53.camel@baylibre.com> Subject: Re: [PATCH net 1/3] net: phy: realtek: add eee advertisement disable options From: Jerome Brunet To: Andrew Lunn Cc: Florian Fainelli , netdev@vger.kernel.org, devicetree@vger.kernel.org, Carlo Caione , Kevin Hilman , Giuseppe Cavallaro , Alexandre TORGUE , Martin Blumenstingl , Andre Roth , Neil Armstrong , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Wed, 16 Nov 2016 16:38:51 +0100 In-Reply-To: <20161116150628.GI23231@lunn.ch> References: <1479220154-25851-1-git-send-email-jbrunet@baylibre.com> <1479220154-25851-2-git-send-email-jbrunet@baylibre.com> <20161115163036.GB23231@lunn.ch> <476b72f3-5efe-3551-6c24-0e378d655a0f@gmail.com> <1479290189.17538.25.camel@baylibre.com> <20161116132337.GD19962@lunn.ch> <1479307890.17538.40.camel@baylibre.com> <20161116150628.GI23231@lunn.ch> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-11-16 at 16:06 +0100, Andrew Lunn wrote: > On Wed, Nov 16, 2016 at 03:51:30PM +0100, Jerome Brunet wrote: > > > > On Wed, 2016-11-16 at 14:23 +0100, Andrew Lunn wrote: > > > > > > > > > > > > > > > There two kind of PHYs supporting eee, the one advertising eee > > > > by > > > > default (like realtek) and the one not advertising it (like > > > > micrel). > > > > This is just the default register value. > > > > > > > > > > > I don't know too much about EEE. So maybe a dumb question. Does > > > the > > > MAC need to be involved? Or is it just the PHY? > > > > > > If the MAC needs to be involved, the PHY should not be > > > advertising > > > EEE > > > unless the MAC asks for it by calling phy_init_eee(). If this is > > > true, > > > maybe we need to change the realtek driver, and others in that > > > class. > > > > As far I understand, the advertised capabilities are exchanged > > during > > the auto-negotiation. > > > > At this stage, if the advertisement is disabled (regarless of the > > actual support) on either side of the link, there will be no low > > power > > idle state on the Tx nor the Rx path. > > > > If the advertisement is enabled on both side but we don't call > > phy_init_eee, I suppose Tx won't enter LPI, but Rx could. > > What i was trying to find out is, if the MAC needs to support EEE as > well as the PHY, what happens when the MAC does not support EEE, but > the PHYs do negotiate EEE? Does it break? Interesting question. In a regular case, I suppose it should be fine. As you would have LPI only on the Rx path this should be transparent to the MAC. That's my understanding. Maybe people knowing EEE better than me could confirm (or not) ? Peppe? Alexandre? I just checked with the OdroidC2, I disabled eee support by forcing "dma_cap.eee = 0" in stmmac_get_hw_features. As expected, no tx_LPI interrupts but plenty of rx_LPI interrupts. What was not expected is test failing like before. So in our case, having LPI on the Rx path is fine for receiving data, but not for sending. > >     Andrew