Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1144063lqd; Thu, 25 Apr 2024 07:14:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXupIUgQNt9n1c7CheYhTvchtqe/7frwcSuxF8FuVp8UvfcgaHbpngvm7imwPewbm+8rWO7/zyvk6zpy87bJM9qGeFdRS6YHq2w1y0nIQ== X-Google-Smtp-Source: AGHT+IF17BdvyDvGm9LUO/wa4JImf1xDMGcxCcAhNkQhVBoHdgEPr9xNVzeArmWUyqYhiilXYew3 X-Received: by 2002:a50:f682:0:b0:570:4aea:4e1e with SMTP id d2-20020a50f682000000b005704aea4e1emr3039204edn.15.1714054447518; Thu, 25 Apr 2024 07:14:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714054447; cv=pass; d=google.com; s=arc-20160816; b=xhLbXs1gVziL11plfLj4+s7HyndTOWba7lSTCLsVoiun3sKGjClupGdkbxgcH7pKBQ oo39973act+gTdiLNVbjolktxJS9GnzvnfpTgC4/6yS1f1eZcbdlQl4wInZEu//0Lfd2 2UksONCyq00/AsoIx/OmnvboDOsfCbCz7jRbQTSQaV2yOxBgeBhw/lBgT7Mla7T7zq97 TzNYaunq26SluPzrFKDAPC7UXCsg4ySfkvA3ZGj06sX1pyLuOTC7D7caZ3sxxHdeGjqj FwDuAPRrszWntalz5Fd0PWTsiBHhgbvmFP4QbYUb6c3RbnAjidco8Avnuzcjliqcm2dz aCPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EdGAMsXDk5Z9irIqk6ZPajxgCEsTnc0pm/mZs2Sxzu8=; fh=DqV8bvBtuW9h/tzCoU1omON+zXWWxTN7U8LS58m0PUI=; b=z19LlIGPAUEO2HXn8MMvJbL6163ShfpOQVjLcgqnRFnsGqicNJdKguwcUhZ9nJDVPa J2yK3AO1xDsIVjwchEB78OroNynWVwiV6nZysjfbN1sRmlA9wBfOYVBy7kJJQW42hzzZ vYii6x+mxavT/fFx1YawjFPLKZSOd7cLUfc5oPoJcQGIuGtACGLYlEaNb/wN3HdlEBvS RlJjZQW7uuTYzqYTCnlBAu/VgKmoFzwW/Kxshcz20mb8Y2m5lkOZENU3sW+F6CH9G9XZ KQXr7NvgwGMn51T5GJW4+PVufOR9wuPZb4SF+kE2nlnrnPgim+tot7HAs1CbsErfmUNd l5RA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PY+5C0qn; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-158671-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id e3-20020a50fb83000000b0056e1fe7f17bsi9664474edq.107.2024.04.25.07.14.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 07:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158671-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=PY+5C0qn; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-158671-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158671-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 404461F217D1 for ; Thu, 25 Apr 2024 14:14:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FDDA14A089; Thu, 25 Apr 2024 14:13:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="PY+5C0qn" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7A6214A09A; Thu, 25 Apr 2024 14:13:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714054416; cv=none; b=qJPLMM8HrgSWl3PaAVEU/CRjQ9Y2qh8WG0ksritMaQGvuirUNo8pvTw5dI3jikHEyXoOHIGOgXwaEe6+ZT+9UVAUDqtk5tVcMAzztDdaYdOr+JOsz40NkrvJf0bMn6N77WEAVH+mpw+HnYazYXCoHZt4R5ZPHLsL2Dmn5ZQIj84= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714054416; c=relaxed/simple; bh=vnMkoliidnUgjWCP/KC7GNCTd2r4EQjwYmsuFjvucw0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NtCoS19L2JMjmcw+Kd8lwo0hBJF79JnaThhmL+DqFTjlMnrLgD71eXhoLMy2KkthnQHa2pcz611K1JzWHLZbq84YOuVf+bD+ml3ExhLRs9y0vWcfEN+tTnij8bwdzAfGj5crV4+28HVE2qEy0XL5mNPQMRMc5wMvB4Gf0WP3qQE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=PY+5C0qn; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=EdGAMsXDk5Z9irIqk6ZPajxgCEsTnc0pm/mZs2Sxzu8=; b=PY+5C0qnxpEuwhbKn2GR7rM+R8 6YnNaBVgt9UWSO43a7wyfqOGHbUf1zNLI86T7OeIl4D7Djf7H0BEWZaBes+fArDb//mPb9hD4VekJ 08PeYEJwR4YA0xZ1VNH6CRbE/82ew2FjYeJvemg8QE8BPAXe7nvbDg3S49kI2yftQ3i0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rzzqk-00DzXE-V9; Thu, 25 Apr 2024 16:13:22 +0200 Date: Thu, 25 Apr 2024 16:13:22 +0200 From: Andrew Lunn To: Raju.Lakkaraju@microchip.com Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, linux-kernel@vger.kernel.org, Bryan.Whitehead@microchip.com, UNGLinuxDriver@microchip.com Subject: Re: [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY does not Message-ID: <38718a9b-bc7b-45d1-b15e-f4fea628db3d@lunn.ch> References: <20240320042107.903051-1-Raju.Lakkaraju@microchip.com> <20240320042107.903051-3-Raju.Lakkaraju@microchip.com> <22089299-a3e2-4cbd-942a-65ea070657b8@lunn.ch> <9c4f8fcd-ae95-4874-b829-d381928c5f13@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: > If PHY handles the magic packet or phy activity (i.e. WAKE_MAGIC or WAKE_PHY), our PCI11x1x's MAC will handle only interrupt (MDINT from PHY). Not MAC's magic packet. > In this case do we really call phy_speed_down( ) ? phy_speed_down() is orthogonal to who does the wake. Packets are packets. phy_speed_down() does not change that. All it does it drop the link to a slower speed. And slower speed means less power consumption. A PHY operating at 10Mbps uses about 1W less power than a PHY operating at 1G. The numbers will depend on the PHY, but you get the idea. Plus the link peer will also save a similar amount out power.... If the MAC is needed for WoL, because the PHY does not support the needed modes, you probably also save power with the MAC running at 10Mbps. Its clocks probably tick slower, etc. But there is a trade off. When resuming, you want to go back to the full speed link. And that takes time, a little over 1 second. So you need to decide, do you want to prioritise minimum power consumption when suspended, or fast resume? Andrew