Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1296477pxv; Fri, 25 Jun 2021 09:37:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPfpsZwatWAPmMt5mPz6SHZ4Epg41woY1fXSIFxoTRPy0lqd3bd8kyc0SU68q/uEX76udA X-Received: by 2002:a17:906:841a:: with SMTP id n26mr11492235ejx.430.1624639064531; Fri, 25 Jun 2021 09:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624639064; cv=none; d=google.com; s=arc-20160816; b=0AWC9AmtiG2ym3EZwNfOSl2uis7xxx7KO6D04ll8/KzSD65uRL+s4Bibql6oxTxRde Q5WTOhfsMhER+4Aom9SNEud58aOGlLtk7MtBEnxmKAKMdQBXUkJyAuk9jZOppOpp3NRk 223CdjHD6aOVOQcKewDrbiFU01VgstnYaSEpEB7uUvouNBOmHAQbgey7xV62QPLbgy7q 382B8/7hugINQEPTw1lA5hg90u30DAUx2iSbhLw24+LAbnY6xcJqNGfCu1dn9oNQ/0r2 0dgIuOl1CLsvy08kJfdSLyDz+rSR6OaySbS2TvnFciq9rXo5XBnt7cl6xq6fD7uOsFJY NTAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=T+2AZqZ/2b1WKu9bOF0NlpVpI3gvGrzpNuubkbB7csA=; b=s8RTpQ1onP8yZNRYygeyXcIrjL2EyOYNih1sEwn2ZfIJ0lSrAc+u8wkIt59a7RTGpq BGYNsw7/4Qupk3yhrdigeyWv9Dn9FLii3Ro/3l3IrCLMy72TZzjf0I9B6BnX/8WypyA4 C+/Ez5UORFeMhImhBbViwWIZecQK61odu+EqtzHUXDVXFB81ZO4i0ys2mHYpyojOWdpN UeCit1Nlmp9ve7yVLNwUp45SDGcpl+CImaDoChp0Pp1jM7Kx6Ak3wnYmJkPxtt9e/azj MWP6GwsAsc8GqHtk5pK2kMyUPzMGqwY6jAWOaP88TX+vY0zBK9tioJDgaLKN9ljw0C4Q 2aQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="rfl06C/1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zd22si6250079ejb.411.2021.06.25.09.37.19; Fri, 25 Jun 2021 09:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="rfl06C/1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhFYQim (ORCPT + 99 others); Fri, 25 Jun 2021 12:38:42 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56096 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229630AbhFYQim (ORCPT ); Fri, 25 Jun 2021 12:38:42 -0400 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=T+2AZqZ/2b1WKu9bOF0NlpVpI3gvGrzpNuubkbB7csA=; b=rfl06C/1fRVC7umAQcMO/zyfMt JRgQ4p3iSfBEidWiJvjmq7mEzPgywhhOceNMNfCMF7v8ObeISZDO6f4nQLqY0rDWFIBKQQwZX5I9L feMPq1iMNKdTANKS9d0xc4WIsyXVoHAoPOPV4a5daIExejy2S5qimdxYyRye1GJTJu0A=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lwoo9-00B7fE-8y; Fri, 25 Jun 2021 18:35:57 +0200 Date: Fri, 25 Jun 2021 18:35:57 +0200 From: Andrew Lunn To: "Voon, Weifeng" Cc: "Ling, Pei Lee" , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , Russell King , "Ong, Boon Leong" , Wong Vee Khee , "Wong, Vee Khee" , "Tan, Tee Min" , "Sit, Michael Wei Hong" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH net-next V1 3/4] net: stmmac: Reconfigure the PHY WOL settings in stmmac_resume() Message-ID: References: <20210621094536.387442-1-pei.lee.ling@intel.com> <20210621094536.387442-4-pei.lee.ling@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I would like to rephase the commit message to make things clear: > > After PHY received a magic packet, the PHY WOL event will be > triggered. At the same time, the "Magic Packet Match Detected" bit > is set. In order for the PHY WOL event to be triggered again, the > WOL event status of "Magic Packet Match Detected" bit needs to be > cleared. When the PHY is in polling mode, the WOL event status needs > to be manually cleared. > > Ethtool settings will remain with WOL enabled after a S3/S4 > suspend resume cycle as expected. Hence, the driver should > reconfigure the PHY settings to reenable/disable WOL > depending on the ethtool WOL settings in the MAC resume flow. > The PHY set_wol flow would clear the WOL event status. I would still argue that making use of a WoL interrupts and PHY polling is just wrong. But i assume you cannot fix this? You have a hardware design error? The problem with this solution is you need to modify every MAC driver using the Marvell PHY. It does not scale. Please try to find a solution within phylib or the marvell driver. Something which will work for any broken setup which is using WoL interrupts combined with polling. Andrew