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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 452D4C49EA7 for ; Fri, 25 Jun 2021 16:36:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D99561985 for ; Fri, 25 Jun 2021 16:36:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229922AbhFYQin (ORCPT ); Fri, 25 Jun 2021 12:38:43 -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 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.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 39D96C2B9F4 for ; Fri, 25 Jun 2021 16:38:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0070461984 for ; Fri, 25 Jun 2021 16:38:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0070461984 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nj+uGuMfvyrCID1nyhuB26zMz24kZafyhz1KjvnoM5U=; b=Xn1ce+cGeGZMkv ULOVt1Ec9MHn6WyVTXDMdRh6VzVCH3WhLpFkqnMvhdinTPKCJ2Jxrm8CmuASskSM79+QnCm4eBac/ OvCyY0rpa+Z3l/RKZsyuuyAkA8t0hkvPu4JILfqdA9/E8VqrX889k0zbMNyo6C5PRLoH68MjTS5lu 3emT8pRb7chOd7hfnwja0pEJcEjiRo4uFgl5jzeA22jYsOdb1YOz0iI18/m2k+y6+lfFUO9IGzL0+ +Hioptm4FNen7rXKYk5mG+CM/7ZNfNhhBWqs07++LUzCHJhGiO41itqaqD0auoJ/YlNnt8oZBxt/D RN+xkNFb7a8OFSBsOumg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwoob-002Kyd-S3; Fri, 25 Jun 2021 16:36:26 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwooY-002KxZ-1P for linux-arm-kernel@lists.infradead.org; Fri, 25 Jun 2021 16:36:23 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210625_093622_122628_B7027BA9 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel