From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8324DC433E0 for ; Fri, 26 Jun 2020 20:36:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F1402075D for ; Fri, 26 Jun 2020 20:36:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725864AbgFZUgw convert rfc822-to-8bit (ORCPT ); Fri, 26 Jun 2020 16:36:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbgFZUgw (ORCPT ); Fri, 26 Jun 2020 16:36:52 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D670C03E979 for ; Fri, 26 Jun 2020 13:36:52 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 7221311D69C3E; Fri, 26 Jun 2020 13:36:51 -0700 (PDT) Date: Fri, 26 Jun 2020 13:36:50 -0700 (PDT) Message-Id: <20200626.133650.2064799999224373059.davem@davemloft.net> To: dgcbueu@gmail.com Cc: netdev@vger.kernel.org, thomas.petazzoni@bootlin.com, andrew@lunn.ch, rmk+kernel@armlinux.org.uk, f.fainelli@gmail.com Subject: Re: [PATCH v2] net: mvneta: speed down the PHY, if WoL used, to save energy From: David Miller In-Reply-To: <24932419.y57xhLMsBk@tool> References: <24932419.y57xhLMsBk@tool> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 26 Jun 2020 13:36:51 -0700 (PDT) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Daniel González Cabanelas Date: Fri, 26 Jun 2020 17:18:19 +0200 > Some PHYs connected to this ethernet hardware support the WoL feature. > But when WoL is enabled and the machine is powered off, the PHY remains > waiting for a magic packet at max speed (i.e. 1Gbps), which is a waste of > energy. > > Slow down the PHY speed before stopping the ethernet if WoL is enabled, > and save some energy while the machine is powered off or sleeping. > > Tested using an Armada 370 based board (LS421DE) equipped with a Marvell > 88E1518 PHY. > > Signed-off-by: Daniel González Cabanelas > --- > Changes in v2: > - Patch reworked with the new phylink_speed_(up|down) functions > provided by Russel King. This should avoid the kernel OOPs issue when > used with a switch or a PHY on a SFP module. Applied to net-next.