Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp604633lqd; Wed, 24 Apr 2024 11:11:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWAXfWYhWU0l2qqGlsFYGzsdjlpjN3aXvm/GJgzVRNccJlLcMP5rCZPYGg9juacAT3KIv/eephMyripby9xMjYWYLJYBck3DfEnsUgKlQ== X-Google-Smtp-Source: AGHT+IF4oTeNiLLwsfM7cV9P62jAo8Saoj/HxHp2y6mB/Tcrv3vW+gQQ4FJE6nHTjsCW/SPRX0Vd X-Received: by 2002:a50:d4c3:0:b0:572:3b3c:754f with SMTP id e3-20020a50d4c3000000b005723b3c754fmr475923edj.4.1713982319090; Wed, 24 Apr 2024 11:11:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982319; cv=pass; d=google.com; s=arc-20160816; b=QsUIS3edYBQiInkVrR9rY8Ayu/LwpbWrcgxPzxw80MBY8b/IHbepRlE7j8wirZJvYL AEDExDVmB60gw4wUpyMEyhVQzsW0Uc9ShRjtJ8SfEk/+JxiOAqQ/hIEkTMjoG0u9BWPu 27vU5Mj5B2E2yaKQZc2l0RhTzp6jjZnCO6690hNKUd3mdZewOel9IU0Tx3AL9Kn6bbFa Tsal1L7+vQ5vRTnUtqySPuy0rRM76SwHcuV9eVYwkMrWny1JkoEqFtN5OOChJOTjS+Na xrOAQsrFba7ccawmzxNbPaJNH4LcNaa7dB9WYvTB901awPxNYIEFuq92LIpm5j39+wiv dPYw== 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=SHD0stuCMK+KD0Sdi1Jz9uN5MAoinReJ6Vu81pY4K68=; fh=aMT798r2XmMJCkuWiuOsRHV+y2vrJH7AwH1fycHnCaY=; b=V+NkmCw34HgoAmT04EN8TGsFJacm0GNGjcWnTs0+yzuqIxQm3JBV3DG4mO3MlTWuLG E310ylb8tilecSltAniBD8AIFqZAY5ew3MM+a1Ra3BA25zwgEYSdmxc0hvDDAdlSdypP 7IMsTR1iQ/NPDc9tAjJOd7Wq/Zw+QDLKtO3TB1FCkbH6GUZdnQgQxbU77osyTPD5j0Sr n9db8IygKjDUURQPkud4v2b+ydzB97wfKQgYFihNl+KcPR4oInoEwYrt3FkRBHRtEVue cLzk+USfzokn+oCUnXy4FQZ/Y8hHwrt+3a4fbQ1Q//cEu+6SNCzRBSZy1tVIF8dI1W52 ym4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="Ld/VClUu"; 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-156842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156842-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 u19-20020a50d513000000b0057220fcb26asi2516229edi.49.2024.04.24.11.11.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:11:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156842-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="Ld/VClUu"; 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-156842-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156842-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 7B4251F23B92 for ; Wed, 24 Apr 2024 12:13:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5050615ADB9; Wed, 24 Apr 2024 12:13:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Ld/VClUu" 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 69DBD158DDD; Wed, 24 Apr 2024 12:13:40 +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=1713960822; cv=none; b=bSvxb9CBdeVizJYVPzdIDUTuEqIpT4N3wP3wGZ7O/gieoycdSs62A4dPDL79s1/ig+cIA80fwB7P+3VsW8YP7VCvcjfOjs9flgHShfeRrrl+qz8xI5J4rlxW2mGmNog+/Rz1NaqGvc6ZRMQdljG/a0svZA108oWCr69ftR6zniw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713960822; c=relaxed/simple; bh=sLXTt9GB/rsKOXLZoUYneBDDC3CyVoxDen23EWg8h5E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b0Z+LLVppjef9HZ8qyjkYyZwqeAGHe8wV4EbainRDCB8hVOqUFdqUhkH7+57ag8UmCIjaE2jerVnBAUw0d8pYOw95BzDaVGU/PU8bPSdipEGXPUDM2VDYPMgeaOQzmrx3J8uuzTFteKtWS2/E5gl3BSYn1icYywCbNUPiWf18FM= 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=Ld/VClUu; 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=SHD0stuCMK+KD0Sdi1Jz9uN5MAoinReJ6Vu81pY4K68=; b=Ld/VClUu4wPtjwWuOpaHqHnAeC AISzs1A3ztPno5HsqjcS0PJkH5+clU4bg7JwOlPABSmr4bYGUhhhrVVrwt72tO1wnAHjjzGdXdLon rdcfvk1T4HbVwj+j/6nt2hmk/Ohkd+AwUElQKZ9Bw8SUIJSMFnM/SObJy2bCf1mmbq40=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rzbVD-00DoHK-6c; Wed, 24 Apr 2024 14:13:31 +0200 Date: Wed, 24 Apr 2024 14:13:31 +0200 From: Andrew Lunn To: Ronnie.Kunin@microchip.com Cc: Raju.Lakkaraju@microchip.com, 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: <3285a386-5c3e-445d-94d7-4157240a4eb8@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: > > This is the bit that is missing from your commit message, and maybe it should be in a comment. The > > interrupt controller is part of the MAC. So you need to leave MAC burning power, maybe even > > processing packets, because you cannot disable the MAC but leave the interrupt controller functioning, > > so that it can trigger a wake up via PCIe. > > I think there is a terminology problem here. Within MCHP we > sometimes call "the MAC" to the whole ethernet controller chip that > has everything (i.e. actual MAC, FIFOs, filtering engines, offloads, > interrupt controller, bus interface, etc) except the PHY. > That is what Raju probably means when he says that the interrupt is > handled by "the MAC". While the registers that control > enabling/disabling processing of the phy interrupt do reside within > the MAC block's register set in the ethernet controller, it neither > means that the extensive parts of the actual MAC block need to be > kept enabled nor that processing packets has to occur in the MAC in > order for the PCI11x1x chip to detect an event coming from the PHY > that should be processed as a wake event over PCIe I was expecting that, which is why i suggested looking at shutting down what is not needed. The current lan743x_ethtool_set_wol() does not do any of that. > I am Windows driver expert, not Linux so I may be wrong for Linux, > but with the advent of dynamic PM in modern OSs (connected and then > modern standby in Windows, I remember also autosuspend - at least in > USB, maybe not applicable to PCIe - in Linux ) we have stayed away > from renegotiating the link to down speed during suspend - resume > events since those interfere with / delay connectivity > significantly. Renegotiation does take a little over 1s. It maybe not worth it for suspend to RAM. But for suspend to disk, a resume is probably going to take awhile, so maybe 1 second is less noticeable. Also you maybe need to think about is EU norms about standby and power off consumption. Going from 1G to 10M can save you 1W. Andrew